source: utils/CI/sette_ticket2304/sette_reference-configurations.sh @ 12445

Last change on this file since 12445 was 12445, checked in by mathiot, 12 months ago

update to the head of sette (ticket #2304)

  • Property svn:executable set to *
File size: 58.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# 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 ln_wave .true.
334    set_namelist namelist_cfg ln_cdgw .true.
335    set_namelist namelist_cfg ln_sdw  .true.
336    set_namelist namelist_cfg nn_sdrift 1
337    set_namelist namelist_cfg ln_stcor .true.
338    set_namelist namelist_cfg ln_tauwoc .true.
339    #
340    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
341    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
342    #
343    set_namelist namelist_ice_cfg ln_icediachk .true.
344    set_namelist namelist_top_cfg ln_trcdta .false.
345    set_namelist namelist_top_cfg ln_trcbc  .false.
346    # put ln_ironsed, ln_hydrofe to false
347    # if not you need input files, and for tests is not necessary
348    set_namelist namelist_pisces_cfg ln_varpar .false.
349    set_namelist namelist_pisces_cfg ln_ironsed .false.
350    set_namelist namelist_pisces_cfg ln_ironice .false.
351    set_namelist namelist_pisces_cfg ln_hydrofe .false.
352    # put ln_pisdmp to false : no restoring to global mean value
353    set_namelist namelist_pisces_cfg ln_pisdmp .false.
354    if [ ${USING_MPMD} == "yes" ] ; then
355       set_xio_using_server iodef.xml true
356    else
357       set_xio_using_server iodef.xml false
358    fi
359    cd ${SETTE_DIR}
360    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
361   
362    cd ${SETTE_DIR}
363    export TEST_NAME="SHORT"
364    . ./prepare_exe_dir.sh
365    set_valid_dir
366    clean_valid_dir
367    cd ${EXE_DIR}
368    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
369    set_namelist namelist_cfg nn_it000 497
370    set_namelist namelist_cfg nn_itend 992
371    set_namelist namelist_cfg nn_stock 496
372    set_namelist namelist_cfg ln_rstart .true.
373    set_namelist namelist_cfg nn_rstctl 2
374    set_namelist namelist_cfg jpni 4
375    set_namelist namelist_cfg jpnj 8
376    set_namelist namelist_cfg sn_cfctl%l_config .true.
377    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
378    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
379    set_namelist namelist_cfg nn_test_icebergs -1
380    set_namelist namelist_cfg ln_wave .true.
381    set_namelist namelist_cfg ln_cdgw .true.
382    set_namelist namelist_cfg ln_sdw  .true.
383    set_namelist namelist_cfg nn_sdrift 1
384    set_namelist namelist_cfg ln_stcor .true.
385    set_namelist namelist_cfg ln_tauwoc .true.
386    #
387    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
388    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
389    #
390    set_namelist namelist_ice_cfg ln_icediachk .true.
391    set_namelist namelist_top_cfg ln_rsttr .true.
392    set_namelist namelist_top_cfg nn_rsttr 2
393    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000496_restart\"
394    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000496_restart_trc\"
395    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000496_restart_ice\"
396    set_namelist namelist_top_cfg ln_trcbc  .false.
397    # put ln_ironsed, ln_hydrofe to false
398    # if not you need input files, and for tests is not necessary
399    set_namelist namelist_pisces_cfg ln_varpar .false.
400    set_namelist namelist_pisces_cfg ln_ironsed .false.
401    set_namelist namelist_pisces_cfg ln_ironice .false.
402    set_namelist namelist_pisces_cfg ln_hydrofe .false.
403    # put ln_pisdmp to false : no restoring to global mean value
404    set_namelist namelist_pisces_cfg ln_pisdmp .false.
405    for (( i=1; i<=$NPROC; i++)) ; do
406        L_NPROC=$(( $i - 1 ))
407        L_NPROC=`printf "%04d\n" ${L_NPROC}`
408        ln -sf ../LONG/O2L3P_LONG_00000496_restart_${L_NPROC}.nc .
409        ln -sf ../LONG/O2L3P_LONG_00000496_restart_trc_${L_NPROC}.nc .
410        ln -sf ../LONG/O2L3P_LONG_00000496_restart_ice_${L_NPROC}.nc .
411        if [ ${USING_ICEBERGS} == "yes" ]
412            then
413             ln -sf ../LONG/O2L3P_LONG_icebergs_00000496_restart_${L_NPROC}.nc O2L3P_LONG_00000496_restart_icebergs_${L_NPROC}.nc
414        fi
415    done
416    if [ ${USING_MPMD} == "yes" ] ; then
417       set_xio_using_server iodef.xml true
418    else
419       set_xio_using_server iodef.xml false
420    fi
421    cd ${SETTE_DIR}
422    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
423    cd ${SETTE_DIR}
424    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
425
426## Reproducibility tests for ORCA2_ICE_PISCES
427    export TEST_NAME="REPRO_4_8"
428    cd ${MAIN_DIR}
429    cd ${SETTE_DIR}
430    . ./param.cfg
431    . ./all_functions.sh
432    . ./prepare_exe_dir.sh
433    set_valid_dir
434    clean_valid_dir
435    JOB_FILE=${EXE_DIR}/run_job.sh
436    NPROC=32
437    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
438    cd ${EXE_DIR}
439    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
440    set_namelist namelist_cfg nn_it000 1
441    set_namelist namelist_cfg nn_itend 992
442    set_namelist namelist_cfg jpni 4
443    set_namelist namelist_cfg jpnj 8
444    set_namelist namelist_cfg sn_cfctl%l_config .true.
445    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
446    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
447    set_namelist namelist_cfg ln_wave .true.
448    set_namelist namelist_cfg ln_cdgw .true.
449    set_namelist namelist_cfg ln_sdw  .true.
450    set_namelist namelist_cfg nn_sdrift 1
451    set_namelist namelist_cfg ln_stcor .true.
452    set_namelist namelist_cfg ln_tauwoc .true.
453
454    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
455    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
456
457    set_namelist namelist_top_cfg ln_trcdta .false.
458    set_namelist namelist_top_cfg ln_trcbc  .false.
459    # put ln_ironsed, ln_hydrofe to false
460    # if not you need input files, and for tests is not necessary
461    set_namelist namelist_pisces_cfg ln_varpar .false.
462    set_namelist namelist_pisces_cfg ln_ironsed .false.
463    set_namelist namelist_pisces_cfg ln_ironice .false.
464    set_namelist namelist_pisces_cfg ln_hydrofe .false.
465    # put ln_pisdmp to false : no restoring to global mean value
466    set_namelist namelist_pisces_cfg ln_pisdmp .false.
467    if [ ${USING_MPMD} == "yes" ] ; then
468       set_xio_using_server iodef.xml true
469    else
470       set_xio_using_server iodef.xml false
471    fi
472    cd ${SETTE_DIR}
473    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
474    cd ${SETTE_DIR}
475    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
476
477    cd ${SETTE_DIR}
478    export TEST_NAME="REPRO_8_4"
479    . ./prepare_exe_dir.sh
480    set_valid_dir
481    clean_valid_dir
482    JOB_FILE=${EXE_DIR}/run_job.sh
483    NPROC=32
484    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
485    cd ${EXE_DIR}
486    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
487    set_namelist namelist_cfg nn_it000 1
488    set_namelist namelist_cfg nn_itend 992
489    set_namelist namelist_cfg jpni 8
490    set_namelist namelist_cfg jpnj 4
491    set_namelist namelist_cfg sn_cfctl%l_config .true.
492    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
493    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
494    set_namelist namelist_cfg ln_wave .true.
495    set_namelist namelist_cfg ln_cdgw .true.
496    set_namelist namelist_cfg ln_sdw  .true.
497    set_namelist namelist_cfg nn_sdrift 1
498    set_namelist namelist_cfg ln_stcor .true.
499    set_namelist namelist_cfg ln_tauwoc .true.
500
501    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
502    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
503
504    set_namelist namelist_top_cfg ln_trcdta .false.
505    set_namelist namelist_top_cfg ln_trcbc  .false.
506    # put ln_ironsed, ln_hydrofe to false
507    # if not you need input files, and for tests is not necessary
508    set_namelist namelist_pisces_cfg ln_varpar .false.
509    set_namelist namelist_pisces_cfg ln_ironsed .false.
510    set_namelist namelist_pisces_cfg ln_ironice .false.
511    set_namelist namelist_pisces_cfg ln_hydrofe .false.
512    # put ln_pisdmp to false : no restoring to global mean value
513    set_namelist namelist_pisces_cfg ln_pisdmp .false.
514    if [ ${USING_MPMD} == "yes" ] ; then
515       set_xio_using_server iodef.xml true
516    else
517       set_xio_using_server iodef.xml false
518    fi
519    cd ${SETTE_DIR}
520    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
521    cd ${SETTE_DIR}
522    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
523fi
524
525# ----------------
526# ORCA2_OFF_PISCES
527# ----------------
528if [ ${config} == "ORCA2_OFF_PISCES" ] ;  then
529## Restartability tests for ORCA2_OFF_PISCES
530    export TEST_NAME="LONG"
531    cd ${MAIN_DIR}
532    #
533    # syncronisation if target directory/file exist (not done by makenemo)
534    . ${SETTE_DIR}/all_functions.sh
535    sync_config  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
536    clean_config ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
537    #
538    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
539    cd ${SETTE_DIR}
540    . ./param.cfg
541    . ./all_functions.sh
542    . ./prepare_exe_dir.sh
543    set_valid_dir
544    clean_valid_dir
545    JOB_FILE=${EXE_DIR}/run_job.sh
546    NPROC=32
547    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
548    cd ${EXE_DIR}
549    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
550    set_namelist namelist_cfg nn_it000 1
551    set_namelist namelist_cfg nn_itend 380
552    set_namelist namelist_cfg nn_stock 190
553    set_namelist namelist_cfg jpni 4
554    set_namelist namelist_cfg jpnj 8
555    set_namelist namelist_cfg sn_cfctl%l_config .true.
556    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
557    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
558    set_namelist namelist_cfg ln_qsr_rgb .true.
559    set_namelist namelist_top_cfg ln_trcdta .false.
560    set_namelist namelist_top_cfg ln_trcbc  .false.
561    # put ln_ironsed, ln_hydrofe to false
562    # if not you need input files, and for tests is not necessary
563    set_namelist namelist_pisces_cfg ln_varpar .false.
564    set_namelist namelist_pisces_cfg ln_ironsed .false.
565    set_namelist namelist_pisces_cfg ln_ironice .false.
566    set_namelist namelist_pisces_cfg ln_hydrofe .false.
567    # put ln_pisdmp to false : no restoring to global mean value
568    set_namelist namelist_pisces_cfg ln_pisdmp .false.
569    if [ ${USING_MPMD} == "yes" ] ; then
570       set_xio_using_server iodef.xml true
571    else
572       set_xio_using_server iodef.xml false
573    fi
574    cd ${SETTE_DIR}
575    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
576   
577    cd ${SETTE_DIR}
578    export TEST_NAME="SHORT"
579    . ./prepare_exe_dir.sh
580    set_valid_dir
581    clean_valid_dir
582    cd ${EXE_DIR}
583    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
584    set_namelist namelist_cfg nn_it000 191
585    set_namelist namelist_cfg nn_itend 380
586    set_namelist namelist_cfg nn_stock 190
587    set_namelist namelist_cfg jpni 4
588    set_namelist namelist_cfg jpnj 8
589    set_namelist namelist_cfg sn_cfctl%l_config .true.
590    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
591    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
592    set_namelist namelist_cfg ln_qsr_rgb .true.
593    set_namelist namelist_top_cfg ln_rsttr .true.
594    set_namelist namelist_top_cfg nn_rsttr 2
595    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\"
596    for (( i=1; i<=$NPROC; i++)) ; do
597        L_NPROC=$(( $i - 1 ))
598        L_NPROC=`printf "%04d\n" ${L_NPROC}`
599        ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc .
600    done
601    set_namelist namelist_top_cfg ln_trcbc  .false.
602    # put ln_ironsed, ln_hydrofe to false
603    # if not you need input files, and for tests is not necessary
604    set_namelist namelist_pisces_cfg ln_varpar .false.
605    set_namelist namelist_pisces_cfg ln_ironsed .false.
606    set_namelist namelist_pisces_cfg ln_ironice .false.
607    set_namelist namelist_pisces_cfg ln_hydrofe .false.
608    # put ln_pisdmp to false : no restoring to global mean value
609    set_namelist namelist_pisces_cfg ln_pisdmp .false.
610    if [ ${USING_MPMD} == "yes" ] ; then
611       set_xio_using_server iodef.xml true
612    else
613       set_xio_using_server iodef.xml false
614    fi
615    cd ${SETTE_DIR}
616    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
617    cd ${SETTE_DIR}
618    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
619
620## Reproducibility tests for ORCA2_OFF_PISCES
621    export TEST_NAME="REPRO_4_8"
622    cd ${MAIN_DIR}
623    cd ${SETTE_DIR}
624    . ./param.cfg
625    . ./all_functions.sh
626    . ./prepare_exe_dir.sh
627    set_valid_dir
628    clean_valid_dir
629    JOB_FILE=${EXE_DIR}/run_job.sh
630    NPROC=32
631    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
632    cd ${EXE_DIR}
633    set_namelist namelist_cfg cn_exp \"OFFP_48\"
634    set_namelist namelist_cfg nn_it000 1
635    set_namelist namelist_cfg nn_itend 380
636    set_namelist namelist_cfg jpni 4
637    set_namelist namelist_cfg jpnj 8
638    set_namelist namelist_cfg sn_cfctl%l_config .true.
639    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
640    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
641    set_namelist namelist_cfg ln_qsr_rgb .true.
642    set_namelist namelist_top_cfg ln_trcdta .false.
643    set_namelist namelist_top_cfg ln_trcbc  .false.
644    # put ln_ironsed, ln_hydrofe to false
645    # if not you need input files, and for tests is not necessary
646    set_namelist namelist_pisces_cfg ln_varpar .false.
647    set_namelist namelist_pisces_cfg ln_ironsed .false.
648    set_namelist namelist_pisces_cfg ln_ironice .false.
649    set_namelist namelist_pisces_cfg ln_hydrofe .false.
650    # put ln_pisdmp to false : no restoring to global mean value
651    set_namelist namelist_pisces_cfg ln_pisdmp .false.
652    if [ ${USING_MPMD} == "yes" ] ; then
653       set_xio_using_server iodef.xml true
654    else
655       set_xio_using_server iodef.xml false
656    fi
657    cd ${SETTE_DIR}
658    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
659    cd ${SETTE_DIR}
660    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
661
662    cd ${SETTE_DIR}
663    export TEST_NAME="REPRO_8_4"
664    . ./prepare_exe_dir.sh
665    set_valid_dir
666    clean_valid_dir
667    JOB_FILE=${EXE_DIR}/run_job.sh
668    NPROC=32
669    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
670    cd ${EXE_DIR}
671    set_namelist namelist_cfg cn_exp \"OFFP_84\"
672    set_namelist namelist_cfg nn_it000 1
673    set_namelist namelist_cfg nn_itend 380
674    set_namelist namelist_cfg jpni 8
675    set_namelist namelist_cfg jpnj 4
676    set_namelist namelist_cfg sn_cfctl%l_config .true.
677    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
678    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
679    set_namelist namelist_cfg ln_qsr_rgb .true.
680    set_namelist namelist_top_cfg ln_trcdta .false.
681    set_namelist namelist_top_cfg ln_trcbc  .false.
682    # put ln_ironsed, ln_hydrofe to false
683    # if not you need input files, and for tests is not necessary
684    set_namelist namelist_pisces_cfg ln_varpar .false.
685    set_namelist namelist_pisces_cfg ln_ironsed .false.
686    set_namelist namelist_pisces_cfg ln_ironice .false.
687    set_namelist namelist_pisces_cfg ln_hydrofe .false.
688    # put ln_pisdmp to false : no restoring to global mean value
689    set_namelist namelist_pisces_cfg ln_pisdmp .false.
690    if [ ${USING_MPMD} == "yes" ] ; then
691       set_xio_using_server iodef.xml true
692    else
693       set_xio_using_server iodef.xml false
694    fi
695    cd ${SETTE_DIR}
696    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
697    cd ${SETTE_DIR}
698    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
699fi
700
701# -----
702# AMM12
703# -----
704if [ ${config} == "AMM12" ] ;  then
705    ## Restartability tests for AMM12
706    export TEST_NAME="LONG"
707    cd ${MAIN_DIR}
708    #
709    # syncronisation if target directory/file exist (not done by makenemo)
710    . ${SETTE_DIR}/all_functions.sh
711    sync_config  AMM12 AMM12_ST 'cfgs'
712    clean_config AMM12 AMM12_ST 'cfgs'
713    #
714    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
715    cd ${SETTE_DIR}
716    . ./param.cfg
717    . ./all_functions.sh
718    . ./prepare_exe_dir.sh
719    set_valid_dir
720    clean_valid_dir
721    JOB_FILE=${EXE_DIR}/run_job.sh
722    NPROC=32
723    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
724    cd ${EXE_DIR}
725    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
726    set_namelist namelist_cfg nn_it000 1
727    set_namelist namelist_cfg nn_itend 576
728    set_namelist namelist_cfg nn_stock 288
729    set_namelist namelist_cfg jpni 4
730    set_namelist namelist_cfg jpnj 8
731    set_namelist namelist_cfg sn_cfctl%l_config .true.
732    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
733    if [ ${USING_MPMD} == "yes" ] ; then
734       set_xio_using_server iodef.xml true
735    else
736       set_xio_using_server iodef.xml false
737    fi
738    cd ${SETTE_DIR}
739    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
740
741    cd ${SETTE_DIR}
742    export TEST_NAME="SHORT"
743    . ./prepare_exe_dir.sh
744    set_valid_dir
745    clean_valid_dir
746    cd ${EXE_DIR}
747    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
748    set_namelist namelist_cfg nn_it000 289
749    set_namelist namelist_cfg nn_itend 576
750    set_namelist namelist_cfg jpni 4
751    set_namelist namelist_cfg jpnj 8
752    set_namelist namelist_cfg sn_cfctl%l_config .true.
753    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
754    set_namelist namelist_cfg ln_rstart .true.
755    set_namelist namelist_cfg nn_rstctl 2
756    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
757    set_namelist namelist_cfg nn_date0 20120102
758    for (( i=1; i<=$NPROC; i++)) ; do
759        L_NPROC=$(( $i - 1 ))
760        L_NPROC=`printf "%04d\n" ${L_NPROC}`
761        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
762    done
763    if [ ${USING_MPMD} == "yes" ] ; then
764       set_xio_using_server iodef.xml true
765    else
766       set_xio_using_server iodef.xml false
767    fi
768    cd ${SETTE_DIR}
769    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
770    cd ${SETTE_DIR}
771    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
772
773## Reproducibility tests for AMM12
774    export TEST_NAME="REPRO_8_4"
775    cd ${MAIN_DIR}
776    cd ${SETTE_DIR}
777    . ./param.cfg
778    . ./all_functions.sh
779    . ./prepare_exe_dir.sh
780    set_valid_dir
781    clean_valid_dir
782    JOB_FILE=${EXE_DIR}/run_job.sh
783    NPROC=32
784    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
785    cd ${EXE_DIR}
786    set_namelist namelist_cfg cn_exp \"AMM12_84\"
787    set_namelist namelist_cfg nn_it000 1
788    set_namelist namelist_cfg nn_itend 576
789    set_namelist namelist_cfg jpni 8
790    set_namelist namelist_cfg jpnj 4
791    set_namelist namelist_cfg sn_cfctl%l_config .true.
792    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
793    if [ ${USING_MPMD} == "yes" ] ; then
794       set_xio_using_server iodef.xml true
795    else
796       set_xio_using_server iodef.xml false
797    fi
798    cd ${SETTE_DIR}
799    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
800    cd ${SETTE_DIR}
801    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
802
803    cd ${SETTE_DIR}
804    export TEST_NAME="REPRO_4_8"
805    . ./prepare_exe_dir.sh
806    set_valid_dir
807    clean_valid_dir
808    JOB_FILE=${EXE_DIR}/run_job.sh
809    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
810    cd ${EXE_DIR}
811    set_namelist namelist_cfg cn_exp \"AMM12_48\"
812    set_namelist namelist_cfg nn_it000 1
813    set_namelist namelist_cfg nn_itend 576
814    set_namelist namelist_cfg jpni 4
815    set_namelist namelist_cfg jpnj 8
816    set_namelist namelist_cfg sn_cfctl%l_config .true.
817    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
818    if [ ${USING_MPMD} == "yes" ] ; then
819       set_xio_using_server iodef.xml true
820    else
821       set_xio_using_server iodef.xml false
822    fi
823    cd ${SETTE_DIR}
824    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
825    cd ${SETTE_DIR}
826    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
827fi
828
829
830# ---------
831# ORCA2_SAS
832# ---------
833if [ ${config} == "SAS" ] ;  then
834## Restartability tests
835    export TEST_NAME="LONG"
836    cd ${MAIN_DIR}
837    #
838    # syncronisation if target directory/file exist (not done by makenemo)
839    . ${SETTE_DIR}/all_functions.sh
840    sync_config  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
841    clean_config ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
842    #
843    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
844    cd ${SETTE_DIR}
845    . ./param.cfg
846    . ./all_functions.sh
847    . ./prepare_exe_dir.sh
848    set_valid_dir
849    clean_valid_dir
850    JOB_FILE=${EXE_DIR}/run_job.sh
851    NPROC=32
852    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
853    cd ${EXE_DIR}
854    set_namelist namelist_cfg cn_exp \"SAS\"
855    set_namelist namelist_cfg nn_it000 1
856    set_namelist namelist_cfg nn_itend 256
857    set_namelist namelist_cfg nn_stock 128
858    set_namelist namelist_cfg jpni 4
859    set_namelist namelist_cfg jpnj 8
860    set_namelist namelist_cfg sn_cfctl%l_config .true.
861    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
862    set_namelist namelist_ice_cfg ln_icediachk .true.
863    if [ ${USING_MPMD} == "yes" ] ; then
864       set_xio_using_server iodef.xml true
865    else
866       set_xio_using_server iodef.xml false
867    fi
868    cd ${SETTE_DIR}
869    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
870
871    cd ${SETTE_DIR}
872    export TEST_NAME="SHORT"
873    . ./prepare_exe_dir.sh
874    set_valid_dir
875    clean_valid_dir
876    cd ${EXE_DIR}
877    set_namelist namelist_cfg cn_exp \"SAS\"
878    set_namelist namelist_cfg nn_it000 129
879    set_namelist namelist_cfg nn_itend 256
880    set_namelist namelist_cfg jpni 4
881    set_namelist namelist_cfg jpnj 8
882    set_namelist namelist_cfg sn_cfctl%l_config .true.
883    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
884    set_namelist namelist_cfg ln_rstart .true.
885    set_namelist namelist_cfg nn_rstctl 2
886    set_namelist namelist_cfg nn_date0 010109
887    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000128_restart\"
888    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000128_restart_ice\"
889    if [ ${USING_MPMD} == "yes" ] ; then
890       set_xio_using_server iodef.xml true
891    else
892       set_xio_using_server iodef.xml false
893    fi
894    for (( i=1; i<=$NPROC; i++)) ; do
895        L_NPROC=$(( $i - 1 ))
896        L_NPROC=`printf "%04d\n" ${L_NPROC}`
897        ln -sf ../LONG/SAS_00000128_restart_${L_NPROC}.nc .
898        ln -sf ../LONG/SAS_00000128_restart_ice_${L_NPROC}.nc .
899    done
900    cd ${SETTE_DIR}
901    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
902    cd ${SETTE_DIR}
903    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
904
905## Reproducibility tests
906    export TEST_NAME="REPRO_4_8"
907    cd ${MAIN_DIR}
908    cd ${SETTE_DIR}
909    . ./param.cfg
910    . ./all_functions.sh
911    . ./prepare_exe_dir.sh
912    set_valid_dir
913    clean_valid_dir
914    JOB_FILE=${EXE_DIR}/run_job.sh
915    NPROC=32
916    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
917    cd ${EXE_DIR}
918    set_namelist namelist_cfg cn_exp \"SAS_48\"
919    set_namelist namelist_cfg nn_it000 1
920    set_namelist namelist_cfg nn_itend 80
921    set_namelist namelist_cfg jpni 4
922    set_namelist namelist_cfg jpnj 8
923    set_namelist namelist_cfg sn_cfctl%l_config .true.
924    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
925    if [ ${USING_MPMD} == "yes" ] ; then
926       set_xio_using_server iodef.xml true
927    else
928       set_xio_using_server iodef.xml false
929    fi
930    cd ${SETTE_DIR}
931    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
932    cd ${SETTE_DIR}
933    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
934
935    cd ${SETTE_DIR}
936    export TEST_NAME="REPRO_8_4"
937    . ./prepare_exe_dir.sh
938    set_valid_dir
939    clean_valid_dir
940    JOB_FILE=${EXE_DIR}/run_job.sh
941    NPROC=32
942    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
943    cd ${EXE_DIR}
944    set_namelist namelist_cfg cn_exp \"SAS_84\"
945    set_namelist namelist_cfg nn_it000 1
946    set_namelist namelist_cfg nn_itend 80
947    set_namelist namelist_cfg jpni 8
948    set_namelist namelist_cfg jpnj 4
949    set_namelist namelist_cfg sn_cfctl%l_config .true.
950    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
951    if [ ${USING_MPMD} == "yes" ] ; then
952       set_xio_using_server iodef.xml true
953    else
954       set_xio_using_server iodef.xml false
955    fi
956    cd ${SETTE_DIR}
957    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
958    cd ${SETTE_DIR}
959    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
960
961fi
962
963
964# --------------
965# ORCA2_ICE_OBS
966# --------------
967## Test assimilation interface code, OBS and ASM for reproducibility
968## Restartability not tested (ASM code not restartable while increments are being applied)
969if [ ${config} == "ORCA2_ICE_OBS" ] ; then
970## Reproducibility tests
971    export TEST_NAME="REPRO_4_8"
972    cd ${MAIN_DIR}
973    #
974    # syncronisation if target directory/file exist (not done by makenemo)
975    . ${SETTE_DIR}/all_functions.sh
976    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
977    clean_config ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
978    #
979    . ./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"
980    cd ${SETTE_DIR}
981    . ./param.cfg
982    . ./all_functions.sh
983    . ./prepare_exe_dir.sh
984    set_valid_dir
985    clean_valid_dir
986    JOB_FILE=${EXE_DIR}/run_job.sh
987    NPROC=32
988    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
989    cd ${EXE_DIR}
990    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
991    set_namelist namelist_cfg nn_it000 1
992    set_namelist namelist_cfg nn_itend 80
993    set_namelist namelist_cfg ln_read_cfg .true.
994    set_namelist namelist_cfg jpni 4
995    set_namelist namelist_cfg jpnj 8
996    set_namelist namelist_cfg sn_cfctl%l_config .true.
997    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
998    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
999    set_namelist namelist_cfg ln_diaobs .true.
1000    set_namelist namelist_cfg ln_t3d .true.
1001    set_namelist namelist_cfg ln_s3d .true.
1002    set_namelist namelist_cfg ln_sst .true.
1003    set_namelist namelist_cfg ln_sla .true.
1004    set_namelist namelist_cfg ln_sic .true.
1005    set_namelist namelist_cfg ln_vel3d .true.
1006    set_namelist namelist_cfg ln_bkgwri .true.
1007    set_namelist namelist_cfg ln_trainc .true.
1008    set_namelist namelist_cfg ln_dyninc .true.
1009    set_namelist namelist_cfg ln_sshinc .true.
1010    set_namelist namelist_cfg ln_asmiau .true.
1011    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
1012    set_namelist namelist_top_cfg ln_trcdta .false.
1013    set_namelist namelist_top_cfg ln_trcbc  .false.
1014    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1015    # if not you need input files, and for tests is not necessary
1016    set_namelist namelist_pisces_cfg ln_varpar .false.
1017    set_namelist namelist_pisces_cfg ln_ironsed .false.
1018    set_namelist namelist_pisces_cfg ln_ironice .false.
1019    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1020    if [ ${USING_MPMD} == "yes" ] ; then
1021       set_xio_using_server iodef.xml true
1022    else
1023       set_xio_using_server iodef.xml false
1024    fi
1025    cd ${SETTE_DIR}
1026    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1027    cd ${SETTE_DIR}
1028    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1029
1030   cd ${SETTE_DIR}
1031    export TEST_NAME="REPRO_8_4"
1032    . ./prepare_exe_dir.sh
1033    set_valid_dir
1034    clean_valid_dir
1035    JOB_FILE=${EXE_DIR}/run_job.sh
1036    NPROC=32
1037    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1038    cd ${EXE_DIR}
1039    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
1040    set_namelist namelist_cfg nn_it000 1
1041    set_namelist namelist_cfg nn_itend 80
1042    set_namelist namelist_cfg ln_read_cfg .true.
1043    set_namelist namelist_cfg jpni 8
1044    set_namelist namelist_cfg jpnj 4
1045    set_namelist namelist_cfg sn_cfctl%l_config .true.
1046    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1047    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
1048    set_namelist namelist_cfg ln_diaobs .true.
1049    set_namelist namelist_cfg ln_t3d .true.
1050    set_namelist namelist_cfg ln_s3d .true.
1051    set_namelist namelist_cfg ln_sst .true.
1052    set_namelist namelist_cfg ln_sla .true.
1053    set_namelist namelist_cfg ln_sic .true.
1054    set_namelist namelist_cfg ln_vel3d .true.
1055    set_namelist namelist_cfg ln_bkgwri .true.
1056    set_namelist namelist_cfg ln_trainc .true.
1057    set_namelist namelist_cfg ln_dyninc .true.
1058    set_namelist namelist_cfg ln_sshinc .true.
1059    set_namelist namelist_cfg ln_asmiau .true.
1060    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
1061    set_namelist namelist_top_cfg ln_trcdta .false.
1062    set_namelist namelist_top_cfg ln_trcbc  .false.
1063    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1064    # if not you need input files, and for tests is not necessary
1065    set_namelist namelist_pisces_cfg ln_varpar .false.
1066    set_namelist namelist_pisces_cfg ln_ironsed .false.
1067    set_namelist namelist_pisces_cfg ln_ironice .false.
1068    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1069    if [ ${USING_MPMD} == "yes" ] ; then
1070       set_xio_using_server iodef.xml true
1071    else
1072       set_xio_using_server iodef.xml false
1073    fi
1074    cd ${SETTE_DIR}
1075    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1076    cd ${SETTE_DIR}
1077    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1078fi
1079
1080# ------------
1081# AGRIF ICE
1082# -----------
1083if [ ${config} == "AGRIF" ] ;  then
1084## Restartability tests
1085    export TEST_NAME="LONG"
1086    cd ${MAIN_DIR}
1087    #
1088    # syncronisation if target directory/file exist (not done by makenemo)
1089    . ${SETTE_DIR}/all_functions.sh
1090    sync_config  AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1091    clean_config AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1092    #
1093    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
1094    cd ${SETTE_DIR}
1095    . ./param.cfg
1096    . ./all_functions.sh
1097    . ./prepare_exe_dir.sh
1098    set_valid_dir
1099    clean_valid_dir
1100    JOB_FILE=${EXE_DIR}/run_job.sh
1101    NPROC=16
1102    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1103    cd ${EXE_DIR}
1104    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
1105    set_namelist namelist_cfg nn_it000 1
1106    set_namelist namelist_cfg nn_itend 20
1107    set_namelist namelist_cfg nn_stock 10
1108    set_namelist namelist_cfg sn_cfctl%l_config .true.
1109    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1110    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
1111    set_namelist 1_namelist_cfg nn_it000 1
1112    set_namelist 1_namelist_cfg nn_itend 20
1113    set_namelist 1_namelist_cfg nn_stock 10
1114    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1115    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1116    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
1117    set_namelist 2_namelist_cfg nn_it000 1
1118    set_namelist 2_namelist_cfg nn_itend 80
1119    set_namelist 2_namelist_cfg nn_stock 40
1120    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1121    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1122    set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\"
1123    set_namelist 3_namelist_cfg nn_it000 1
1124    set_namelist 3_namelist_cfg nn_itend 240
1125    set_namelist 3_namelist_cfg nn_stock 120
1126    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1127    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1128
1129    if [ ${USING_MPMD} == "yes" ] ; then
1130       set_xio_using_server iodef.xml true
1131    else
1132       set_xio_using_server iodef.xml false
1133    fi
1134    cd ${SETTE_DIR}
1135    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1136   
1137    cd ${SETTE_DIR}
1138    export TEST_NAME="SHORT"
1139    . ./prepare_exe_dir.sh
1140    set_valid_dir
1141    clean_valid_dir
1142    cd ${EXE_DIR}
1143    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
1144    set_namelist namelist_cfg nn_it000 11
1145    set_namelist namelist_cfg nn_itend 20
1146    set_namelist namelist_cfg nn_stock 10
1147    set_namelist namelist_cfg sn_cfctl%l_config .true.
1148    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1149    set_namelist namelist_cfg ln_rstart .true.
1150    set_namelist namelist_cfg nn_rstctl 2
1151    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
1152    set_namelist 1_namelist_cfg nn_it000 11
1153    set_namelist 1_namelist_cfg nn_itend 20
1154    set_namelist 1_namelist_cfg nn_stock 10
1155    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1156    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1157    set_namelist 1_namelist_cfg ln_rstart .true.
1158    set_namelist 1_namelist_cfg nn_rstctl 2
1159    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1160    set_namelist 2_namelist_cfg nn_it000 41
1161    set_namelist 2_namelist_cfg nn_itend 80
1162    set_namelist 2_namelist_cfg nn_stock 40
1163    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1164    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1165    set_namelist 2_namelist_cfg ln_rstart .true.
1166    set_namelist 2_namelist_cfg nn_rstctl 2
1167    set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\"
1168    set_namelist 3_namelist_cfg nn_it000 121
1169    set_namelist 3_namelist_cfg nn_itend 240
1170    set_namelist 3_namelist_cfg nn_stock 120
1171    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1172    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1173    set_namelist 3_namelist_cfg ln_rstart .true.
1174    set_namelist 3_namelist_cfg nn_rstctl 2
1175    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1176    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1177    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1178    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1179    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1180    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1181    set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1182    set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1183
1184    for (( i=1; i<=$NPROC; i++)) ; do
1185        L_NPROC=$(( $i - 1 ))
1186        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1187        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1188        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1189        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1190        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1191        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1192        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1193        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1194        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1195    done
1196    if [ ${USING_MPMD} == "yes" ] ; then
1197       set_xio_using_server iodef.xml true
1198    else
1199       set_xio_using_server iodef.xml false
1200    fi
1201    cd ${SETTE_DIR}
1202    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1203    cd ${SETTE_DIR}
1204    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1205
1206## Reproducibility tests
1207    export TEST_NAME="REPRO_2_8"
1208    cd ${MAIN_DIR}
1209    cd ${SETTE_DIR}
1210    . ./param.cfg
1211    . ./all_functions.sh
1212    . ./prepare_exe_dir.sh
1213    set_valid_dir
1214    clean_valid_dir
1215    JOB_FILE=${EXE_DIR}/run_job.sh
1216    NPROC=16
1217    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1218    cd ${EXE_DIR}
1219    set_namelist namelist_cfg cn_exp \"AGRIF_28\"
1220    set_namelist namelist_cfg nn_it000 1
1221    set_namelist namelist_cfg nn_itend 20
1222    set_namelist namelist_cfg jpni 2
1223    set_namelist namelist_cfg jpnj 8
1224    set_namelist namelist_cfg sn_cfctl%l_config .true.
1225    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1226    set_namelist 1_namelist_cfg cn_exp \"AGRIF_28\"
1227    set_namelist 1_namelist_cfg nn_it000 1
1228    set_namelist 1_namelist_cfg nn_itend 20
1229    set_namelist 1_namelist_cfg jpni 2
1230    set_namelist 1_namelist_cfg jpnj 8
1231    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1232    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1233    set_namelist 2_namelist_cfg cn_exp \"AGRIF_28\"
1234    set_namelist 2_namelist_cfg nn_it000 1
1235    set_namelist 2_namelist_cfg nn_itend 80
1236    set_namelist 2_namelist_cfg jpni 2
1237    set_namelist 2_namelist_cfg jpnj 8
1238    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1239    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1240    set_namelist 3_namelist_cfg cn_exp \"AGRIF_28\"
1241    set_namelist 3_namelist_cfg nn_it000 1
1242    set_namelist 3_namelist_cfg nn_itend 240
1243    set_namelist 3_namelist_cfg jpni 2
1244    set_namelist 3_namelist_cfg jpnj 8
1245    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1246    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1247
1248    if [ ${USING_MPMD} == "yes" ] ; then
1249       set_xio_using_server iodef.xml true
1250    else
1251       set_xio_using_server iodef.xml false
1252    fi
1253    cd ${SETTE_DIR}
1254    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1255    cd ${SETTE_DIR}
1256    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1257
1258    cd ${SETTE_DIR}
1259    export TEST_NAME="REPRO_4_4"
1260    . ./prepare_exe_dir.sh
1261    set_valid_dir
1262    clean_valid_dir
1263    JOB_FILE=${EXE_DIR}/run_job.sh
1264    NPROC=16
1265    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1266    cd ${EXE_DIR}
1267    set_namelist namelist_cfg cn_exp \"AGRIF_44\"
1268    set_namelist namelist_cfg nn_it000 1
1269    set_namelist namelist_cfg nn_itend 20
1270    set_namelist namelist_cfg jpni 4
1271    set_namelist namelist_cfg jpnj 4
1272    set_namelist namelist_cfg sn_cfctl%l_config .true.
1273    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1274    set_namelist 1_namelist_cfg cn_exp \"AGRIF_44\"
1275    set_namelist 1_namelist_cfg nn_it000 1
1276    set_namelist 1_namelist_cfg nn_itend 20
1277    set_namelist 1_namelist_cfg jpni 4
1278    set_namelist 1_namelist_cfg jpnj 4
1279    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1280    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1281    set_namelist 2_namelist_cfg cn_exp \"AGRIF_44\"
1282    set_namelist 2_namelist_cfg nn_it000 1
1283    set_namelist 2_namelist_cfg nn_itend 80
1284    set_namelist 2_namelist_cfg jpni 4
1285    set_namelist 2_namelist_cfg jpnj 4
1286    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1287    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1288    set_namelist 3_namelist_cfg cn_exp \"AGRIF_44\"
1289    set_namelist 3_namelist_cfg nn_it000 1
1290    set_namelist 3_namelist_cfg nn_itend 240
1291    set_namelist 3_namelist_cfg jpni 4
1292    set_namelist 3_namelist_cfg jpnj 4
1293    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1294    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1295
1296    if [ ${USING_MPMD} == "yes" ] ; then
1297       set_xio_using_server iodef.xml true
1298    else
1299       set_xio_using_server iodef.xml false
1300    fi
1301    cd ${SETTE_DIR}
1302    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1303    cd ${SETTE_DIR}
1304    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1305
1306## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
1307    export TEST_NAME="ORCA2"
1308    cd ${MAIN_DIR}
1309    cd ${SETTE_DIR}
1310    . ./param.cfg
1311    . ./all_functions.sh
1312    . ./prepare_exe_dir.sh
1313    set_valid_dir
1314    clean_valid_dir
1315    JOB_FILE=${EXE_DIR}/run_job.sh
1316    NPROC=32
1317    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1318    cd ${EXE_DIR}
1319    set_namelist namelist_cfg cn_exp \"ORCA2\"
1320    set_namelist namelist_cfg nn_it000 1
1321    set_namelist namelist_cfg nn_itend 150
1322    set_namelist namelist_cfg sn_cfctl%l_config .true.
1323    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1324
1325#   Set the number of fine grids to zero:   
1326    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1327
1328    if [ ${USING_MPMD} == "yes" ] ; then
1329       set_xio_using_server iodef.xml true
1330    else
1331       set_xio_using_server iodef.xml false
1332    fi
1333    cd ${SETTE_DIR}
1334    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1335    cd ${SETTE_DIR}
1336    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1337
1338fi
1339
1340
1341## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2)
1342if [ ${config} == "AGRIF" ] ;  then
1343    export TEST_NAME="ORCA2"
1344    cd ${MAIN_DIR}
1345    #
1346    # syncronisation if target directory/file exist (not done by makenemo)
1347    . ${SETTE_DIR}/all_functions.sh
1348    sync_config  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1349    clean_config AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1350    #
1351    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "key_agrif"
1352    cd ${SETTE_DIR}
1353    . ./param.cfg
1354    . ./all_functions.sh
1355    . ./prepare_exe_dir.sh
1356    set_valid_dir
1357    clean_valid_dir
1358    JOB_FILE=${EXE_DIR}/run_job.sh
1359    NPROC=32
1360    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1361    cd ${EXE_DIR}
1362    set_namelist namelist_cfg cn_exp \"ORCA2\"
1363    set_namelist namelist_cfg nn_it000 1
1364    set_namelist namelist_cfg nn_itend 150
1365    set_namelist namelist_cfg sn_cfctl%l_config .true.
1366    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1367#
1368    if [ ${USING_MPMD} == "yes" ] ; then
1369       set_xio_using_server iodef.xml true
1370    else
1371       set_xio_using_server iodef.xml false
1372    fi
1373    cd ${SETTE_DIR}
1374    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1375    cd ${SETTE_DIR}
1376    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1377
1378fi
1379
1380# -------
1381# SPITZ12
1382# -------
1383if [ ${config} == "SPITZ12" ] ;  then
1384## Restartability tests
1385    export TEST_NAME="LONG"
1386    cd ${MAIN_DIR}
1387    #
1388    # syncronisation if target directory/file exist (not done by makenemo)
1389    . ${SETTE_DIR}/all_functions.sh
1390    sync_config  SPITZ12 SPITZ12_ST 'cfgs'
1391    clean_config SPITZ12 SPITZ12_ST 'cfgs'
1392    #
1393    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
1394    cd ${SETTE_DIR}
1395    . ./param.cfg
1396    . ./all_functions.sh
1397    . ./prepare_exe_dir.sh
1398    set_valid_dir
1399    clean_valid_dir
1400    JOB_FILE=${EXE_DIR}/run_job.sh
1401    NPROC=32
1402    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1403    cd ${EXE_DIR}
1404    set_namelist namelist_cfg cn_exp \"S12_LONG\"
1405    set_namelist namelist_cfg nn_it000 1
1406    set_namelist namelist_cfg nn_itend 240
1407    set_namelist namelist_cfg nn_stock 120
1408    set_namelist namelist_cfg nn_date0 20020101
1409    set_namelist namelist_cfg jpni 4
1410    set_namelist namelist_cfg jpnj 8
1411    set_namelist namelist_cfg sn_cfctl%l_config .true.
1412    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1413    #set_namelist namelist_ice_cfg ln_icediachk .true.
1414    if [ ${USING_MPMD} == "yes" ] ; then
1415       set_xio_using_server iodef.xml true
1416    else
1417       set_xio_using_server iodef.xml false
1418    fi
1419    cd ${SETTE_DIR}
1420    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1421   
1422    cd ${SETTE_DIR}
1423    export TEST_NAME="SHORT"
1424    . ./prepare_exe_dir.sh
1425    set_valid_dir
1426    clean_valid_dir
1427    cd ${EXE_DIR}
1428    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
1429    set_namelist namelist_cfg nn_it000 121
1430    set_namelist namelist_cfg nn_itend 240
1431    set_namelist namelist_cfg nn_stock 120
1432    set_namelist namelist_cfg ln_rstart .true.
1433    set_namelist namelist_cfg nn_rstctl 2
1434    set_namelist namelist_cfg jpni 4
1435    set_namelist namelist_cfg jpnj 8
1436    set_namelist namelist_cfg sn_cfctl%l_config .true.
1437    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1438    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000120_restart\"
1439    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000120_restart_ice\"
1440    for (( i=1; i<=$NPROC; i++)) ; do
1441        L_NPROC=$(( $i - 1 ))
1442        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1443        ln -sf ../LONG/S12_LONG_00000120_restart_${L_NPROC}.nc .
1444        ln -sf ../LONG/S12_LONG_00000120_restart_ice_${L_NPROC}.nc .
1445    done
1446    if [ ${USING_MPMD} == "yes" ] ; then
1447       set_xio_using_server iodef.xml true
1448    else
1449       set_xio_using_server iodef.xml false
1450    fi
1451    cd ${SETTE_DIR}
1452    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1453    cd ${SETTE_DIR}
1454    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1455
1456## Reproducibility tests
1457    export TEST_NAME="REPRO_4_8"
1458    cd ${MAIN_DIR}
1459    cd ${SETTE_DIR}
1460    . ./param.cfg
1461    . ./all_functions.sh
1462    . ./prepare_exe_dir.sh
1463    set_valid_dir
1464    clean_valid_dir
1465    JOB_FILE=${EXE_DIR}/run_job.sh
1466    NPROC=32
1467    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1468    cd ${EXE_DIR}
1469    set_namelist namelist_cfg cn_exp \"S12_48\"
1470    set_namelist namelist_cfg nn_it000 1
1471    set_namelist namelist_cfg nn_itend 120
1472    set_namelist namelist_cfg nn_date0 20020101
1473    set_namelist namelist_cfg jpni 4
1474    set_namelist namelist_cfg jpnj 8
1475    set_namelist namelist_cfg sn_cfctl%l_config .true.
1476    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
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    cd ${SETTE_DIR}
1488    export TEST_NAME="REPRO_8_4"
1489    . ./prepare_exe_dir.sh
1490    set_valid_dir
1491    clean_valid_dir
1492    JOB_FILE=${EXE_DIR}/run_job.sh
1493    NPROC=32
1494    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1495    cd ${EXE_DIR}
1496    set_namelist namelist_cfg cn_exp \"S12_84\"
1497    set_namelist namelist_cfg nn_it000 1
1498    set_namelist namelist_cfg nn_itend 120
1499    set_namelist namelist_cfg nn_date0 20020101
1500    set_namelist namelist_cfg jpni 8
1501    set_namelist namelist_cfg jpnj 4
1502    set_namelist namelist_cfg sn_cfctl%l_config .true.
1503    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1504    if [ ${USING_MPMD} == "yes" ] ; then
1505       set_xio_using_server iodef.xml true
1506    else
1507       set_xio_using_server iodef.xml false
1508    fi
1509    cd ${SETTE_DIR}
1510    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1511    cd ${SETTE_DIR}
1512    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1513fi
1514
1515
1516done
Note: See TracBrowser for help on using the repository browser.