2 Commits f7e6077a83 ... 8ae5f5e24e

Author SHA1 Message Date
  Pierre-Yves Barriat 8ae5f5e24e Merge branch '3.3.4.2' of https://gogs.elic.ucl.ac.be/pbarriat/ecearth3 into 3.3.4.2 2 months ago
  Pierre-Yves Barriat 724c256fe6 Fix archive_dir lpjg 2 months ago
3 changed files with 24 additions and 22 deletions
  1. 2 0
      .gitignore
  2. 10 10
      runtime/classic/EC01.sh
  3. 12 12
      runtime/classic/EC02.sh

+ 2 - 0
.gitignore

@@ -37,3 +37,5 @@ sources/nemo-3.6/TOOLS/COMPILE/cpp.history
 sources/nemo-3.6/TOOLS/COMPILE/full_key_list.txt
 sources/runoff-mapper/bin/runoff-mapper.exe
 sources/lpjg/build/
+runtime/classic/*.log
+runtime/classic/*.out

+ 10 - 10
runtime/classic/EC01.sh

@@ -1377,7 +1377,7 @@ do
 
         if $leg_is_restart
         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}"
             if [ -d "$lpjg_rst_state" ]
             then
@@ -1387,7 +1387,7 @@ do
                 exit -1
             fi
             # 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}/
 
         fi
@@ -1544,7 +1544,7 @@ do
         info "Check OASIS restarts and IFS rcf before launch"
         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
             [ ! -f "${oasis_restart_file}" ] && break
 
@@ -1555,7 +1555,7 @@ do
             fi
         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}" ]
         then
             if ! diff -q rcf ${rcf_restart_file} >/dev/null
@@ -1692,7 +1692,7 @@ do
     # -------------------------------------------------------------------------
     if $(has_config lpjg)
     then
-        outdir="output/lpjg/$(printf %03d $((leg_number)))"
+        outdir="${archive_dir}/output/lpjg/$(printf %03d $((leg_number)))"
         if [ -d ${outdir} ]
         then
             rm -rf  ${outdir}
@@ -1744,7 +1744,7 @@ do
     # -------------------------------------------------------------------------
     if $(has_config tm5)
     then
-        outdir="output/tm5/$(printf %03d $((leg_number)))"
+        outdir="${archive_dir}/output/tm5/$(printf %03d $((leg_number)))"
         mkdir -p ${outdir}
 
         set +e
@@ -1765,7 +1765,7 @@ do
         # move profiling files if any
         if [ "$(ls -A ${run_dir}/tm5_profile)" ]
         then
-            outdir="output/tm5/profile_$(printf %03d $((leg_number)))"
+            outdir="${archive_dir}/output/tm5/profile_$(printf %03d $((leg_number)))"
             mkdir -p ${outdir}
 
             for f in ${run_dir}/tm5_profile/*
@@ -1796,7 +1796,7 @@ do
     # -------------------------------------------------------------------------
     if ${ccycle_debug_fluxes} && $(has_config tm5:co2)
     then
-      outdir="output/tm5/$(printf %03d $((leg_number)))"
+      outdir="${archive_dir}/output/tm5/$(printf %03d $((leg_number)))"
       mkdir -p ${outdir}
       if $(has_config lpjg)
       then
@@ -1820,7 +1820,7 @@ do
     # -------------------------------------------------------------------------
     if $(has_config lpjg)
     then
-        outdir="restart/lpjg/$(printf %03d $((leg_number)))"
+        outdir="${archive_dir}/restart/lpjg/$(printf %03d $((leg_number)))"
         if [ -d ${outdir} ]
         then
             rm -rf  ${outdir}
@@ -1869,7 +1869,7 @@ do
     # -------------------------------------------------------------------------
     if $leg_is_restart && $(has_config tm5)
     then
-        outdir="restart/tm5/$(printf %03d $((leg_number)))"
+        outdir="${archive_dir}/restart/tm5/$(printf %03d $((leg_number)))"
         mkdir -p ${outdir}
 
         case ${tm5_istart} in

+ 12 - 12
runtime/classic/EC02.sh

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