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 – NEMO

source: utils/CI/sette/sette_reference-configurations.sh @ 14244

Last change on this file since 14244 was 14244, checked in by smasson, 4 years ago

sette: merge with sette_wave

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