source: utils/CI/sette_ticket2304/sette_reference-configurations.sh @ 12422

Last change on this file since 12422 was 12422, checked in by mathiot, 12 months ago

merge sync_mysrc and sync_expcfg into sync_config, add a clean_config function and add option in sette.sh to activate synchronisation of MY_SCR/EXPREF with CONFIG_ST/EXP00/MY_SRC (-s option) or to clean a config with makenemo clean (-c option)

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