|
@@ -11,8 +11,8 @@
|
|
#SBATCH --exclusive
|
|
#SBATCH --exclusive
|
|
##SBATCH --ntasks=1320
|
|
##SBATCH --ntasks=1320
|
|
#SBATCH --ntasks-per-node=128
|
|
#SBATCH --ntasks-per-node=128
|
|
-#SBATCH --partition=medium
|
|
|
|
-##SBATCH --partition=batch
|
|
|
|
|
|
+##SBATCH --partition=medium
|
|
|
|
+#SBATCH --partition=batch
|
|
#
|
|
#
|
|
set -ueo pipefail
|
|
set -ueo pipefail
|
|
#
|
|
#
|
|
@@ -1377,7 +1377,7 @@ do
|
|
|
|
|
|
if $leg_is_restart
|
|
if $leg_is_restart
|
|
then
|
|
then
|
|
- lpjg_restart_dir="restart/lpjg/$(printf %03d $((leg_number-1)))"
|
|
|
|
|
|
+ lpjg_restart_dir="${archive_dir}/restart/lpjg/$(printf %03d $((leg_number-1)))"
|
|
lpjg_rst_state="${lpjg_restart_dir}/lpjg_state_${leg_start_date_yyyy}"
|
|
lpjg_rst_state="${lpjg_restart_dir}/lpjg_state_${leg_start_date_yyyy}"
|
|
if [ -d "$lpjg_rst_state" ]
|
|
if [ -d "$lpjg_rst_state" ]
|
|
then
|
|
then
|
|
@@ -1387,7 +1387,7 @@ do
|
|
exit -1
|
|
exit -1
|
|
fi
|
|
fi
|
|
# get oasis restart files
|
|
# get oasis restart files
|
|
- oasis_restart_dir="restart/oasis/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ oasis_restart_dir="${archive_dir}/restart/oasis/$(printf %03d $((leg_number)))"
|
|
cp -f ${oasis_restart_dir}/*.nc ${run_dir}/
|
|
cp -f ${oasis_restart_dir}/*.nc ${run_dir}/
|
|
|
|
|
|
fi
|
|
fi
|
|
@@ -1544,7 +1544,7 @@ do
|
|
info "Check OASIS restarts and IFS rcf before launch"
|
|
info "Check OASIS restarts and IFS rcf before launch"
|
|
leg_nb_3d=$(printf %03d $((leg_number)))
|
|
leg_nb_3d=$(printf %03d $((leg_number)))
|
|
|
|
|
|
- for oasis_restart_file in restart/oasis/${leg_nb_3d}/*
|
|
|
|
|
|
+ for oasis_restart_file in ${archive_dir}/restart/oasis/${leg_nb_3d}/*
|
|
do
|
|
do
|
|
[ ! -f "${oasis_restart_file}" ] && break
|
|
[ ! -f "${oasis_restart_file}" ] && break
|
|
|
|
|
|
@@ -1555,7 +1555,7 @@ do
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
- rcf_restart_file=restart/ifs/${leg_nb_3d}/rcf
|
|
|
|
|
|
+ rcf_restart_file=${archive_dir}/restart/ifs/${leg_nb_3d}/rcf
|
|
if [ -f "${rcf_restart_file}" ]
|
|
if [ -f "${rcf_restart_file}" ]
|
|
then
|
|
then
|
|
if ! diff -q rcf ${rcf_restart_file} >/dev/null
|
|
if ! diff -q rcf ${rcf_restart_file} >/dev/null
|
|
@@ -1692,7 +1692,7 @@ do
|
|
# -------------------------------------------------------------------------
|
|
# -------------------------------------------------------------------------
|
|
if $(has_config lpjg)
|
|
if $(has_config lpjg)
|
|
then
|
|
then
|
|
- outdir="output/lpjg/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/output/lpjg/$(printf %03d $((leg_number)))"
|
|
if [ -d ${outdir} ]
|
|
if [ -d ${outdir} ]
|
|
then
|
|
then
|
|
rm -rf ${outdir}
|
|
rm -rf ${outdir}
|
|
@@ -1744,7 +1744,7 @@ do
|
|
# -------------------------------------------------------------------------
|
|
# -------------------------------------------------------------------------
|
|
if $(has_config tm5)
|
|
if $(has_config tm5)
|
|
then
|
|
then
|
|
- outdir="output/tm5/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/output/tm5/$(printf %03d $((leg_number)))"
|
|
mkdir -p ${outdir}
|
|
mkdir -p ${outdir}
|
|
|
|
|
|
set +e
|
|
set +e
|
|
@@ -1765,7 +1765,7 @@ do
|
|
# move profiling files if any
|
|
# move profiling files if any
|
|
if [ "$(ls -A ${run_dir}/tm5_profile)" ]
|
|
if [ "$(ls -A ${run_dir}/tm5_profile)" ]
|
|
then
|
|
then
|
|
- outdir="output/tm5/profile_$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/output/tm5/profile_$(printf %03d $((leg_number)))"
|
|
mkdir -p ${outdir}
|
|
mkdir -p ${outdir}
|
|
|
|
|
|
for f in ${run_dir}/tm5_profile/*
|
|
for f in ${run_dir}/tm5_profile/*
|
|
@@ -1796,7 +1796,7 @@ do
|
|
# -------------------------------------------------------------------------
|
|
# -------------------------------------------------------------------------
|
|
if ${ccycle_debug_fluxes} && $(has_config tm5:co2)
|
|
if ${ccycle_debug_fluxes} && $(has_config tm5:co2)
|
|
then
|
|
then
|
|
- outdir="output/tm5/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/output/tm5/$(printf %03d $((leg_number)))"
|
|
mkdir -p ${outdir}
|
|
mkdir -p ${outdir}
|
|
if $(has_config lpjg)
|
|
if $(has_config lpjg)
|
|
then
|
|
then
|
|
@@ -1820,7 +1820,7 @@ do
|
|
# -------------------------------------------------------------------------
|
|
# -------------------------------------------------------------------------
|
|
if $(has_config lpjg)
|
|
if $(has_config lpjg)
|
|
then
|
|
then
|
|
- outdir="restart/lpjg/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/restart/lpjg/$(printf %03d $((leg_number)))"
|
|
if [ -d ${outdir} ]
|
|
if [ -d ${outdir} ]
|
|
then
|
|
then
|
|
rm -rf ${outdir}
|
|
rm -rf ${outdir}
|
|
@@ -1869,7 +1869,7 @@ do
|
|
# -------------------------------------------------------------------------
|
|
# -------------------------------------------------------------------------
|
|
if $leg_is_restart && $(has_config tm5)
|
|
if $leg_is_restart && $(has_config tm5)
|
|
then
|
|
then
|
|
- outdir="restart/tm5/$(printf %03d $((leg_number)))"
|
|
|
|
|
|
+ outdir="${archive_dir}/restart/tm5/$(printf %03d $((leg_number)))"
|
|
mkdir -p ${outdir}
|
|
mkdir -p ${outdir}
|
|
|
|
|
|
case ${tm5_istart} in
|
|
case ${tm5_istart} in
|