|
@@ -50,6 +50,9 @@ run_end_date="[[[MOD:GENERAL:RUN_END_DATE]]]"
|
|
# directory. Leave set to 'false' otherwise.
|
|
# directory. Leave set to 'false' otherwise.
|
|
# NOTE: If set to 'true' the run directory $run_dir is cleaned!
|
|
# NOTE: If set to 'true' the run directory $run_dir is cleaned!
|
|
force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
|
|
force_run_from_scratch=[[[MOD:GENERAL:FORCE_RUN_FROM_SCRATCH]]]
|
|
|
|
+special_restart=false
|
|
|
|
+special_restart_from=ECE3
|
|
|
|
+special_restart_date="1995-01-01"
|
|
|
|
|
|
# Resolution
|
|
# Resolution
|
|
ifs_grid=[[[MOD:IFS:GRID]]]
|
|
ifs_grid=[[[MOD:IFS:GRID]]]
|
|
@@ -209,6 +212,41 @@ xio_numproc=[[[MOD:XIO:NUMPROC]]]
|
|
if [ ! -d ${run_dir} ]
|
|
if [ ! -d ${run_dir} ]
|
|
then
|
|
then
|
|
mkdir -p ${run_dir}
|
|
mkdir -p ${run_dir}
|
|
|
|
+ if $special_restart
|
|
|
|
+ then
|
|
|
|
+ force_run_from_scratch=false
|
|
|
|
+ rsync -av --delete ${run_dir}/../${special_restart_from}/ --exclude log --exclude output --exclude restart --exclude="${special_restart_from}_*" --exclude="srf*" --exclude="restart_*" --exclude="debug.*" --exclude="output.*" ${run_dir}
|
|
|
|
+ cp -f ${nem_exe_file} ${run_dir}
|
|
|
|
+ cp -f ${ifs_exe_file} ${run_dir}
|
|
|
|
+ cp -f ${rnf_exe_file} ${run_dir}
|
|
|
|
+ cp -f ${xio_exe_file} ${run_dir}
|
|
|
|
+ special_year=${special_restart_date:0:4}
|
|
|
|
+ sed -i "/$special_year/q" ${run_dir}/ece.info
|
|
|
|
+ . ${run_dir}/ece.info
|
|
|
|
+ special_restart_leg=$(printf %03d $((leg_number+1)))
|
|
|
|
+ # PUT HERE THE INSTRUCTIONS TO COPY THE restart files
|
|
|
|
+ rsync -av ${run_dir}/../${special_restart_from}/restart/ifs/${special_restart_leg}/ ${run_dir}
|
|
|
|
+ rsync -av ${run_dir}/../${special_restart_from}/restart/oasis/${special_restart_leg}/ ${run_dir}
|
|
|
|
+ cd ${run_dir}/../${special_restart_from}/restart/nemo/${special_restart_leg}
|
|
|
|
+ for f in *.nc; do
|
|
|
|
+ nf=${exp_name}${f:4}
|
|
|
|
+ cp $f ${run_dir}/$nf
|
|
|
|
+ done
|
|
|
|
+ cd -
|
|
|
|
+ cd ${run_dir}
|
|
|
|
+ for f in ${exp_name}_????????_restart_???_????.nc; do
|
|
|
|
+ nf=${f:14}
|
|
|
|
+ ln -s $f $nf
|
|
|
|
+ done
|
|
|
|
+ cd -
|
|
|
|
+ rm -f ${run_dir}/ICMCL${special_restart_from}INIT
|
|
|
|
+ mv ${run_dir}/ICMGG${special_restart_from}INIUA ${run_dir}/ICMGG${exp_name}INIUA
|
|
|
|
+ mv ${run_dir}/ICMGG${special_restart_from}INIT ${run_dir}/ICMGG${exp_name}INIT
|
|
|
|
+ mv ${run_dir}/ICMSH${special_restart_from}INIT ${run_dir}/ICMSH${exp_name}INIT
|
|
|
|
+ fi
|
|
|
|
+else
|
|
|
|
+ force_run_from_scratch=false
|
|
|
|
+ special_restart=false
|
|
fi
|
|
fi
|
|
cd ${run_dir}
|
|
cd ${run_dir}
|
|
|
|
|
|
@@ -731,6 +769,7 @@ do
|
|
|
|
|
|
# Need to reset force_run_from_scratch in order to avoid destroying the next leg
|
|
# Need to reset force_run_from_scratch in order to avoid destroying the next leg
|
|
force_run_from_scratch=false
|
|
force_run_from_scratch=false
|
|
|
|
+ special_restart=false
|
|
|
|
|
|
done # loop over legs
|
|
done # loop over legs
|
|
|
|
|