Warning, /verification/tutorial_global_oce_optim/input_oad/cycsh is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
e12a7e12af Patr*0001 #!/bin/csh
0002 set name=tutorial
0003 set itermax=15
0004 module load ifc
0005
0006 set ite=`egrep 'optimcycle' data.optim | sed 's/ optimcycle=//'| sed 's/,$//'`
0007 set i=`expr $ite + 1`
0008 while ( $i <= $itermax )
ea7fb8c65f Jean*0009 set ii=`printf "%3.3i\n" $i`
e12a7e12af Patr*0010 echo "Beginning of iteration $ii"
0011 cp -p OPTIM/ctrlhflux_tut_MITgcm.opt0$ii .
0012 set ite=`expr $i - 1`
0013 sed "s/ optimcycle=$ite/ optimcycle=$i/" data.optim > TTT.tmp
0014 mv -f TTT.tmp data.optim
0015 set fich=output$name$ii
ea7fb8c65f Jean*0016 echo "Running mitcgm_ad: iteration $ii"
e12a7e12af Patr*0017 ./mitgcmuv_ad > $fich
0018 egrep optimcycle data.optim >> fcost$name
0019 grep "objf_temp_tut(" $fich >> fcost$name
0020 grep "objf_hflux_tut(" $fich >> fcost$name
0021 egrep 'global fc =' $fich >> fcost$name
ea7fb8c65f Jean*0022 echo Cleaning
e12a7e12af Patr*0023 \rm tapelev*
0024 set direc=run$name$ii
0025 mkdir $direc
0026 mv *.data *.meta $direc
0027 mv ctrlhflux_tut_MITgcm.opt0$ii $fich $direc
0028 mv costhflux_tut_MITgcm.opt0$ii OPTIM/
0029 echo "Line-search: iteration $ii"
0030 cd OPTIM/
0031 egrep optimcycle data.optim
0032 ./optim.x > std$ii
0033 cd ..
0034 set i=`expr $i + 1`
0035 end
0036