New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_reference-configurations.sh in utils/CI/sette_ticket2459 – NEMO

source: utils/CI/sette_ticket2459/sette_reference-configurations.sh @ 13381

Last change on this file since 13381 was 13380, checked in by mathiot, 4 years ago

ticket #2459: restore change for personal tests

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