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 @ 14869

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

Branch: sette_ticket2673. Added missing export for NEMO_VALID. Also tidied up scripts with new set_namelist_opt function and adapting set_xio_using_server function to accept yes/no as well as true/false

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