source: utils/CI/sette/sette.sh @ 10632

Last change on this file since 10632 was 10632, checked in by smueller, 21 months ago

Reversal of the modifications that have been inadvertently included in changeset [10631] when addressing ticket #2226

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