|
@@ -220,31 +220,36 @@ do
|
|
|
|
|
|
dir_rs=`dirname ${special_rs_nemo_stencil}`
|
|
|
base_rs=`basename ${special_rs_nemo_stencil}`
|
|
|
-
|
|
|
- n_oce_rs=`find ${dir_rs} -name "${base_rs}oce_????.nc" | wc -l`
|
|
|
- if(( n_oce_rs != nem_numproc )); then
|
|
|
- echo "in special_rs_nemo, not the right amount of ocean restart files."
|
|
|
- echo "${n_oce_rs} instead of ${nem_numproc}. exiting."
|
|
|
- exit 2
|
|
|
- fi
|
|
|
|
|
|
- n_ice_rs=`find ${dir_rs} -name "${base_rs}ice_????.nc" | wc -l`
|
|
|
- if(( n_ice_rs != nem_numproc )); then
|
|
|
- echo "in special_rs_nemo, not the right amount of ice restart files."
|
|
|
- echo "${n_ice_rs} instead of ${nem_numproc}. exiting."
|
|
|
- exit 2
|
|
|
+ if ${special_rs_nemo_rebuilt}
|
|
|
+ then
|
|
|
+
|
|
|
+ if [[ -f ${special_rs_nemo_stencil}oce.nc && -f ${special_rs_nemo_stencil}ice.nc ]]
|
|
|
+ then
|
|
|
+ ln -fs ${special_rs_nemo_stencil}oce.nc restart_oce.nc
|
|
|
+ ln -fs ${special_rs_nemo_stencil}ice.nc restart_ice.nc
|
|
|
+ else
|
|
|
+ echo "EXITING. ${special_rs_nemo_stencil}oce.nc or ${special_rs_nemo_stencil}ice.nc not found"
|
|
|
+ exit 2
|
|
|
+ fi
|
|
|
+
|
|
|
+ else
|
|
|
+ for (( n=0 ; n<nem_numproc ; n++ ))
|
|
|
+ do
|
|
|
+ np=$(printf %04d ${n})
|
|
|
+ if [[ -f ${special_rs_nemo_stencil}oce_${np}.nc && -f ${special_rs_nemo_stencil}ice_${np}.nc ]]
|
|
|
+ then
|
|
|
+ ln -fs ${special_rs_nemo_stencil}oce_${np}.nc restart_oce_${np}.nc
|
|
|
+ ln -fs ${special_rs_nemo_stencil}ice_${np}.nc restart_ice_${np}.nc
|
|
|
+ else
|
|
|
+ echo "EXITING. ${special_rs_nemo_stencil}oce_${np}.nc or ${special_rs_nemo_stencil}ice_${np}.nc not found"
|
|
|
+ exit 2
|
|
|
+ fi
|
|
|
+ done
|
|
|
fi
|
|
|
-
|
|
|
- for (( n=0 ; n<nem_numproc ; n++ ))
|
|
|
- do
|
|
|
- np=$(printf %04d ${n})
|
|
|
- ln -fs ${special_rs_nemo_stencil}oce_${np}.nc restart_oce_${np}.nc
|
|
|
- ln -fs ${special_rs_nemo_stencil}ice_${np}.nc restart_ice_${np}.nc
|
|
|
- done
|
|
|
|
|
|
fi # if $special_restart
|
|
|
|
|
|
-
|
|
|
else # if ! $leg_is_restart
|
|
|
|
|
|
# ---------------------------------------------------------------------
|
|
@@ -279,6 +284,7 @@ do
|
|
|
# -------------------------------------------------------------------------
|
|
|
# *** Update ocean namelist
|
|
|
# -------------------------------------------------------------------------
|
|
|
+
|
|
|
source build_namelist_cfg.sh > namelist_cfg
|
|
|
|
|
|
|
|
@@ -286,7 +292,6 @@ do
|
|
|
# *** Launch experiment
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
|
|
-
|
|
|
echo "START of mpirun"
|
|
|
time_begin=$(date +%s)
|
|
|
mpirun -np "${xio_numproc:?}" "${xio_exe_file:?}" : -np "${nem_numproc:?}" "${nem_exe_file:?}"
|