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

Last change on this file since 15030 was 15030, checked in by jchanut, 6 months ago

#2698, this restores restartability testing of Age passive tracer in AGRIF_DEMO. Added nn_hls=2 and other tests with AGRIF since there is no reason we do not succeed in making these work. Timing option is still missing with AGRIF though.

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