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 NEMO/branches/2019/fix_sette_ticket2239 – NEMO

source: NEMO/branches/2019/fix_sette_ticket2239/sette_reference-configurations.sh @ 10747

Last change on this file since 10747 was 10747, checked in by smueller, 4 years ago

Addition of configurability of the set of active test configurations, see comment 14 of ticket #2239

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