New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_reference-configurations.sh in utils/CI/sette_ticket2673 – NEMO

source: utils/CI/sette_ticket2673/sette_reference-configurations.sh @ 14873

Last change on this file since 14873 was 14873, checked in by acc, 3 years ago

Branch: sette_ticket2673. Improved functionality: added -r (no report) option to disable running sette_rpt.sh at the end of sette.sh (allows chaining of sette.sh invocations with different arguments). Allowed SAS and AGRIF to be equivalently requested as ORCA2_SAS_ICE or AGRIF_DEMO (saves having to remember which are abbreviated). Sorted out the logic so that RESTART is no longer a mandatory test (allows REPRO without RESTART but, also, importantly, allows COMPILE as a test which will compile but not attempt to run - should mean fewer excuses for not running SETTE)

  • Property svn:executable set to *
File size: 58.6 KB
RevLine 
[3520]1#!/bin/bash
[3708]2############################################################
[3520]3# Author : Simona Flavoni for NEMO
[4245]4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
[3520]6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
[7744]14#set -vx
[3520]15set -o posix
16#set -u
17#set -e
[4245]18# ===========
[3520]19# DESCRIPTION
20# ===========
21#
22# Variables to be checked by user:
23#
[4245]24# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory
25# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
26# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs 
27# INTERACT_FLAG     : flag to run in interactive mode "yes"
28#                           to run in batch mode "no"
29# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
30#                           to run in sequential mode (NB_PROC = 1) "no"
[13790]31
[4245]32# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
33#                     set to zero if USING_MPMD="no"
[3520]34#
35# Principal script is sette.sh, that calls
36#
[4245]37#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
[9576]38#              and links to nemo in ${CONFIG_NAME}/EXP00)
[3520]39#
40#  param.cfg : sets and loads following directories:
[13568]41#              This will have been run by the parent sette.sh and values exported here
[3520]42#
[4245]43#   FORCING_DIR         : is the directory for forcing files (tarfile)
44#   INPUT_DIR           : is the directory for input files storing
45#   TMPDIR              : is the temporary directory (if needed)
[3520]46#   NEMO_VALIDATION_DIR : is the validation directory
47#
48#   (NOTE: this file is the same for all configrations to be tested with sette)
49#
[4245]50#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
51#   set_namelist     : function declared in all_functions that sets namelist parameters
52#   post_test_tidyup : creates validation storage directory and copies required output files
[9019]53#                      (run.stat and ocean.output) in it after execution of test.
[3520]54#
[4245]55#  VALIDATION tree is:
[3520]56#
57#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
58#
59#  prepare_exe_dir.sh : defines and creates directory where the test is executed
[4245]60#                       execution directory takes name of TEST_NAME defined for every test
61#                       in sette.sh. (each test in executed in its own directory)
[3520]62#
[10755]63#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
64#
[10698]65#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
66#                       ( not doing it could lead to false positive )
67#
[4245]68#  prepare_job.sh     : to generate the script run_job.sh
[3520]69#
[4245]70#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
71#                        see sette.sh and BATCH_TEMPLATE directory
[3520]72#
[4245]73#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
74#        can be found paths to the input tar file)
75#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
76#        directory
77#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
78#        remain in ${NEW_CONF}/EXP00
[3520]79#
[4245]80#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
81#        executed commands
[3520]82#
[4245]83#  NOTE: if sette.sh is stopped in output.sette there is written the last command
84#        executed by sette.sh
[3520]85#
[4245]86# example use: ./sette.sh
87#########################################################################################
[3520]88#
[10687]89# LOAD param value
[10717]90SETTE_DIR=$(cd $(dirname "$0"); pwd)
91MAIN_DIR=$(dirname $SETTE_DIR)
[7743]92
[10687]93export BATCH_COMMAND_PAR=${BATCH_CMD}
94export BATCH_COMMAND_SEQ=${BATCH_CMD}
[4990]95export INTERACT_FLAG="no"
[4245]96export MPIRUN_FLAG="yes"
[14826]97#
[4245]98# Settings which control the use of stand alone servers (only relevant if using xios)
[3520]99#
[10632]100export NUM_XIOSERVERS=4
[11140]101export JOB_PREFIX=${JOB_PREFIX_MPMD}
[3520]102#
[4245]103if [ ${USING_MPMD} == "no" ] 
104 then
105   export NUM_XIOSERVERS=0
[11140]106   export JOB_PREFIX=${JOB_PREFIX_NOMPMD}
[4245]107fi
[3520]108#
109
110# Directory to run the tests
[9602]111CONFIG_DIR0=${MAIN_DIR}/cfgs
112TOOLS_DIR=${MAIN_DIR}/tools
[3520]113
114CMP_NAM=${1:-$COMPILER}
115# Copy job_batch_COMPILER file for specific compiler into job_batch_template
116cd ${SETTE_DIR}
[4245]117cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
[10747]118# Description of available configurations:
119# GYRE_PISCES       :
120# ORCA2_ICE_PISCES  :
121# ORCA2_OFF_PISCES  :
122# AMM12             :
[14870]123# SAS               : aka ORCA2_SAS_ICE
[10747]124# ORCA2_ICE_OBS     :
[14870]125# AGRIF             : AGRIF_DEMO: test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific and
126#                     AGRIF_DEMO_NOAGRIF: check that key_agrif without zoom = no key_agrif
127# WED025            : regional configuration including sea-ice and tides (Spitzbergen)
[4147]128
[14873]129. ./all_functions.sh
[13568]130for config in ${TEST_CONFIGS[@]}
[3520]131do
132
[9518]133# -----------
134# GYRE_PISCES
135# -----------
[14873]136if [ ${config} == "GYRE_PISCES" ] ;  then
[13559]137    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
138    then
139   ITEND=12    # 1 day
140    else
141   ITEND=1080  # 90 days
142    fi
143    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]144    cd ${MAIN_DIR}
[12569]145    #
146    # syncronisation if target directory/file exist (not done by makenemo)
147    sync_config  GYRE_PISCES GYRE_PISCES_ST 'cfgs'
148    clean_config GYRE_PISCES GYRE_PISCES_ST 'cfgs'
149    #
[14867]150    # GYRE uses linssh so remove key_qco if added by default
151    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
[14873]152fi
153if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ;  then
154## Restartability tests for GYRE_PISCES
155    export TEST_NAME="LONG"
[3520]156    cd ${SETTE_DIR}
[4252]157    . ./prepare_exe_dir.sh
[10755]158    set_valid_dir
[10698]159    clean_valid_dir
[3520]160    JOB_FILE=${EXE_DIR}/run_job.sh
[9525]161    NPROC=8
[4245]162    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[4147]163    cd ${EXE_DIR} 
[7715]164    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
[4147]165    set_namelist namelist_cfg nn_it000 1
[13559]166    set_namelist namelist_cfg nn_itend ${ITEND}
167    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]168    set_namelist namelist_cfg ln_linssh .true.
[9525]169    set_namelist namelist_cfg jpni 2
170    set_namelist namelist_cfg jpnj 4
[10573]171    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
172    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[14869]173    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
174    set_xio_using_server iodef.xml ${USING_MPMD}
[4245]175    cd ${SETTE_DIR}
[10755]176    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]177
178    cd ${SETTE_DIR}
179    export TEST_NAME="SHORT"
[4252]180    . ./prepare_exe_dir.sh
[10755]181    set_valid_dir
[10698]182    clean_valid_dir
[3520]183    cd ${EXE_DIR}
[7715]184    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
[13559]185    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
186    set_namelist namelist_cfg nn_itend ${ITEND}
187    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[4147]188    set_namelist namelist_cfg ln_rstart .true.
189    set_namelist namelist_cfg nn_rstctl 2
[7646]190    set_namelist namelist_cfg ln_linssh .true.
[9525]191    set_namelist namelist_cfg jpni 2
192    set_namelist namelist_cfg jpnj 4
[10573]193    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
194    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[7744]195    set_namelist namelist_top_cfg ln_rsttr .true.
196    set_namelist namelist_top_cfg nn_rsttr 2
[13559]197    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_${ITRST}_restart\"
198    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_${ITRST}_restart_trc\"
[14869]199    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
200    set_xio_using_server iodef.xml ${USING_MPMD}
[3537]201    for (( i=1; i<=$NPROC; i++)) ; do
202        L_NPROC=$(( $i - 1 ))
203        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]204        ln -sf ../LONG/GYREPIS_LONG_${ITRST}_restart_${L_NPROC}.nc .
205        ln -sf ../LONG/GYREPIS_LONG_${ITRST}_restart_trc_${L_NPROC}.nc .
[3537]206    done
[3520]207    cd ${SETTE_DIR}
[10755]208    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]209    cd ${SETTE_DIR}
[3532]210    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]211
[13568]212fi
213
214if [ ${config} == "GYRE_PISCES" ] && [ ${DO_REPRO} == "1" ] ;  then
[9518]215## Reproducibility tests for GYRE_PISCES
[9525]216    export TEST_NAME="REPRO_2_4"
[9658]217    cd ${MAIN_DIR}
[3520]218    cd ${SETTE_DIR}
[4252]219    . ./prepare_exe_dir.sh
[10755]220    set_valid_dir
[10698]221    clean_valid_dir
[3520]222    JOB_FILE=${EXE_DIR}/run_job.sh
[9525]223    NPROC=8
[4245]224    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]225    cd ${EXE_DIR}
[7715]226    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
[4147]227    set_namelist namelist_cfg nn_it000 1
[13559]228    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]229    set_namelist namelist_cfg ln_linssh .true.
[9525]230    set_namelist namelist_cfg jpni 2
231    set_namelist namelist_cfg jpnj 4
[10573]232    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
233    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[14869]234    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
235    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]236    cd ${SETTE_DIR}
[10755]237    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]238    cd ${SETTE_DIR}
239    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
240
241    cd ${SETTE_DIR}
[9525]242    export TEST_NAME="REPRO_4_2"
[4252]243    . ./prepare_exe_dir.sh
[10755]244    set_valid_dir
[10698]245    clean_valid_dir
[3680]246    JOB_FILE=${EXE_DIR}/run_job.sh
[9525]247    NPROC=8
[4245]248    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]249    cd ${EXE_DIR}
[7715]250    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
[4147]251    set_namelist namelist_cfg nn_it000 1
[13559]252    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]253    set_namelist namelist_cfg ln_linssh .true.
[9525]254    set_namelist namelist_cfg jpni 4
255    set_namelist namelist_cfg jpnj 2
[10573]256    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
257    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[14869]258    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
259    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]260    cd ${SETTE_DIR}
[10755]261    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]262    cd ${SETTE_DIR}
263    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3532]264
[3520]265fi
266
[9518]267# -----------------
[9663]268# ORCA2_ICE_PISCES
[9518]269# -----------------
[14873]270if [ ${config} == "ORCA2_ICE_PISCES" ] ;  then
[13559]271    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
272    then
273   ITEND=16   # 1 day
274    else
275   ITEND=992  # 62 days
276    fi
277    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]278    cd ${MAIN_DIR}
[12569]279    #
280    # syncronisation if target directory/file exist (not done by makenemo)
281    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
282    clean_config ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
283    #
[14867]284    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
[14873]285fi
286if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ;  then
287## Restartability tests for ORCA2_ICE_PISCES
288    export TEST_NAME="LONG"
[7646]289    cd ${SETTE_DIR}
290    . ./prepare_exe_dir.sh
[10755]291    set_valid_dir
[10698]292    clean_valid_dir
[7646]293    JOB_FILE=${EXE_DIR}/run_job.sh
294    NPROC=32
295    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
296    cd ${EXE_DIR}
297    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
298    set_namelist namelist_cfg nn_it000 1
[13559]299    set_namelist namelist_cfg nn_itend ${ITEND}
300    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]301    set_namelist namelist_cfg jpni 4
302    set_namelist namelist_cfg jpnj 8
[10573]303    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
304    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9933]305    set_namelist namelist_cfg ln_use_calving .true.
[14244]306    set_namelist namelist_cfg ln_wave .true.
[13948]307    set_namelist namelist_cfg ln_cdgw .false.
[14244]308    set_namelist namelist_cfg ln_sdw  .true.
309    set_namelist namelist_cfg ln_stcor .true.
[9904]310    #
[14869]311    set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false.
312    set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1
313    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
314    set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
[10687]315    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
[9904]316    #
[9019]317    set_namelist namelist_ice_cfg ln_icediachk .true.
[4147]318    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]319    set_namelist namelist_top_cfg ln_trcbc  .false.
320    # put ln_ironsed, ln_hydrofe to false
[3520]321    # if not you need input files, and for tests is not necessary
[4147]322    set_namelist namelist_pisces_cfg ln_varpar .false.
323    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]324    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]325    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[9203]326    # put ln_pisdmp to false : no restoring to global mean value
327    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]328    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
329    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]330    cd ${SETTE_DIR}
[10755]331    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3532]332   
333    cd ${SETTE_DIR}
[3520]334    export TEST_NAME="SHORT"
[4252]335    . ./prepare_exe_dir.sh
[10755]336    set_valid_dir
[10698]337    clean_valid_dir
[3520]338    cd ${EXE_DIR}
[7646]339    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
[13559]340    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
341    set_namelist namelist_cfg nn_itend ${ITEND}
342    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[4147]343    set_namelist namelist_cfg ln_rstart .true.
344    set_namelist namelist_cfg nn_rstctl 2
[7646]345    set_namelist namelist_cfg jpni 4
346    set_namelist namelist_cfg jpnj 8
[10573]347    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
348    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9920]349    set_namelist namelist_cfg nn_test_icebergs -1
[14244]350    set_namelist namelist_cfg ln_wave .true.
[13948]351    set_namelist namelist_cfg ln_cdgw .false.
[14244]352    set_namelist namelist_cfg ln_sdw  .true.
353    set_namelist namelist_cfg ln_stcor .true.
[9904]354    #
[14869]355    set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false.
356    set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1
357    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
358    set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
[10732]359    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
[9904]360    #
[9933]361    set_namelist namelist_ice_cfg ln_icediachk .true.
[4147]362    set_namelist namelist_top_cfg ln_rsttr .true.
363    set_namelist namelist_top_cfg nn_rsttr 2
[13559]364    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_${ITRST}_restart\"
365    set_namelist namelist_cfg cn_icbrst_in \"O2L3P_LONG_${ITRST}_restart_icb\"
366    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_${ITRST}_restart_trc\"
367    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_${ITRST}_restart_ice\"
[12428]368    set_namelist namelist_top_cfg ln_trcbc  .false.
369    # put ln_ironsed, ln_hydrofe to false
[3520]370    # if not you need input files, and for tests is not necessary
[4147]371    set_namelist namelist_pisces_cfg ln_varpar .false.
372    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]373    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]374    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]375    # put ln_pisdmp to false : no restoring to global mean value
[4147]376    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[3537]377    for (( i=1; i<=$NPROC; i++)) ; do
378        L_NPROC=$(( $i - 1 ))
379        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]380        ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_${L_NPROC}.nc .
381        ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_trc_${L_NPROC}.nc .
382        ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_ice_${L_NPROC}.nc .
[9904]383        if [ ${USING_ICEBERGS} == "yes" ]
384            then
[13559]385             ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_icb_${L_NPROC}.nc O2L3P_LONG_${ITRST}_restart_icb_${L_NPROC}.nc
[9904]386        fi
[3537]387    done
[14869]388    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
389    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]390    cd ${SETTE_DIR}
[10755]391    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]392    cd ${SETTE_DIR}
[3532]393    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]394
[13568]395fi
396
397if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ;  then
[9663]398## Reproducibility tests for ORCA2_ICE_PISCES
[7646]399    export TEST_NAME="REPRO_4_8"
[9658]400    cd ${MAIN_DIR}
[3520]401    cd ${SETTE_DIR}
[4252]402    . ./prepare_exe_dir.sh
[10755]403    set_valid_dir
[10698]404    clean_valid_dir
[3520]405    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]406    NPROC=32
[4245]407    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]408    cd ${EXE_DIR}
[9019]409    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
[4147]410    set_namelist namelist_cfg nn_it000 1
[13559]411    set_namelist namelist_cfg nn_itend ${ITEND}
[4147]412    set_namelist namelist_cfg jpni 4
[7646]413    set_namelist namelist_cfg jpnj 8
[10573]414    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
415    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[14244]416    set_namelist namelist_cfg ln_wave .true.
[13948]417    set_namelist namelist_cfg ln_cdgw .false.
[14244]418    set_namelist namelist_cfg ln_sdw  .true.
419    set_namelist namelist_cfg ln_stcor .true.
[10189]420
[14869]421    set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false.
422    set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1
423    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
424    set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
[10687]425    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
426
[4147]427    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]428    set_namelist namelist_top_cfg ln_trcbc  .false.
429    # put ln_ironsed, ln_hydrofe to false
[3520]430    # if not you need input files, and for tests is not necessary
[4147]431    set_namelist namelist_pisces_cfg ln_varpar .false.
432    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]433    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]434    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]435    # put ln_pisdmp to false : no restoring to global mean value
[4147]436    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]437    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
438    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]439    cd ${SETTE_DIR}
[10755]440    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]441    cd ${SETTE_DIR}
[3532]442    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]443
444    cd ${SETTE_DIR}
[7646]445    export TEST_NAME="REPRO_8_4"
[4252]446    . ./prepare_exe_dir.sh
[10755]447    set_valid_dir
[10698]448    clean_valid_dir
[3680]449    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]450    NPROC=32
[4245]451    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]452    cd ${EXE_DIR}
[9019]453    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
[4147]454    set_namelist namelist_cfg nn_it000 1
[13559]455    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]456    set_namelist namelist_cfg jpni 8
457    set_namelist namelist_cfg jpnj 4
[10573]458    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
459    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[14244]460    set_namelist namelist_cfg ln_wave .true.
[13948]461    set_namelist namelist_cfg ln_cdgw .false.
[14244]462    set_namelist namelist_cfg ln_sdw  .true.
463    set_namelist namelist_cfg ln_stcor .true.
[10687]464
[14869]465    set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false.
466    set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1
467    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
468    set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false.
[10687]469    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
470
[4147]471    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]472    set_namelist namelist_top_cfg ln_trcbc  .false.
473    # put ln_ironsed, ln_hydrofe to false
[3520]474    # if not you need input files, and for tests is not necessary
[4147]475    set_namelist namelist_pisces_cfg ln_varpar .false.
476    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]477    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]478    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]479    # put ln_pisdmp to false : no restoring to global mean value
[4147]480    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]481    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
482    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]483    cd ${SETTE_DIR}
[10755]484    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]485    cd ${SETTE_DIR}
486    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
487fi
488
[9518]489# ----------------
490# ORCA2_OFF_PISCES
491# ----------------
[14873]492if [ ${config} == "ORCA2_OFF_PISCES" ] ;  then
[13559]493    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
494    then
495   ITEND=16   # 4 days
496    else
497   ITEND=380  # 95 days
498    fi
499    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]500    cd ${MAIN_DIR}
[12569]501    #
502    # syncronisation if target directory/file exist (not done by makenemo)
503    sync_config  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
504    clean_config ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
505    #
[14867]506    # ORCA2_OFF_PISCES uses linssh so remove key_qco if added by default
507    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
[14873]508fi
509if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ;  then
510## Restartability tests for ORCA2_OFF_PISCES
511    export TEST_NAME="LONG"
[3520]512    cd ${SETTE_DIR}
[4252]513    . ./prepare_exe_dir.sh
[10755]514    set_valid_dir
[10698]515    clean_valid_dir
[3520]516    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]517    NPROC=32
[4245]518    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]519    cd ${EXE_DIR}
[4147]520    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
521    set_namelist namelist_cfg nn_it000 1
[13559]522    set_namelist namelist_cfg nn_itend ${ITEND}
523    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]524    set_namelist namelist_cfg jpni 4
525    set_namelist namelist_cfg jpnj 8
[10573]526    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
527    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9904]528    set_namelist namelist_cfg ln_qsr_rgb .true.
[4147]529    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]530    set_namelist namelist_top_cfg ln_trcbc  .false.
531    # put ln_ironsed, ln_hydrofe to false
[3520]532    # if not you need input files, and for tests is not necessary
[4147]533    set_namelist namelist_pisces_cfg ln_varpar .false.
534    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]535    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]536    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]537    # put ln_pisdmp to false : no restoring to global mean value
[4147]538    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]539    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
540    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
541    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]542    cd ${SETTE_DIR}
[10755]543    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]544   
545    cd ${SETTE_DIR}
546    export TEST_NAME="SHORT"
[4252]547    . ./prepare_exe_dir.sh
[10755]548    set_valid_dir
[10698]549    clean_valid_dir
[3520]550    cd ${EXE_DIR}
[4147]551    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
[13559]552    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
553    set_namelist namelist_cfg nn_itend ${ITEND}
554    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]555    set_namelist namelist_cfg jpni 4
556    set_namelist namelist_cfg jpnj 8
[10573]557    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
558    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9904]559    set_namelist namelist_cfg ln_qsr_rgb .true.
[4147]560    set_namelist namelist_top_cfg ln_rsttr .true.
561    set_namelist namelist_top_cfg nn_rsttr 2
[13559]562    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_${ITRST}_restart_trc\"
[3537]563    for (( i=1; i<=$NPROC; i++)) ; do
564        L_NPROC=$(( $i - 1 ))
565        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]566        ln -sf ../LONG/OFFP_LONG_${ITRST}_restart_trc_${L_NPROC}.nc .
[3537]567    done
[12428]568    set_namelist namelist_top_cfg ln_trcbc  .false.
569    # put ln_ironsed, ln_hydrofe to false
[3520]570    # if not you need input files, and for tests is not necessary
[4147]571    set_namelist namelist_pisces_cfg ln_varpar .false.
572    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]573    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]574    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]575    # put ln_pisdmp to false : no restoring to global mean value
[4147]576    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]577    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
578    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
579    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]580    cd ${SETTE_DIR}
[10755]581    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]582    cd ${SETTE_DIR}
583    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
584
[13568]585fi
586
587if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_REPRO} == "1" ] ;  then
[9518]588## Reproducibility tests for ORCA2_OFF_PISCES
[7646]589    export TEST_NAME="REPRO_4_8"
[9658]590    cd ${MAIN_DIR}
[3520]591    cd ${SETTE_DIR}
[4252]592    . ./prepare_exe_dir.sh
[10755]593    set_valid_dir
[10698]594    clean_valid_dir
[3520]595    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]596    NPROC=32
[4245]597    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]598    cd ${EXE_DIR}
[9019]599    set_namelist namelist_cfg cn_exp \"OFFP_48\"
[4147]600    set_namelist namelist_cfg nn_it000 1
[13559]601    set_namelist namelist_cfg nn_itend ${ITEND}
[4147]602    set_namelist namelist_cfg jpni 4
[7646]603    set_namelist namelist_cfg jpnj 8
[10573]604    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
605    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9904]606    set_namelist namelist_cfg ln_qsr_rgb .true.
[4147]607    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]608    set_namelist namelist_top_cfg ln_trcbc  .false.
609    # put ln_ironsed, ln_hydrofe to false
[3520]610    # if not you need input files, and for tests is not necessary
[4147]611    set_namelist namelist_pisces_cfg ln_varpar .false.
612    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]613    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]614    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]615    # put ln_pisdmp to false : no restoring to global mean value
[4147]616    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]617    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
618    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
619    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]620    cd ${SETTE_DIR}
[10755]621    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]622    cd ${SETTE_DIR}
[3532]623    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]624
625    cd ${SETTE_DIR}
[7646]626    export TEST_NAME="REPRO_8_4"
[4252]627    . ./prepare_exe_dir.sh
[10755]628    set_valid_dir
[10698]629    clean_valid_dir
[3680]630    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]631    NPROC=32
[4245]632    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]633    cd ${EXE_DIR}
[9019]634    set_namelist namelist_cfg cn_exp \"OFFP_84\"
[4147]635    set_namelist namelist_cfg nn_it000 1
[13559]636    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]637    set_namelist namelist_cfg jpni 8
638    set_namelist namelist_cfg jpnj 4
[10573]639    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
640    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[9904]641    set_namelist namelist_cfg ln_qsr_rgb .true.
[4147]642    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]643    set_namelist namelist_top_cfg ln_trcbc  .false.
644    # put ln_ironsed, ln_hydrofe to false
[3520]645    # if not you need input files, and for tests is not necessary
[4147]646    set_namelist namelist_pisces_cfg ln_varpar .false.
647    set_namelist namelist_pisces_cfg ln_ironsed .false.
[7646]648    set_namelist namelist_pisces_cfg ln_ironice .false.
[4147]649    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[3680]650    # put ln_pisdmp to false : no restoring to global mean value
[4147]651    set_namelist namelist_pisces_cfg ln_pisdmp .false.
[14869]652    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
653    set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1
654    set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1
655    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]656    cd ${SETTE_DIR}
[10755]657    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]658    cd ${SETTE_DIR}
659    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
660fi
661
[9518]662# -----
663# AMM12
664# -----
[14873]665if [ ${config} == "AMM12" ] ;  then
[13559]666    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
667    then
668   ITEND=12   # 3 h
669    else
670   ITEND=576  # 4 days
671    fi
672    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]673    cd ${MAIN_DIR}
[12569]674    #
675    # syncronisation if target directory/file exist (not done by makenemo)
676    sync_config  AMM12 AMM12_ST 'cfgs'
677    clean_config AMM12 AMM12_ST 'cfgs'
678    #
[14867]679    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
[14873]680fi
681if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ;  then
682    ## Restartability tests for AMM12
683    export TEST_NAME="LONG"
[3520]684    cd ${SETTE_DIR}
[4252]685    . ./prepare_exe_dir.sh
[10755]686    set_valid_dir
[10698]687    clean_valid_dir
[3520]688    JOB_FILE=${EXE_DIR}/run_job.sh
689    NPROC=32
[4245]690    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]691    cd ${EXE_DIR}
[9019]692    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
[4147]693    set_namelist namelist_cfg nn_it000 1
[13559]694    set_namelist namelist_cfg nn_itend ${ITEND}
695    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]696    set_namelist namelist_cfg jpni 4
697    set_namelist namelist_cfg jpnj 8
[10573]698    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]699    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
700    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]701    cd ${SETTE_DIR}
[10755]702    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]703
704    cd ${SETTE_DIR}
[3532]705    export TEST_NAME="SHORT"
[4379]706    . ./prepare_exe_dir.sh
[10755]707    set_valid_dir
[10698]708    clean_valid_dir
[3520]709    cd ${EXE_DIR}
[9019]710    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
[13559]711    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
712    set_namelist namelist_cfg nn_itend ${ITEND}
713    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]714    set_namelist namelist_cfg jpni 4
715    set_namelist namelist_cfg jpnj 8
[10573]716    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[4147]717    set_namelist namelist_cfg ln_rstart .true.
718    set_namelist namelist_cfg nn_rstctl 2
[13559]719    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_${ITRST}_restart\"
[4252]720    set_namelist namelist_cfg nn_date0 20120102
[3537]721    for (( i=1; i<=$NPROC; i++)) ; do
722        L_NPROC=$(( $i - 1 ))
723        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]724        ln -sf ../LONG/AMM12_LONG_${ITRST}_restart_${L_NPROC}.nc .
[3537]725    done
[14869]726    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
727    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]728    cd ${SETTE_DIR}
[10755]729    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]730    cd ${SETTE_DIR}
[3532]731    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]732
[13568]733fi
734
735if [ ${config} == "AMM12" ] && [ ${DO_REPRO} == "1" ] ;  then
[3680]736## Reproducibility tests for AMM12
737    export TEST_NAME="REPRO_8_4"
[9658]738    cd ${MAIN_DIR}
[3520]739    cd ${SETTE_DIR}
[4252]740    . ./prepare_exe_dir.sh
[10755]741    set_valid_dir
[10698]742    clean_valid_dir
[3520]743    JOB_FILE=${EXE_DIR}/run_job.sh
744    NPROC=32
[4245]745    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]746    cd ${EXE_DIR}
[9019]747    set_namelist namelist_cfg cn_exp \"AMM12_84\"
[4147]748    set_namelist namelist_cfg nn_it000 1
[13559]749    set_namelist namelist_cfg nn_itend ${ITEND}
[4147]750    set_namelist namelist_cfg jpni 8
751    set_namelist namelist_cfg jpnj 4
[10573]752    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]753    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
754    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]755    cd ${SETTE_DIR}
[10755]756    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]757    cd ${SETTE_DIR}
758    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
759
760    cd ${SETTE_DIR}
[3680]761    export TEST_NAME="REPRO_4_8"
[4252]762    . ./prepare_exe_dir.sh
[10755]763    set_valid_dir
[10698]764    clean_valid_dir
[5478]765    JOB_FILE=${EXE_DIR}/run_job.sh
766    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[3520]767    cd ${EXE_DIR}
[9019]768    set_namelist namelist_cfg cn_exp \"AMM12_48\"
[4147]769    set_namelist namelist_cfg nn_it000 1
[13559]770    set_namelist namelist_cfg nn_itend ${ITEND}
[4147]771    set_namelist namelist_cfg jpni 4
772    set_namelist namelist_cfg jpnj 8
[10573]773    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]774    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
775    set_xio_using_server iodef.xml ${USING_MPMD}
[3520]776    cd ${SETTE_DIR}
[10755]777    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[3520]778    cd ${SETTE_DIR}
[3532]779    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[3520]780fi
781
782
[9518]783# ---------
[14873]784# ORCA2_SAS_ICE
[9518]785# ---------
[14873]786if [ ${config} == "SAS" ] ;  then
[13559]787    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
788    then
789   ITEND=16   # 1 day
790    else
791   ITEND=256  # 16 days
792    fi
793    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]794    cd ${MAIN_DIR}
[12569]795    #
796    # syncronisation if target directory/file exist (not done by makenemo)
797    sync_config  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
798    clean_config ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
799    #
[14867]800    # ORCA2_SAS_ICE uses linssh so remove key_qco if added by default
801    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
[14873]802fi
803if [ ${config} == "SAS" ] && [ ${DO_RESTART} == "1" ] ;  then
804## Restartability tests
805    export TEST_NAME="LONG"
[4147]806    cd ${SETTE_DIR}
[4252]807    . ./prepare_exe_dir.sh
[10755]808    set_valid_dir
[10698]809    clean_valid_dir
[4147]810    JOB_FILE=${EXE_DIR}/run_job.sh
811    NPROC=32
[7646]812    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
[4147]813    cd ${EXE_DIR}
814    set_namelist namelist_cfg cn_exp \"SAS\"
815    set_namelist namelist_cfg nn_it000 1
[13559]816    set_namelist namelist_cfg nn_itend ${ITEND}
817    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]818    set_namelist namelist_cfg jpni 4
819    set_namelist namelist_cfg jpnj 8
[10573]820    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9019]821    set_namelist namelist_ice_cfg ln_icediachk .true.
[14869]822    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
823    set_xio_using_server iodef.xml ${USING_MPMD}
[4147]824    cd ${SETTE_DIR}
[10755]825    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4147]826
827    cd ${SETTE_DIR}
828    export TEST_NAME="SHORT"
[4252]829    . ./prepare_exe_dir.sh
[10755]830    set_valid_dir
[10698]831    clean_valid_dir
[4147]832    cd ${EXE_DIR}
833    set_namelist namelist_cfg cn_exp \"SAS\"
[13559]834    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
835    set_namelist namelist_cfg nn_itend ${ITEND}
836    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[7646]837    set_namelist namelist_cfg jpni 4
838    set_namelist namelist_cfg jpnj 8
[10573]839    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[7646]840    set_namelist namelist_cfg ln_rstart .true.
[4147]841    set_namelist namelist_cfg nn_rstctl 2
[9019]842    set_namelist namelist_cfg nn_date0 010109
[13559]843    set_namelist namelist_cfg cn_ocerst_in \"SAS_${ITRST}_restart\"
844    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_${ITRST}_restart_ice\"
[14869]845    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
846    set_xio_using_server iodef.xml ${USING_MPMD}
[7646]847    for (( i=1; i<=$NPROC; i++)) ; do
848        L_NPROC=$(( $i - 1 ))
849        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]850        ln -sf ../LONG/SAS_${ITRST}_restart_${L_NPROC}.nc .
851        ln -sf ../LONG/SAS_${ITRST}_restart_ice_${L_NPROC}.nc .
[7646]852    done
[4147]853    cd ${SETTE_DIR}
[10755]854    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4147]855    cd ${SETTE_DIR}
856    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
857
[13568]858fi
859
860if [ ${config} == "SAS" ] && [ ${DO_REPRO} == "1" ] ;  then
[9518]861## Reproducibility tests
[13559]862    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
863    then
864   ITEND=16  # 1 day
865    else
866   ITEND=80  # 5 days
867    fi
[9518]868    export TEST_NAME="REPRO_4_8"
[9658]869    cd ${MAIN_DIR}
[4990]870    cd ${SETTE_DIR}
871    . ./prepare_exe_dir.sh
[10755]872    set_valid_dir
[10698]873    clean_valid_dir
[4990]874    JOB_FILE=${EXE_DIR}/run_job.sh
[9518]875    NPROC=32
[4990]876    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
877    cd ${EXE_DIR}
[9518]878    set_namelist namelist_cfg cn_exp \"SAS_48\"
[4990]879    set_namelist namelist_cfg nn_it000 1
[13559]880    set_namelist namelist_cfg nn_itend ${ITEND}
[9518]881    set_namelist namelist_cfg jpni 4
882    set_namelist namelist_cfg jpnj 8
[10573]883    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]884    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
885    set_xio_using_server iodef.xml ${USING_MPMD}
[4990]886    cd ${SETTE_DIR}
[10755]887    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4990]888    cd ${SETTE_DIR}
889    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
[9019]890
[4990]891    cd ${SETTE_DIR}
[7646]892    export TEST_NAME="REPRO_8_4"
[4990]893    . ./prepare_exe_dir.sh
[10755]894    set_valid_dir
[10698]895    clean_valid_dir
[4990]896    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]897    NPROC=32
[4990]898    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
899    cd ${EXE_DIR}
[9518]900    set_namelist namelist_cfg cn_exp \"SAS_84\"
[4990]901    set_namelist namelist_cfg nn_it000 1
[13559]902    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]903    set_namelist namelist_cfg jpni 8
904    set_namelist namelist_cfg jpnj 4
[10573]905    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]906    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
907    set_xio_using_server iodef.xml ${USING_MPMD}
[4990]908    cd ${SETTE_DIR}
[10755]909    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4990]910    cd ${SETTE_DIR}
911    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
912
913fi
914
[9518]915
916# --------------
[9663]917# ORCA2_ICE_OBS
[9518]918# --------------
[4990]919## Test assimilation interface code, OBS and ASM for reproducibility
920## Restartability not tested (ASM code not restartable while increments are being applied)
[14873]921if [ ${config} == "ORCA2_ICE_OBS" ] ;  then
[9518]922## Reproducibility tests
[13559]923    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
924    then
925   ITEND=16  # 1 day
926    else
927   ITEND=80  # 5 days
928    fi
[9658]929    cd ${MAIN_DIR}
[12569]930    #
931    # syncronisation if target directory/file exist (not done by makenemo)
932    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
933    clean_config ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
934    #
[14867]935    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}"
[14873]936fi
937if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ;  then
938## Reproducibility tests
939    export TEST_NAME="REPRO_4_8"
[4990]940    cd ${SETTE_DIR}
941    . ./prepare_exe_dir.sh
[10755]942    set_valid_dir
[10698]943    clean_valid_dir
[4990]944    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]945    NPROC=32
[4990]946    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
947    cd ${EXE_DIR}
[9019]948    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
[4990]949    set_namelist namelist_cfg nn_it000 1
[13559]950    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]951    set_namelist namelist_cfg ln_read_cfg .true.
[4990]952    set_namelist namelist_cfg jpni 4
[7646]953    set_namelist namelist_cfg jpnj 8
[10573]954    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
955    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[6140]956    set_namelist namelist_cfg ln_diaobs .true.
[4990]957    set_namelist namelist_cfg ln_t3d .true.
958    set_namelist namelist_cfg ln_s3d .true.
959    set_namelist namelist_cfg ln_sst .true.
960    set_namelist namelist_cfg ln_sla .true.
[6140]961    set_namelist namelist_cfg ln_sic .true.
962    set_namelist namelist_cfg ln_vel3d .true.
[4990]963    set_namelist namelist_cfg ln_bkgwri .true.
964    set_namelist namelist_cfg ln_trainc .true.
965    set_namelist namelist_cfg ln_dyninc .true.
966    set_namelist namelist_cfg ln_sshinc .true.
967    set_namelist namelist_cfg ln_asmiau .true.
[9663]968    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
[7722]969    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]970    set_namelist namelist_top_cfg ln_trcbc  .false.
[7722]971    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
972    # if not you need input files, and for tests is not necessary
973    set_namelist namelist_pisces_cfg ln_varpar .false.
974    set_namelist namelist_pisces_cfg ln_ironsed .false.
975    set_namelist namelist_pisces_cfg ln_ironice .false.
976    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[14869]977    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
978    set_xio_using_server iodef.xml ${USING_MPMD}
[4990]979    cd ${SETTE_DIR}
[10755]980    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4990]981    cd ${SETTE_DIR}
982    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
983
984   cd ${SETTE_DIR}
[7646]985    export TEST_NAME="REPRO_8_4"
[4990]986    . ./prepare_exe_dir.sh
[10755]987    set_valid_dir
[10698]988    clean_valid_dir
[4990]989    JOB_FILE=${EXE_DIR}/run_job.sh
[7646]990    NPROC=32
[4990]991    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
992    cd ${EXE_DIR}
[9019]993    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
[4990]994    set_namelist namelist_cfg nn_it000 1
[13559]995    set_namelist namelist_cfg nn_itend ${ITEND}
[7646]996    set_namelist namelist_cfg ln_read_cfg .true.
997    set_namelist namelist_cfg jpni 8
998    set_namelist namelist_cfg jpnj 4
[10573]999    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1000    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
[6140]1001    set_namelist namelist_cfg ln_diaobs .true.
[4990]1002    set_namelist namelist_cfg ln_t3d .true.
1003    set_namelist namelist_cfg ln_s3d .true.
1004    set_namelist namelist_cfg ln_sst .true.
1005    set_namelist namelist_cfg ln_sla .true.
[6140]1006    set_namelist namelist_cfg ln_sic .true.
1007    set_namelist namelist_cfg ln_vel3d .true.
[4990]1008    set_namelist namelist_cfg ln_bkgwri .true.
1009    set_namelist namelist_cfg ln_trainc .true.
1010    set_namelist namelist_cfg ln_dyninc .true.
1011    set_namelist namelist_cfg ln_sshinc .true.
1012    set_namelist namelist_cfg ln_asmiau .true.
[9663]1013    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
[7722]1014    set_namelist namelist_top_cfg ln_trcdta .false.
[12428]1015    set_namelist namelist_top_cfg ln_trcbc  .false.
[7722]1016    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1017    # if not you need input files, and for tests is not necessary
1018    set_namelist namelist_pisces_cfg ln_varpar .false.
1019    set_namelist namelist_pisces_cfg ln_ironsed .false.
1020    set_namelist namelist_pisces_cfg ln_ironice .false.
1021    set_namelist namelist_pisces_cfg ln_hydrofe .false.
[14869]1022    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1023    set_xio_using_server iodef.xml ${USING_MPMD}
[4990]1024    cd ${SETTE_DIR}
[10755]1025    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[4990]1026    cd ${SETTE_DIR}
1027    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1028fi
[5589]1029
[9483]1030# ------------
[9663]1031# AGRIF ICE
[9483]1032# -----------
[14873]1033if [ ${config} == "AGRIF" ] ;  then
[13559]1034    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
1035    then
1036   ITEND=4   # 6h
1037    else
1038   ITEND=20  # 1d and 6h
1039    fi
1040    ITRST=$(   printf "%08d" $(( ${ITEND} / 2 )) )
1041    ITRST_1=$( printf "%08d" $(( ${ITEND} / 2 )) )
1042    ITRST_2=$( printf "%08d" $(( ${ITEND} * 4 / 2 )) )
1043    ITRST_3=$( printf "%08d" $(( ${ITEND} * 4 * 3 / 2 )) )
[9658]1044    cd ${MAIN_DIR}
[12569]1045    #
1046    # syncronisation if target directory/file exist (not done by makenemo)
1047    sync_config  AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1048    clean_config AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1049    #
[14867]1050    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
[14873]1051fi
1052if [ ${config} == "AGRIF" ] && [ ${DO_RESTART} == "1" ] ;  then
1053## Restartability tests
1054    export TEST_NAME="LONG"
[9483]1055    cd ${SETTE_DIR}
1056    . ./prepare_exe_dir.sh
[10755]1057    set_valid_dir
[10698]1058    clean_valid_dir
[9483]1059    JOB_FILE=${EXE_DIR}/run_job.sh
[9776]1060    NPROC=16
[9483]1061    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1062    cd ${EXE_DIR}
1063    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
1064    set_namelist namelist_cfg nn_it000 1
[13559]1065    set_namelist namelist_cfg nn_itend ${ITEND}
1066    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[10573]1067    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9483]1068    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
1069    set_namelist 1_namelist_cfg nn_it000 1
[13559]1070    set_namelist 1_namelist_cfg nn_itend ${ITEND}
1071    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[10573]1072    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
[9483]1073    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
1074    set_namelist 2_namelist_cfg nn_it000 1
[13559]1075    set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 ))
1076    set_namelist 2_namelist_cfg nn_stock $(( ${ITEND} * 4 / 2 ))
[10573]1077    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
[9776]1078    set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\"
1079    set_namelist 3_namelist_cfg nn_it000 1
[13559]1080    set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 ))
1081    set_namelist 3_namelist_cfg nn_stock $(( ${ITEND} * 4 * 3 / 2 ))
[10573]1082    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
[9507]1083
[14869]1084    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1085    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1086    cd ${SETTE_DIR}
[10755]1087    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1088   
1089    cd ${SETTE_DIR}
1090    export TEST_NAME="SHORT"
1091    . ./prepare_exe_dir.sh
[10755]1092    set_valid_dir
[10698]1093    clean_valid_dir
[9483]1094    cd ${EXE_DIR}
1095    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
[13559]1096    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
1097    set_namelist namelist_cfg nn_itend ${ITEND}
1098    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[10573]1099    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9483]1100    set_namelist namelist_cfg ln_rstart .true.
1101    set_namelist namelist_cfg nn_rstctl 2
1102    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
[13559]1103    set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
1104    set_namelist 1_namelist_cfg nn_itend ${ITEND}
1105    set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[10573]1106    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
[9483]1107    set_namelist 1_namelist_cfg ln_rstart .true.
1108    set_namelist 1_namelist_cfg nn_rstctl 2
1109    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
[13559]1110    set_namelist 2_namelist_cfg nn_it000 $(( ${ITEND} * 4 / 2 + 1 ))
1111    set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 ))
1112    set_namelist 2_namelist_cfg nn_stock $(( ${ITEND} * 4 / 2 ))
[10573]1113    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
[9483]1114    set_namelist 2_namelist_cfg ln_rstart .true.
1115    set_namelist 2_namelist_cfg nn_rstctl 2
[9776]1116    set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\"
[13559]1117    set_namelist 3_namelist_cfg nn_it000 $(( ${ITEND} * 4 * 3 / 2 + 1 ))
1118    set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 ))
1119    set_namelist 3_namelist_cfg nn_stock $(( ${ITEND} * 4 * 3 / 2 ))
[10573]1120    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
[9776]1121    set_namelist 3_namelist_cfg ln_rstart .true.
1122    set_namelist 3_namelist_cfg nn_rstctl 2
[13559]1123    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST}_restart\"
1124    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST}_restart_ice\"
1125    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_1}_restart\"
1126    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_1}_restart_ice\"
1127    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_2}_restart\"
1128    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_2}_restart_ice\"
1129    set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_3}_restart\"
1130    set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_3}_restart_ice\"
[9483]1131
1132    for (( i=1; i<=$NPROC; i++)) ; do
1133        L_NPROC=$(( $i - 1 ))
1134        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]1135        ln -sf ../LONG/AGRIF_LONG_${ITRST}_restart_${L_NPROC}.nc .
1136        ln -sf ../LONG/AGRIF_LONG_${ITRST}_restart_ice_${L_NPROC}.nc .
1137        ln -sf ../LONG/1_AGRIF_LONG_${ITRST_1}_restart_${L_NPROC}.nc .
1138        ln -sf ../LONG/1_AGRIF_LONG_${ITRST_1}_restart_ice_${L_NPROC}.nc .
1139        ln -sf ../LONG/2_AGRIF_LONG_${ITRST_2}_restart_${L_NPROC}.nc .
1140        ln -sf ../LONG/2_AGRIF_LONG_${ITRST_2}_restart_ice_${L_NPROC}.nc .
1141        ln -sf ../LONG/3_AGRIF_LONG_${ITRST_3}_restart_${L_NPROC}.nc .
1142        ln -sf ../LONG/3_AGRIF_LONG_${ITRST_3}_restart_ice_${L_NPROC}.nc .
[9483]1143    done
[14869]1144    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1145    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1146    cd ${SETTE_DIR}
[10755]1147    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1148    cd ${SETTE_DIR}
1149    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1150
[13568]1151fi
1152
1153if [ ${config} == "AGRIF" ] && [ ${DO_REPRO} == "1" ] ;  then
[9518]1154## Reproducibility tests
[11800]1155    export TEST_NAME="REPRO_2_8"
[9658]1156    cd ${MAIN_DIR}
[9483]1157    cd ${SETTE_DIR}
1158    . ./prepare_exe_dir.sh
[10755]1159    set_valid_dir
[10698]1160    clean_valid_dir
[9483]1161    JOB_FILE=${EXE_DIR}/run_job.sh
[11800]1162    NPROC=16
[9483]1163    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1164    cd ${EXE_DIR}
[11800]1165    set_namelist namelist_cfg cn_exp \"AGRIF_28\"
[9483]1166    set_namelist namelist_cfg nn_it000 1
[13559]1167    set_namelist namelist_cfg nn_itend ${ITEND}
[11800]1168    set_namelist namelist_cfg jpni 2
[9483]1169    set_namelist namelist_cfg jpnj 8
[10573]1170    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[11800]1171    set_namelist 1_namelist_cfg cn_exp \"AGRIF_28\"
[9483]1172    set_namelist 1_namelist_cfg nn_it000 1
[13559]1173    set_namelist 1_namelist_cfg nn_itend ${ITEND}
[11800]1174    set_namelist 1_namelist_cfg jpni 2
[9483]1175    set_namelist 1_namelist_cfg jpnj 8
[10573]1176    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
[11800]1177    set_namelist 2_namelist_cfg cn_exp \"AGRIF_28\"
[9483]1178    set_namelist 2_namelist_cfg nn_it000 1
[13559]1179    set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 ))
[11800]1180    set_namelist 2_namelist_cfg jpni 2
[9483]1181    set_namelist 2_namelist_cfg jpnj 8
[10573]1182    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
[11800]1183    set_namelist 3_namelist_cfg cn_exp \"AGRIF_28\"
[9776]1184    set_namelist 3_namelist_cfg nn_it000 1
[13559]1185    set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 ))
[11800]1186    set_namelist 3_namelist_cfg jpni 2
[9776]1187    set_namelist 3_namelist_cfg jpnj 8
[10573]1188    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
[9483]1189
[14869]1190    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1191    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1192    cd ${SETTE_DIR}
[10755]1193    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1194    cd ${SETTE_DIR}
1195    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1196
1197    cd ${SETTE_DIR}
[11800]1198    export TEST_NAME="REPRO_4_4"
[9483]1199    . ./prepare_exe_dir.sh
[10755]1200    set_valid_dir
[10698]1201    clean_valid_dir
[9483]1202    JOB_FILE=${EXE_DIR}/run_job.sh
[11800]1203    NPROC=16
[9483]1204    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1205    cd ${EXE_DIR}
[11800]1206    set_namelist namelist_cfg cn_exp \"AGRIF_44\"
[9483]1207    set_namelist namelist_cfg nn_it000 1
[13559]1208    set_namelist namelist_cfg nn_itend ${ITEND}
[11800]1209    set_namelist namelist_cfg jpni 4
[9483]1210    set_namelist namelist_cfg jpnj 4
[10573]1211    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[11800]1212    set_namelist 1_namelist_cfg cn_exp \"AGRIF_44\"
[9483]1213    set_namelist 1_namelist_cfg nn_it000 1
[13559]1214    set_namelist 1_namelist_cfg nn_itend ${ITEND}
[11800]1215    set_namelist 1_namelist_cfg jpni 4
[9483]1216    set_namelist 1_namelist_cfg jpnj 4
[10573]1217    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
[11800]1218    set_namelist 2_namelist_cfg cn_exp \"AGRIF_44\"
[9483]1219    set_namelist 2_namelist_cfg nn_it000 1
[13559]1220    set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 ))
[11800]1221    set_namelist 2_namelist_cfg jpni 4
[9483]1222    set_namelist 2_namelist_cfg jpnj 4
[10573]1223    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
[12428]1224    set_namelist 3_namelist_cfg cn_exp \"AGRIF_44\"
[9776]1225    set_namelist 3_namelist_cfg nn_it000 1
[13559]1226    set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 ))
[11800]1227    set_namelist 3_namelist_cfg jpni 4
[9776]1228    set_namelist 3_namelist_cfg jpnj 4
[10573]1229    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
[9483]1230
[14869]1231    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1232    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1233    cd ${SETTE_DIR}
[10755]1234    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1235    cd ${SETTE_DIR}
1236    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1237
[13568]1238fi
1239
1240if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ;  then
[9507]1241## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
[13559]1242    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
1243    then
1244   ITEND=16   # 1d
1245    else
1246   ITEND=150  # 5d and 9h
1247    fi
[9507]1248    export TEST_NAME="ORCA2"
[9658]1249    cd ${MAIN_DIR}
[9483]1250    cd ${SETTE_DIR}
1251    . ./prepare_exe_dir.sh
[10755]1252    set_valid_dir
[10698]1253    clean_valid_dir
[9483]1254    JOB_FILE=${EXE_DIR}/run_job.sh
1255    NPROC=32
1256    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1257    cd ${EXE_DIR}
[9507]1258    set_namelist namelist_cfg cn_exp \"ORCA2\"
[9483]1259    set_namelist namelist_cfg nn_it000 1
[13559]1260    set_namelist namelist_cfg nn_itend ${ITEND}
[10573]1261    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9507]1262
[9483]1263#   Set the number of fine grids to zero:   
1264    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1265
[14869]1266    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1267    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1268    cd ${SETTE_DIR}
[10755]1269    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1270    cd ${SETTE_DIR}
1271    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1272
1273fi
1274
[9525]1275
[9776]1276## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2)
[13568]1277if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ;  then
[9507]1278    export TEST_NAME="ORCA2"
[9658]1279    cd ${MAIN_DIR}
[12569]1280    #
1281    # syncronisation if target directory/file exist (not done by makenemo)
1282    sync_config  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1283    clean_config AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1284    #
[14867]1285    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "key_agrif ${DEL_KEYS}"
[9483]1286    cd ${SETTE_DIR}
1287    . ./prepare_exe_dir.sh
[10755]1288    set_valid_dir
[10698]1289    clean_valid_dir
[9483]1290    JOB_FILE=${EXE_DIR}/run_job.sh
1291    NPROC=32
1292    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1293    cd ${EXE_DIR}
[9507]1294    set_namelist namelist_cfg cn_exp \"ORCA2\"
[9483]1295    set_namelist namelist_cfg nn_it000 1
[13559]1296    set_namelist namelist_cfg nn_itend ${ITEND}
[10573]1297    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9483]1298#
[14869]1299    #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1300    set_xio_using_server iodef.xml ${USING_MPMD}
[9483]1301    cd ${SETTE_DIR}
[10755]1302    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9483]1303    cd ${SETTE_DIR}
1304    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1305
1306fi
1307
[9553]1308# -------
[13382]1309# WED025
[9553]1310# -------
[14873]1311if [ ${config} == "WED025" ] ;  then
[13559]1312    if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ]
1313    then
1314   ITEND=12   # 4h
1315    else
1316   ITEND=720  # 10 days
1317    fi
1318    ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) )
[9658]1319    cd ${MAIN_DIR}
[12569]1320    #
1321    # syncronisation if target directory/file exist (not done by makenemo)
[13382]1322    sync_config  WED025 WED025_ST 'cfgs'
1323    clean_config WED025 WED025_ST 'cfgs'
[12569]1324    #
[14867]1325    # WED025 uses ln_hpg_isf so remove key_qco if added by default
1326    . ./makenemo -m ${CMP_NAM} -n WED025_ST -r WED025 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}"
[14873]1327fi
1328if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ;  then
1329## Restartability tests
1330    export TEST_NAME="LONG"
[9553]1331    cd ${SETTE_DIR}
1332    . ./prepare_exe_dir.sh
[10755]1333    set_valid_dir
[10698]1334    clean_valid_dir
[9553]1335    JOB_FILE=${EXE_DIR}/run_job.sh
1336    NPROC=32
1337    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1338    cd ${EXE_DIR}
[13382]1339    set_namelist namelist_cfg cn_exp \"WED025_LONG\"
[9553]1340    set_namelist namelist_cfg nn_it000 1
[13559]1341    set_namelist namelist_cfg nn_itend ${ITEND}
1342    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[13382]1343    set_namelist namelist_cfg nn_date0 20000115
[9553]1344    set_namelist namelist_cfg jpni 4
1345    set_namelist namelist_cfg jpnj 8
[10573]1346    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[9744]1347    #set_namelist namelist_ice_cfg ln_icediachk .true.
[14869]1348    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1349    set_xio_using_server iodef.xml ${USING_MPMD}
[9553]1350    cd ${SETTE_DIR}
[13382]1351    . ./prepare_job.sh input_WED025.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9553]1352   
1353    cd ${SETTE_DIR}
1354    export TEST_NAME="SHORT"
1355    . ./prepare_exe_dir.sh
[10755]1356    set_valid_dir
[10698]1357    clean_valid_dir
[9553]1358    cd ${EXE_DIR}
[13382]1359    set_namelist namelist_cfg cn_exp \"WED025_SHORT\"
[13559]1360    set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 ))
1361    set_namelist namelist_cfg nn_itend ${ITEND}
1362    set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 ))
[9553]1363    set_namelist namelist_cfg ln_rstart .true.
1364    set_namelist namelist_cfg nn_rstctl 2
1365    set_namelist namelist_cfg jpni 4
1366    set_namelist namelist_cfg jpnj 8
[10573]1367    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[13559]1368    set_namelist namelist_cfg cn_ocerst_in \"WED025_LONG_${ITRST}_restart\"
1369    set_namelist namelist_ice_cfg cn_icerst_in \"WED025_LONG_${ITRST}_restart_ice\"
[9553]1370    for (( i=1; i<=$NPROC; i++)) ; do
1371        L_NPROC=$(( $i - 1 ))
1372        L_NPROC=`printf "%04d\n" ${L_NPROC}`
[13559]1373        ln -sf ../LONG/WED025_LONG_${ITRST}_restart_${L_NPROC}.nc .
1374        ln -sf ../LONG/WED025_LONG_${ITRST}_restart_ice_${L_NPROC}.nc .
[9553]1375    done
[14869]1376    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1377    set_xio_using_server iodef.xml ${USING_MPMD}
[9553]1378    cd ${SETTE_DIR}
[13382]1379    . ./prepare_job.sh input_WED025.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9553]1380    cd ${SETTE_DIR}
1381    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1382
[13568]1383fi
1384
1385if [ ${config} == "WED025" ] && [ ${DO_REPRO} == "1" ] ;  then
[9553]1386## Reproducibility tests
[13382]1387    export TEST_NAME="REPRO_5_6"
[9658]1388    cd ${MAIN_DIR}
[9553]1389    cd ${SETTE_DIR}
1390    . ./prepare_exe_dir.sh
[10755]1391    set_valid_dir
[10698]1392    clean_valid_dir
[9553]1393    JOB_FILE=${EXE_DIR}/run_job.sh
1394    NPROC=32
1395    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1396    cd ${EXE_DIR}
[13382]1397    set_namelist namelist_cfg cn_exp \"WED025_56\"
[9553]1398    set_namelist namelist_cfg nn_it000 1
[13559]1399    set_namelist namelist_cfg nn_itend ${ITEND}
[13382]1400    set_namelist namelist_cfg nn_date0 20000115
1401    set_namelist namelist_cfg jpni 6
1402    set_namelist namelist_cfg jpnj 7
[10573]1403    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]1404    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1405    set_xio_using_server iodef.xml ${USING_MPMD}
[9553]1406    cd ${SETTE_DIR}
[13382]1407    . ./prepare_job.sh input_WED025.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9553]1408    cd ${SETTE_DIR}
1409    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1410
1411    cd ${SETTE_DIR}
1412    export TEST_NAME="REPRO_8_4"
1413    . ./prepare_exe_dir.sh
[10755]1414    set_valid_dir
[10698]1415    clean_valid_dir
[9553]1416    JOB_FILE=${EXE_DIR}/run_job.sh
1417    NPROC=32
1418    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1419    cd ${EXE_DIR}
[13382]1420    set_namelist namelist_cfg cn_exp \"WED025_84\"
[9553]1421    set_namelist namelist_cfg nn_it000 1
[13559]1422    set_namelist namelist_cfg nn_itend ${ITEND}
[13382]1423    set_namelist namelist_cfg nn_date0 20000115
[9553]1424    set_namelist namelist_cfg jpni 8
1425    set_namelist namelist_cfg jpnj 4
[10573]1426    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
[14869]1427    set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false.
1428    set_xio_using_server iodef.xml ${USING_MPMD}
[9553]1429    cd ${SETTE_DIR}
[13382]1430    . ./prepare_job.sh input_WED025.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
[9553]1431    cd ${SETTE_DIR}
1432    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1433fi
1434
1435
[3520]1436done
[13568]1437#
1438# Return to SETTE_DIR (last fcm_job.sh will have moved to EXE_DIR)
1439cd ${SETTE_DIR}
Note: See TracBrowser for help on using the repository browser.