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

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

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

Last change on this file since 14823 was 14823, checked in by francesca, 3 years ago

remove key_mpi3

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