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

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

Branch: sette_ticket2673. Added EXTRA_HALO support to all configurations except AGRIF_DEMO (pending changes to nested domin)

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