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

Last change on this file since 12474 was 12474, checked in by mathiot, 9 months ago

merge sette_ticket1927 to sette (ticket #1927)

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