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_ticket2459 – NEMO

source: utils/CI/sette_ticket2459/sette_reference-configurations.sh @ 13378

Last change on this file since 13378 was 13378, checked in by mathiot, 4 years ago

ticket

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