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

source: utils/CI/sette_wave/sette_reference-configurations.sh @ 14206

Last change on this file since 14206 was 14206, checked in by techene, 4 years ago

add SWG to sette with key_qco only, add a -q option to run with NO vertical key (key_linssh, key_qco)

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