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 @ 13951

Last change on this file since 13951 was 13951, checked in by emanuelaclementi, 4 years ago

restored ORCA2_ICE_PISCES options to use wave fields - ticket #2155 #2339

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