source: utils/CI/sette_ticket2452/sette_reference-configurations.sh @ 12818

Last change on this file since 12818 was 12818, checked in by gsamson, 7 months ago

modifications to activate ABL with ORCA2_ICE_PISCES cfg in SETTE tests; inputs files (ORCA2_ABL_v4.0.tar) not yet available on Zenodo; allow node number > 1 with mercator batch templates (ticket #2452)

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