New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_reference-configurations.sh in utils/CI/sette – NEMO

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

Last change on this file since 12569 was 12569, checked in by mathiot, 2 years ago

ticket #2304: merge branch sette_ticket2304 into sette (thank you Simon for the review and all the suggestions you made). It include synchronisation and cleaning option between the REF config and the _ST config to ease the work when the reference configurations are changed and display bug in sette_check_avail_rev

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