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

Last change on this file since 11497 was 11497, checked in by smueller, 14 months ago

Merge of branch fix_ticket2302_sette into main SETTE version (ticket #2302)

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