UM User Group |
Main /
Change Start Date CM#!/bin/sh #This is modified from ~/bin/changeDateScript which I orginally obtained #from Emily Black (see below) #This is modified so that it alters the ocean reconfiguration file (RECONO) # as well as the atmosphere recon file (RECONA) in the coupled model. # This prevents conflicts between dates in startdumps and prescribed dates # I got this script from emily black # It modifies the atmospheric reconfiguration namelist to allow the year, # month _and_ day of the start dump to be overwritten. # for more details see: # http://www.met.rdg.ac.uk/~dan/um/bin/view.cgi/UM/BasicEnsembleExpt if [ $# != 4 ] then echo " useage changeStartDate_CM job_name year month day" echo " eg changeStartDate_CM xalya 1996 3 19" exit fi cd $HOME/umui_jobs/$1 cp RECONA RECONA.bak cat << ENDCAT | ed -s RECONA > /dev/null 1,\$s/FIXHD(12)=405,/FIXHD(12)=405,FIXHD(21)=$2,FIXHD(22)=$3,FIXHD(23)=$4,FIXHD(28)=$2,FIXHD(29)=$3,FIXHD(30)=$4,/ w RECONA q ENDCAT cp RECONO RECONO.bak cat << ENDCAT2 | ed -s RECONO > /dev/null 1,\$s/FIXHD(12)=405,/FIXHD(12)=405,FIXHD(21)=$2,FIXHD(22)=$3,FIXHD(23)=$4,FIXHD(28)=$2,FIXHD(29)=$3,FIXHD(30)=$4,/ w RECONO q ENDCAT2 |