source: branches/NERC/dev_sette_NERC/sette_reference-configurations.sh @ 13406

Last change on this file since 13406 was 13406, checked in by smueller, 17 months ago

Addition of a SETTE test configuration for the testing of the ORCA2_MEDUSA reference configuration

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