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

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

merge sette_top_pisces_lbc into sette + add ifort bathc template for MetO computer

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