source: branches/2017/dev_r7663_ISOMIP_TEST_CASE/NEMOGCM/SETTE/sette.sh @ 7684

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

update SETTE directory to work with ISOMIP into TEST_CASE/ directory

  • Property svn:executable set to *
File size: 58.0 KB
Line 
1#!/bin/bash
2############################################################
3# Author : Simona Flavoni for NEMO
4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
14#set -x
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 opa 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#                      (solver.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=XC40_METO
91export BATCH_COMMAND_PAR="qsub"
92export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
93export INTERACT_FLAG="no"
94export MPIRUN_FLAG="yes"
95export USING_XIOS="yes"
96#
97export DEL_KEYS="key_iomput"
98if [ ${USING_XIOS} == "yes" ] 
99 then
100   export DEL_KEYS=""
101fi
102#
103# Settings which control the use of stand alone servers (only relevant if using xios)
104#
105export USING_MPMD="no"
106export NUM_XIOSERVERS=4
107export JOB_PREFIX=batch-mpmd
108#
109if [ ${USING_MPMD} == "no" ] 
110 then
111   export NUM_XIOSERVERS=0
112   export JOB_PREFIX=batch
113fi
114#
115#
116if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
117 then
118   echo "Incompatible choices. MPMD mode requires the XIOS server"
119   exit
120fi
121#
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=$(dirname $SETTE_DIR)
126CONFIG_DIR0=${MAIN_DIR}/CONFIG
127TOOLS_DIR=${MAIN_DIR}/TOOLS
128COMPIL_DIR=${TOOLS_DIR}/COMPILE
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              :  1 &  2
136# ORCA2_LIM3        :  3 &  4
137# ORCA2_LIM3_PISCES :  5 &  6
138# ORCA2_OFF_PISCES  :  7 &  8
139# AMM12             :  9 & 10
140# SAS               : 11     fos SAS there is no solver so is useless to test REPRO
141# ISOMIP            : 12 & 13
142# ORCA2_LIM3_OBS    : 14
143# ORCA2_AGRIF_LIM   : 15 & 16
144#                     17 & 18
145
146for config in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
147
148do
149
150# TESTS FOR GYRE CONFIGURATION
151if [ ${config} -eq 1 ] ;  then
152    ## Restartability tests for GYRE
153    unset NEMO_TDIR
154    export TEST_NAME="LONG"
155    cd ${CONFIG_DIR0}
156    . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 del_key ${DEL_KEYS}
157    cd ${SETTE_DIR}
158    . ./param.cfg
159    . ./all_functions.sh
160    . ./prepare_exe_dir.sh
161    JOB_FILE=${EXE_DIR}/run_job.sh
162    NPROC=32
163    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
164    cd ${EXE_DIR} 
165    set_namelist namelist_cfg cn_exp \"GYRE_LONG\"
166    set_namelist namelist_cfg nn_it000 1
167    set_namelist namelist_cfg nn_itend 120
168    set_namelist namelist_cfg nn_stock 60
169    set_namelist namelist_cfg ln_clobber .true.
170    set_namelist namelist_cfg ln_linssh .true.
171    set_namelist namelist_cfg ln_read_cfg .false.
172    set_namelist namelist_cfg nn_fwb 0
173    set_namelist namelist_cfg jpni 4
174    set_namelist namelist_cfg jpnj 8
175    set_namelist namelist_cfg jpnij 32
176    if [ ${USING_MPMD} == "yes" ] ; then
177       set_xio_using_server iodef.xml true
178    else
179       set_xio_using_server iodef.xml false
180    fi
181    cd ${SETTE_DIR}
182    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
183
184    cd ${SETTE_DIR}
185    export TEST_NAME="SHORT"
186    . ./prepare_exe_dir.sh
187    cd ${EXE_DIR}
188    set_namelist namelist_cfg cn_exp \"GYRE_SHORT\"
189    set_namelist namelist_cfg nn_it000 61
190    set_namelist namelist_cfg nn_itend 120
191    set_namelist namelist_cfg nn_stock 60
192    set_namelist namelist_cfg ln_rstart .true.
193    set_namelist namelist_cfg nn_rstctl 2
194    set_namelist namelist_cfg ln_clobber .true.
195    set_namelist namelist_cfg ln_linssh .true.
196    set_namelist namelist_cfg ln_read_cfg .false.
197    set_namelist namelist_cfg nn_fwb 0
198    set_namelist namelist_cfg jpni 4
199    set_namelist namelist_cfg jpnj 8
200    set_namelist namelist_cfg jpnij 32
201    set_namelist namelist_cfg cn_ocerst_in \"GYRE_LONG_00000060_restart\"
202    if [ ${USING_MPMD} == "yes" ] ; then
203       set_xio_using_server iodef.xml true
204    else
205       set_xio_using_server iodef.xml false
206    fi
207    for (( i=1; i<=$NPROC; i++)) ; do
208        L_NPROC=$(( $i - 1 ))
209        L_NPROC=`printf "%04d\n" ${L_NPROC}`
210        ln -sf ../LONG/GYRE_LONG_00000060_restart_${L_NPROC}.nc .
211    done
212    if [ ${USING_MPMD} == "yes" ] ; then
213       set_xio_using_server iodef.xml true
214    else
215       set_xio_using_server iodef.xml false
216    fi
217    cd ${SETTE_DIR}
218    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
219    cd ${SETTE_DIR}
220    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
221fi
222
223if [ ${config} -eq 2 ] ;  then
224    ## Reproducibility tests for GYRE
225    unset NEMO_TDIR
226    export TEST_NAME="REPRO_4_8"
227    cd ${CONFIG_DIR0}
228    . ./makenemo -m ${CMP_NAM} -n GYRE_32 -r GYRE -j 8 del_key ${DEL_KEYS}
229    cd ${SETTE_DIR}
230    . ./param.cfg
231    . ./all_functions.sh
232    . ./prepare_exe_dir.sh
233    JOB_FILE=${EXE_DIR}/run_job.sh
234    NPROC=32
235    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
236    cd ${EXE_DIR}
237    set_namelist namelist_cfg cn_exp \"GYRE_48\"
238    set_namelist namelist_cfg nn_it000 1
239    set_namelist namelist_cfg nn_itend 60
240    set_namelist namelist_cfg nn_fwb 0
241    set_namelist namelist_cfg ln_ctl .false.
242    set_namelist namelist_cfg ln_clobber .true.
243    set_namelist namelist_cfg ln_linssh .true.
244    set_namelist namelist_cfg ln_read_cfg .false.
245    set_namelist namelist_cfg jpni 4
246    set_namelist namelist_cfg jpnj 8
247    set_namelist namelist_cfg jpnij 32
248    if [ ${USING_MPMD} == "yes" ] ; then
249       set_xio_using_server iodef.xml true
250    else
251       set_xio_using_server iodef.xml false
252    fi
253    cd ${SETTE_DIR}
254    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
255    cd ${SETTE_DIR}
256    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
257
258    cd ${SETTE_DIR}
259    export TEST_NAME="REPRO_8_4"
260    . ./prepare_exe_dir.sh
261    JOB_FILE=${EXE_DIR}/run_job.sh
262    NPROC=32
263    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
264    cd ${EXE_DIR}
265    set_namelist namelist_cfg cn_exp \"GYRE_84\"
266    set_namelist namelist_cfg nn_it000 1
267    set_namelist namelist_cfg nn_itend 60
268    set_namelist namelist_cfg nn_fwb 0
269    set_namelist namelist_cfg ln_ctl .false.
270    set_namelist namelist_cfg ln_clobber .true.
271    set_namelist namelist_cfg ln_linssh .true.
272    set_namelist namelist_cfg ln_read_cfg .false.
273    set_namelist namelist_cfg jpni 8
274    set_namelist namelist_cfg jpnj 4
275    set_namelist namelist_cfg jpnij 32
276    if [ ${USING_MPMD} == "yes" ] ; then
277       set_xio_using_server iodef.xml true
278    else
279       set_xio_using_server iodef.xml false
280    fi
281    cd ${SETTE_DIR}
282    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
283    cd ${SETTE_DIR}
284    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
285
286fi
287
288# TESTS FOR ORCA2_LIM3 CONFIGURATION
289if [ ${config} -eq 3 ] ;  then
290    ## Restartability tests for ORCA2_LIM3
291    unset NEMO_TDIR
292    export TEST_NAME="LONG"
293    cd ${CONFIG_DIR0}
294    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_LONG -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS}
295    cd ${SETTE_DIR}
296    . ./param.cfg
297    . ./all_functions.sh
298    . ./prepare_exe_dir.sh
299    JOB_FILE=${EXE_DIR}/run_job.sh
300    NPROC=4
301    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
302    cd ${EXE_DIR}
303    set_namelist namelist_cfg cn_exp \"O2L3_LONG\"
304    set_namelist namelist_cfg nn_it000 1
305    set_namelist namelist_cfg nn_itend 150
306    set_namelist namelist_cfg nn_stock 75
307    set_namelist namelist_cfg ln_clobber .true.
308    set_namelist namelist_cfg ln_read_cfg .true.
309    set_namelist namelist_cfg ln_linssh .false.
310    set_namelist namelist_cfg ln_icebergs .true.
311    set_namelist namelist_cfg nn_fwb 0
312    set_namelist namelist_cfg jpni 2
313    set_namelist namelist_cfg jpnj 2
314    set_namelist namelist_cfg jpnij 4
315    if [ ${USING_MPMD} == "yes" ] ; then
316       set_xio_using_server iodef.xml true
317    else
318       set_xio_using_server iodef.xml false
319    fi
320    cd ${SETTE_DIR}
321    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
322
323    cd ${SETTE_DIR}
324    export TEST_NAME="SHORT"
325    . ./prepare_exe_dir.sh
326    cd ${EXE_DIR}
327    set_namelist namelist_cfg cn_exp \"O2L3_SHORT\"
328    set_namelist namelist_cfg nn_it000 76
329    set_namelist namelist_cfg nn_itend 150
330    set_namelist namelist_cfg nn_stock 75
331    set_namelist namelist_cfg ln_rstart .true.
332    set_namelist namelist_cfg nn_rstctl 2
333    set_namelist namelist_cfg ln_clobber .true.
334    set_namelist namelist_cfg ln_read_cfg .true.
335    set_namelist namelist_cfg ln_linssh .false.
336    set_namelist namelist_cfg ln_icebergs .true.
337    set_namelist namelist_cfg nn_fwb 0
338    set_namelist namelist_cfg jpni 2
339    set_namelist namelist_cfg jpnj 2
340    set_namelist namelist_cfg jpnij 4
341    set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_00000075_restart\"
342    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_00000075_restart_ice\"
343    for (( i=1; i<=$NPROC; i++)) ; do
344        L_NPROC=$(( $i - 1 ))
345        L_NPROC=`printf "%04d\n" ${L_NPROC}`
346        ln -sf ../LONG/O2L3_LONG_00000075_restart_${L_NPROC}.nc .
347        ln -sf ../LONG/O2L3_LONG_00000075_restart_ice_${L_NPROC}.nc .
348        ln -sf ../LONG/O2L3_LONG_icebergs_00000075_restart_${L_NPROC}.nc O2L3_LONG_00000075_restart_icebergs_${L_NPROC}.nc
349    done
350    if [ ${USING_MPMD} == "yes" ] ; then
351       set_xio_using_server iodef.xml true
352    else
353       set_xio_using_server iodef.xml false
354    fi
355    cd ${SETTE_DIR}
356    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
357    cd ${SETTE_DIR}
358    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
359fi
360
361if [ ${config} -eq 4 ] ;  then
362    ## Reproducibility tests for ORCA2_LIM3
363    unset NEMO_TDIR
364    export TEST_NAME="REPRO_8_4"
365    cd ${CONFIG_DIR0}
366    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_32 -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS}
367    cd ${SETTE_DIR}
368    . ./param.cfg
369    . ./all_functions.sh
370    . ./prepare_exe_dir.sh
371    JOB_FILE=${EXE_DIR}/run_job.sh
372    NPROC=32
373    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
374    cd ${EXE_DIR}
375    set_namelist namelist_cfg nn_it000 1
376    set_namelist namelist_cfg nn_itend 75
377    set_namelist namelist_cfg nn_fwb 0
378    set_namelist namelist_cfg ln_ctl .false.
379    set_namelist namelist_cfg ln_clobber .true.
380    set_namelist namelist_cfg ln_read_cfg .true.
381    set_namelist namelist_cfg ln_linssh .false.
382    set_namelist namelist_cfg ln_icebergs .true.
383    set_namelist namelist_cfg jpni 8
384    set_namelist namelist_cfg jpnj 4
385    set_namelist namelist_cfg jpnij 32
386    if [ ${USING_MPMD} == "yes" ] ; then
387       set_xio_using_server iodef.xml true
388    else
389       set_xio_using_server iodef.xml false
390    fi
391    cd ${SETTE_DIR}
392    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
393    cd ${SETTE_DIR}
394    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
395
396
397    cd ${SETTE_DIR}
398    export TEST_NAME="REPRO_4_8"
399    . ./prepare_exe_dir.sh
400    JOB_FILE=${EXE_DIR}/run_job.sh
401    NPROC=32
402    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
403    cd ${EXE_DIR}
404    set_namelist namelist_cfg nn_it000 1
405    set_namelist namelist_cfg nn_itend 75
406    set_namelist namelist_cfg ln_clobber .true.
407    set_namelist namelist_cfg ln_read_cfg .true.
408    set_namelist namelist_cfg ln_linssh .false.
409    set_namelist namelist_cfg ln_icebergs .true.
410    set_namelist namelist_cfg nn_fwb 0
411    set_namelist namelist_cfg jpni 4
412    set_namelist namelist_cfg jpnj 8
413    set_namelist namelist_cfg jpnij 32
414    if [ ${USING_MPMD} == "yes" ] ; then
415       set_xio_using_server iodef.xml true
416    else
417       set_xio_using_server iodef.xml false
418    fi
419
420    cd ${SETTE_DIR}
421    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
422    cd ${SETTE_DIR}
423    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
424fi
425
426# TESTS FOR ORCA2_LIM3_PISCES CONFIGURATION
427if [ ${config} -eq 5 ] ;  then
428    ## Restartability tests for ORCA2_LIM3_PISCES
429    unset NEMO_TDIR
430    export TEST_NAME="LONG"
431    cd ${CONFIG_DIR0}
432    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_LONG -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
433    cd ${SETTE_DIR}
434    . ./param.cfg
435    . ./all_functions.sh
436    . ./prepare_exe_dir.sh
437    JOB_FILE=${EXE_DIR}/run_job.sh
438    NPROC=32
439    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
440    cd ${EXE_DIR}
441    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
442    set_namelist namelist_cfg nn_it000 1
443    set_namelist namelist_cfg nn_itend 150
444    set_namelist namelist_cfg nn_stock 75
445    set_namelist namelist_cfg ln_clobber .true.
446    set_namelist namelist_cfg ln_read_cfg .true.
447    set_namelist namelist_cfg ln_linssh .false.
448    set_namelist namelist_cfg nn_fwb 0
449    set_namelist namelist_cfg jpni 4
450    set_namelist namelist_cfg jpnj 8
451    set_namelist namelist_cfg jpnij 32
452    set_namelist namelist_top_cfg ln_trcdta .false.
453    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
454    # if not you need input files, and for tests is not necessary
455    set_namelist namelist_pisces_cfg ln_presatm .false.
456    set_namelist namelist_pisces_cfg ln_varpar .false.
457    set_namelist namelist_pisces_cfg ln_dust .false.
458    set_namelist namelist_pisces_cfg ln_solub .false.
459    set_namelist namelist_pisces_cfg ln_river .false.
460    set_namelist namelist_pisces_cfg ln_ndepo .false.
461    set_namelist namelist_pisces_cfg ln_ironsed .false.
462    set_namelist namelist_pisces_cfg ln_ironice .false.
463    set_namelist namelist_pisces_cfg ln_hydrofe .false.
464    if [ ${USING_MPMD} == "yes" ] ; then
465       set_xio_using_server iodef.xml true
466    else
467       set_xio_using_server iodef.xml false
468    fi
469    cd ${SETTE_DIR}
470    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
471   
472    cd ${SETTE_DIR}
473    export TEST_NAME="SHORT"
474    . ./prepare_exe_dir.sh
475    cd ${EXE_DIR}
476    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
477    set_namelist namelist_cfg nn_it000 76
478    set_namelist namelist_cfg nn_itend 150
479    set_namelist namelist_cfg nn_stock 75
480    set_namelist namelist_cfg ln_rstart .true.
481    set_namelist namelist_cfg nn_rstctl 2
482    set_namelist namelist_cfg ln_clobber .true.
483    set_namelist namelist_cfg ln_read_cfg .true.
484    set_namelist namelist_cfg ln_linssh .false.
485    set_namelist namelist_cfg nn_fwb 0
486    set_namelist namelist_cfg jpni 4
487    set_namelist namelist_cfg jpnj 8
488    set_namelist namelist_cfg jpnij 32
489    set_namelist namelist_top_cfg ln_rsttr .true.
490    set_namelist namelist_top_cfg nn_rsttr 2
491    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000075_restart\"
492    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000075_restart_ice\"
493    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000075_restart_trc\"
494    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
495    # if not you need input files, and for tests is not necessary
496    set_namelist namelist_pisces_cfg ln_presatm .false.
497    set_namelist namelist_pisces_cfg ln_varpar .false.
498    set_namelist namelist_pisces_cfg ln_dust .false.
499    set_namelist namelist_pisces_cfg ln_solub .false.
500    set_namelist namelist_pisces_cfg ln_river .false.
501    set_namelist namelist_pisces_cfg ln_ndepo .false.
502    set_namelist namelist_pisces_cfg ln_ironsed .false.
503    set_namelist namelist_pisces_cfg ln_ironice .false.
504    set_namelist namelist_pisces_cfg ln_hydrofe .false.
505    # put ln_pisdmp to false : no restoring to global mean value
506    set_namelist namelist_pisces_cfg ln_pisdmp .false.
507    for (( i=1; i<=$NPROC; i++)) ; do
508        L_NPROC=$(( $i - 1 ))
509        L_NPROC=`printf "%04d\n" ${L_NPROC}`
510        ln -sf ../LONG/O2L3P_LONG_00000075_restart_${L_NPROC}.nc .
511        ln -sf ../LONG/O2L3P_LONG_00000075_restart_trc_${L_NPROC}.nc .
512        ln -sf ../LONG/O2L3P_LONG_00000075_restart_ice_${L_NPROC}.nc .
513    done
514    if [ ${USING_MPMD} == "yes" ] ; then
515       set_xio_using_server iodef.xml true
516    else
517       set_xio_using_server iodef.xml false
518    fi
519    cd ${SETTE_DIR}
520    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
521    cd ${SETTE_DIR}
522    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
523fi
524
525if [ ${config} -eq 6 ] ;  then
526    ## Reproducibility tests for ORCA2_LIM3_PISCES
527    unset NEMO_TDIR
528    export TEST_NAME="REPRO_4_8"
529    cd ${CONFIG_DIR0}
530    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_32 -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
531    cd ${SETTE_DIR}
532    . ./param.cfg
533    . ./all_functions.sh
534    . ./prepare_exe_dir.sh
535    JOB_FILE=${EXE_DIR}/run_job.sh
536    NPROC=32
537    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
538    cd ${EXE_DIR}
539    set_namelist namelist_cfg nn_it000 1
540    set_namelist namelist_cfg nn_itend 75
541    set_namelist namelist_cfg nn_fwb 0
542    set_namelist namelist_cfg ln_ctl .false.
543    set_namelist namelist_cfg ln_clobber .true.
544    set_namelist namelist_cfg ln_read_cfg .true.
545    set_namelist namelist_cfg ln_linssh .false.
546    set_namelist namelist_cfg jpni 4
547    set_namelist namelist_cfg jpnj 8
548    set_namelist namelist_cfg jpnij 32
549    set_namelist namelist_top_cfg ln_trcdta .false.
550    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
551    # if not you need input files, and for tests is not necessary
552    set_namelist namelist_pisces_cfg ln_presatm .false.
553    set_namelist namelist_pisces_cfg ln_varpar .false.
554    set_namelist namelist_pisces_cfg ln_dust .false.
555    set_namelist namelist_pisces_cfg ln_solub .false.
556    set_namelist namelist_pisces_cfg ln_river .false.
557    set_namelist namelist_pisces_cfg ln_ndepo .false.
558    set_namelist namelist_pisces_cfg ln_ironsed .false.
559    set_namelist namelist_pisces_cfg ln_ironice .false.
560    set_namelist namelist_pisces_cfg ln_hydrofe .false.
561    # put ln_pisdmp to false : no restoring to global mean value
562    set_namelist namelist_pisces_cfg ln_pisdmp .false.
563    if [ ${USING_MPMD} == "yes" ] ; then
564       set_xio_using_server iodef.xml true
565    else
566       set_xio_using_server iodef.xml false
567    fi
568    cd ${SETTE_DIR}
569    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
570    cd ${SETTE_DIR}
571    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
572
573    cd ${SETTE_DIR}
574    export TEST_NAME="REPRO_8_4"
575    . ./prepare_exe_dir.sh
576    JOB_FILE=${EXE_DIR}/run_job.sh
577    NPROC=32
578    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
579    cd ${EXE_DIR}
580    set_namelist namelist_cfg nn_it000 1
581    set_namelist namelist_cfg nn_itend 75
582    set_namelist namelist_cfg ln_clobber .true.
583    set_namelist namelist_cfg ln_read_cfg .true.
584    set_namelist namelist_cfg ln_linssh .false.
585    set_namelist namelist_cfg nn_fwb 0
586    set_namelist namelist_cfg jpni 8
587    set_namelist namelist_cfg jpnj 4
588    set_namelist namelist_cfg jpnij 32
589    set_namelist namelist_top_cfg ln_trcdta .false.
590    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
591    # if not you need input files, and for tests is not necessary
592    set_namelist namelist_pisces_cfg ln_presatm .false.
593    set_namelist namelist_pisces_cfg ln_varpar .false.
594    set_namelist namelist_pisces_cfg ln_dust .false.
595    set_namelist namelist_pisces_cfg ln_solub .false.
596    set_namelist namelist_pisces_cfg ln_river .false.
597    set_namelist namelist_pisces_cfg ln_ndepo .false.
598    set_namelist namelist_pisces_cfg ln_ironsed .false.
599    set_namelist namelist_pisces_cfg ln_ironice .false.
600    set_namelist namelist_pisces_cfg ln_hydrofe .false.
601    # put ln_pisdmp to false : no restoring to global mean value
602    set_namelist namelist_pisces_cfg ln_pisdmp .false.
603    if [ ${USING_MPMD} == "yes" ] ; then
604       set_xio_using_server iodef.xml true
605    else
606       set_xio_using_server iodef.xml false
607    fi
608    cd ${SETTE_DIR}
609    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
610    cd ${SETTE_DIR}
611    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
612fi
613
614# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
615if [ ${config} -eq 7 ] ;  then
616    ## Restartability tests for ORCA2_OFF_PISCES
617    unset NEMO_TDIR
618    export TEST_NAME="LONG"
619    cd ${CONFIG_DIR0}
620    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
621    cd ${SETTE_DIR}
622    . ./param.cfg
623    . ./all_functions.sh
624    . ./prepare_exe_dir.sh
625    JOB_FILE=${EXE_DIR}/run_job.sh
626    NPROC=32
627    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
628    cd ${EXE_DIR}
629    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
630    set_namelist namelist_cfg nn_it000 1
631    set_namelist namelist_cfg nn_itend 40
632    set_namelist namelist_cfg nn_stock 20
633    set_namelist namelist_cfg ln_clobber .true.
634    set_namelist namelist_cfg ln_read_cfg .true.
635    set_namelist namelist_cfg ln_linssh .true.
636    set_namelist namelist_cfg jpni 4
637    set_namelist namelist_cfg jpnj 8
638    set_namelist namelist_cfg jpnij 32
639    set_namelist namelist_top_cfg ln_trcdta .false.
640    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
641    # if not you need input files, and for tests is not necessary
642    set_namelist namelist_pisces_cfg ln_presatm .false.
643    set_namelist namelist_pisces_cfg ln_varpar .false.
644    set_namelist namelist_pisces_cfg ln_dust .false.
645    set_namelist namelist_pisces_cfg ln_solub .false.
646    set_namelist namelist_pisces_cfg ln_river .false.
647    set_namelist namelist_pisces_cfg ln_ndepo .false.
648    set_namelist namelist_pisces_cfg ln_ironsed .false.
649    set_namelist namelist_pisces_cfg ln_ironice .false.
650    set_namelist namelist_pisces_cfg ln_hydrofe .false.
651    # put ln_pisdmp to false : no restoring to global mean value
652    set_namelist namelist_pisces_cfg ln_pisdmp .false.
653    if [ ${USING_MPMD} == "yes" ] ; then
654       set_xio_using_server iodef.xml true
655    else
656       set_xio_using_server iodef.xml false
657    fi
658    cd ${SETTE_DIR}
659    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
660   
661    cd ${SETTE_DIR}
662    export TEST_NAME="SHORT"
663    . ./prepare_exe_dir.sh
664    cd ${EXE_DIR}
665    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
666    set_namelist namelist_cfg nn_it000 21
667    set_namelist namelist_cfg nn_itend 40
668    set_namelist namelist_cfg nn_stock 20
669    set_namelist namelist_cfg ln_clobber .true.
670    set_namelist namelist_cfg ln_read_cfg .true.
671    set_namelist namelist_cfg ln_linssh .true.
672    set_namelist namelist_cfg jpni 4
673    set_namelist namelist_cfg jpnj 8
674    set_namelist namelist_cfg jpnij 32
675    set_namelist namelist_top_cfg ln_rsttr .true.
676    set_namelist namelist_top_cfg nn_rsttr 2
677    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
678    for (( i=1; i<=$NPROC; i++)) ; do
679        L_NPROC=$(( $i - 1 ))
680        L_NPROC=`printf "%04d\n" ${L_NPROC}`
681        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
682    done
683    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
684    # if not you need input files, and for tests is not necessary
685    set_namelist namelist_pisces_cfg ln_presatm .false.
686    set_namelist namelist_pisces_cfg ln_varpar .false.
687    set_namelist namelist_pisces_cfg ln_dust .false.
688    set_namelist namelist_pisces_cfg ln_solub .false.
689    set_namelist namelist_pisces_cfg ln_river .false.
690    set_namelist namelist_pisces_cfg ln_ndepo .false.
691    set_namelist namelist_pisces_cfg ln_ironsed .false.
692    set_namelist namelist_pisces_cfg ln_ironice .false.
693    set_namelist namelist_pisces_cfg ln_hydrofe .false.
694    # put ln_pisdmp to false : no restoring to global mean value
695    set_namelist namelist_pisces_cfg ln_pisdmp .false.
696    if [ ${USING_MPMD} == "yes" ] ; then
697       set_xio_using_server iodef.xml true
698    else
699       set_xio_using_server iodef.xml false
700    fi
701    cd ${SETTE_DIR}
702    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
703    cd ${SETTE_DIR}
704    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
705fi
706
707if [ ${config} -eq 8 ] ;  then
708    ## Reproducibility tests for ORCA2_OFF_PISCES
709    unset NEMO_TDIR
710    export TEST_NAME="REPRO_4_8"
711    cd ${CONFIG_DIR0}
712    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_32 -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
713    cd ${SETTE_DIR}
714    . ./param.cfg
715    . ./all_functions.sh
716    . ./prepare_exe_dir.sh
717    JOB_FILE=${EXE_DIR}/run_job.sh
718    NPROC=32
719    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
720    cd ${EXE_DIR}
721    set_namelist namelist_cfg nn_it000 1
722    set_namelist namelist_cfg nn_itend 40
723    set_namelist namelist_cfg ln_ctl .false.
724    set_namelist namelist_cfg ln_clobber .true.
725    set_namelist namelist_cfg ln_read_cfg .true.
726    set_namelist namelist_cfg ln_linssh .true.
727    set_namelist namelist_cfg jpni 4
728    set_namelist namelist_cfg jpnj 8
729    set_namelist namelist_cfg jpnij 32
730    set_namelist namelist_top_cfg ln_trcdta .false.
731    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
732    # if not you need input files, and for tests is not necessary
733    set_namelist namelist_pisces_cfg ln_presatm .false.
734    set_namelist namelist_pisces_cfg ln_varpar .false.
735    set_namelist namelist_pisces_cfg ln_dust .false.
736    set_namelist namelist_pisces_cfg ln_solub .false.
737    set_namelist namelist_pisces_cfg ln_river .false.
738    set_namelist namelist_pisces_cfg ln_ndepo .false.
739    set_namelist namelist_pisces_cfg ln_ironsed .false.
740    set_namelist namelist_pisces_cfg ln_ironice .false.
741    set_namelist namelist_pisces_cfg ln_hydrofe .false.
742    # put ln_pisdmp to false : no restoring to global mean value
743    set_namelist namelist_pisces_cfg ln_pisdmp .false.
744    if [ ${USING_MPMD} == "yes" ] ; then
745       set_xio_using_server iodef.xml true
746    else
747       set_xio_using_server iodef.xml false
748    fi
749    cd ${SETTE_DIR}
750    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
751    cd ${SETTE_DIR}
752    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
753
754    cd ${SETTE_DIR}
755    export TEST_NAME="REPRO_8_4"
756    . ./prepare_exe_dir.sh
757    JOB_FILE=${EXE_DIR}/run_job.sh
758    NPROC=32
759    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
760    cd ${EXE_DIR}
761    set_namelist namelist_cfg nn_it000 1
762    set_namelist namelist_cfg nn_itend 40
763    set_namelist namelist_cfg ln_ctl .false.
764    set_namelist namelist_cfg ln_clobber .true.
765    set_namelist namelist_cfg ln_read_cfg .true.
766    set_namelist namelist_cfg ln_linssh .true.
767    set_namelist namelist_cfg jpni 8
768    set_namelist namelist_cfg jpnj 4
769    set_namelist namelist_cfg jpnij 32
770    set_namelist namelist_top_cfg ln_trcdta .false.
771    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
772    # if not you need input files, and for tests is not necessary
773    set_namelist namelist_pisces_cfg ln_presatm .false.
774    set_namelist namelist_pisces_cfg ln_varpar .false.
775    set_namelist namelist_pisces_cfg ln_dust .false.
776    set_namelist namelist_pisces_cfg ln_solub .false.
777    set_namelist namelist_pisces_cfg ln_river .false.
778    set_namelist namelist_pisces_cfg ln_ndepo .false.
779    set_namelist namelist_pisces_cfg ln_ironsed .false.
780    set_namelist namelist_pisces_cfg ln_ironice .false.
781    set_namelist namelist_pisces_cfg ln_hydrofe .false.
782    # put ln_pisdmp to false : no restoring to global mean value
783    set_namelist namelist_pisces_cfg ln_pisdmp .false.
784    if [ ${USING_MPMD} == "yes" ] ; then
785       set_xio_using_server iodef.xml true
786    else
787       set_xio_using_server iodef.xml false
788    fi
789    cd ${SETTE_DIR}
790    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
791    cd ${SETTE_DIR}
792    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
793fi
794
795# TESTS FOR AMM12 CONFIGURATION
796if [ ${config} -eq 9 ] ;  then
797    ## Restartability tests for AMM12
798    unset NEMO_TDIR
799    export TEST_NAME="LONG"
800    cd ${CONFIG_DIR0}
801    . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS}
802    cd ${SETTE_DIR}
803    . ./param.cfg
804    . ./all_functions.sh
805    . ./prepare_exe_dir.sh
806    JOB_FILE=${EXE_DIR}/run_job.sh
807    NPROC=32
808    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
809    cd ${EXE_DIR}
810    set_namelist namelist_cfg nn_it000 1
811    set_namelist namelist_cfg nn_itend 576
812    set_namelist namelist_cfg nn_stock 288
813    set_namelist namelist_cfg nn_fwb 0
814    set_namelist namelist_cfg ln_ctl .false.
815    set_namelist namelist_cfg ln_clobber .true.
816    set_namelist namelist_cfg ln_read_cfg .true.
817    set_namelist namelist_cfg ln_linssh .false.
818    set_namelist namelist_cfg jpni 4
819    set_namelist namelist_cfg jpnj 8
820    set_namelist namelist_cfg jpnij 32
821    if [ ${USING_MPMD} == "yes" ] ; then
822       set_xio_using_server iodef.xml true
823    else
824       set_xio_using_server iodef.xml false
825    fi
826    cd ${SETTE_DIR}
827    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
828
829    cd ${SETTE_DIR}
830    export TEST_NAME="SHORT"
831    . ./prepare_exe_dir.sh
832    cd ${EXE_DIR}
833    set_namelist namelist_cfg nn_it000 289
834    set_namelist namelist_cfg nn_itend 576
835    set_namelist namelist_cfg nn_fwb 0
836    set_namelist namelist_cfg ln_ctl .false.
837    set_namelist namelist_cfg ln_clobber .true.
838    set_namelist namelist_cfg ln_read_cfg .true.
839    set_namelist namelist_cfg ln_linssh .false.
840    set_namelist namelist_cfg jpni 4
841    set_namelist namelist_cfg jpnj 8
842    set_namelist namelist_cfg jpnij 32
843    set_namelist namelist_cfg ln_rstart .true.
844    set_namelist namelist_cfg nn_rstctl 2
845    set_namelist namelist_cfg cn_ocerst_in \"AMM12_00000288_restart_oce_out\"
846    set_namelist namelist_cfg nn_date0 20120102
847    for (( i=1; i<=$NPROC; i++)) ; do
848        L_NPROC=$(( $i - 1 ))
849        L_NPROC=`printf "%04d\n" ${L_NPROC}`
850        ln -sf ../LONG/AMM12_00000288_restart_oce_out_${L_NPROC}.nc .
851    done
852    if [ ${USING_MPMD} == "yes" ] ; then
853       set_xio_using_server iodef.xml true
854    else
855       set_xio_using_server iodef.xml false
856    fi
857    cd ${SETTE_DIR}
858    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
859    cd ${SETTE_DIR}
860    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
861fi
862
863if [ ${config} -eq 10 ] ;  then
864## Reproducibility tests for AMM12
865    unset NEMO_TDIR
866    export TEST_NAME="REPRO_8_4"
867    cd ${CONFIG_DIR0}
868    . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 del_key ${DEL_KEYS}
869    cd ${SETTE_DIR}
870    . ./param.cfg
871    . ./all_functions.sh
872    . ./prepare_exe_dir.sh
873    JOB_FILE=${EXE_DIR}/run_job.sh
874    NPROC=32
875    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
876    cd ${EXE_DIR}
877    set_namelist namelist_cfg nn_it000 1
878    set_namelist namelist_cfg nn_itend 576
879    set_namelist namelist_cfg nn_fwb 0
880    set_namelist namelist_cfg ln_ctl .false.
881    set_namelist namelist_cfg ln_clobber .true.
882    set_namelist namelist_cfg ln_read_cfg .true.
883    set_namelist namelist_cfg ln_linssh .false.
884    set_namelist namelist_cfg jpni 8
885    set_namelist namelist_cfg jpnj 4
886    set_namelist namelist_cfg jpnij 32
887    if [ ${USING_MPMD} == "yes" ] ; then
888       set_xio_using_server iodef.xml true
889    else
890       set_xio_using_server iodef.xml false
891    fi
892    cd ${SETTE_DIR}
893    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
894    cd ${SETTE_DIR}
895    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
896
897    cd ${SETTE_DIR}
898    export TEST_NAME="REPRO_4_8"
899    . ./prepare_exe_dir.sh
900    JOB_FILE=${EXE_DIR}/run_job.sh
901    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
902    cd ${EXE_DIR}
903    set_namelist namelist_cfg nn_it000 1
904    set_namelist namelist_cfg nn_itend 576
905    set_namelist namelist_cfg nn_fwb 0
906    set_namelist namelist_cfg ln_ctl .false.
907    set_namelist namelist_cfg ln_clobber .true.
908    set_namelist namelist_cfg ln_read_cfg .true.
909    set_namelist namelist_cfg ln_linssh .false.
910    set_namelist namelist_cfg jpni 4
911    set_namelist namelist_cfg jpnj 8
912    set_namelist namelist_cfg jpnij 32
913    if [ ${USING_MPMD} == "yes" ] ; then
914       set_xio_using_server iodef.xml true
915    else
916       set_xio_using_server iodef.xml false
917    fi
918    cd ${SETTE_DIR}
919    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
920    cd ${SETTE_DIR}
921    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
922fi
923
924
925# TESTS FOR ORCA2_SAS_LIM3 CONFIGURATION
926if [ ${config} -eq 11 ] ;  then
927    ## Restartability tests for SAS
928    unset NEMO_TDIR
929    export TEST_NAME="LONG"
930    cd ${CONFIG_DIR0}
931    . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM3 -j 8 del_key ${DEL_KEYS}
932    cd ${SETTE_DIR}
933    . ./param.cfg
934    . ./all_functions.sh
935    . ./prepare_exe_dir.sh
936    JOB_FILE=${EXE_DIR}/run_job.sh
937    NPROC=32
938    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
939    cd ${EXE_DIR}
940    set_namelist namelist_cfg cn_exp \"SAS\"
941    set_namelist namelist_cfg nn_it000 1
942    set_namelist namelist_cfg nn_itend 100
943    set_namelist namelist_cfg nn_stock 50
944    set_namelist namelist_cfg ln_ctl .false.
945    set_namelist namelist_cfg ln_clobber .true.
946    set_namelist namelist_cfg ln_read_cfg .true.
947    set_namelist namelist_cfg ln_linssh .true.
948    set_namelist namelist_cfg nn_fwb 0
949    set_namelist namelist_cfg jpni 4
950    set_namelist namelist_cfg jpnj 8
951    set_namelist namelist_cfg jpnij 32
952    if [ ${USING_MPMD} == "yes" ] ; then
953       set_xio_using_server iodef.xml true
954    else
955       set_xio_using_server iodef.xml false
956    fi
957    cd ${SETTE_DIR}
958    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
959
960    cd ${SETTE_DIR}
961    export TEST_NAME="SHORT"
962    . ./prepare_exe_dir.sh
963    cd ${EXE_DIR}
964    set_namelist namelist_cfg cn_exp \"SAS\"
965    set_namelist namelist_cfg nn_it000 51
966    set_namelist namelist_cfg nn_itend 100
967    set_namelist namelist_cfg ln_ctl .false.
968    set_namelist namelist_cfg ln_clobber .true.
969    set_namelist namelist_cfg ln_read_cfg .true.
970    set_namelist namelist_cfg ln_linssh .true.
971    set_namelist namelist_cfg nn_fwb 0
972    set_namelist namelist_cfg jpni 4
973    set_namelist namelist_cfg jpnj 8
974    set_namelist namelist_cfg jpnij 32
975    set_namelist namelist_cfg ln_rstart .true.
976    set_namelist namelist_cfg nn_rstctl 2
977    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000050_restart_ice\"
978    if [ ${USING_MPMD} == "yes" ] ; then
979       set_xio_using_server iodef.xml true
980    else
981       set_xio_using_server iodef.xml false
982    fi
983    for (( i=1; i<=$NPROC; i++)) ; do
984        L_NPROC=$(( $i - 1 ))
985        L_NPROC=`printf "%04d\n" ${L_NPROC}`
986        ln -sf ../LONG/SAS_00000050_restart_ice_${L_NPROC}.nc .
987    done
988    cd ${SETTE_DIR}
989    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
990    cd ${SETTE_DIR}
991    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
992fi
993
994# TESTS FOR ISOMIP CONFIGURATION
995if [ ${config} -eq 12 ] ;  then
996    ## Restartability tests for ISOMIP
997    # to avoid unwanted ISOMIP_?? repository in CONFIG dir, unset NEMO_TDIR is needed
998    unset NEMO_TDIR           
999    export TEST_NAME="LONG"
1000    cd ${CONFIG_DIR0}
1001    . ./makenemo -m ${CMP_NAM} -n ISOMIP_LONG -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
1002    cd ${SETTE_DIR}
1003    . ./param.cfg
1004    . ./all_functions.sh
1005    . ./prepare_exe_dir.sh
1006    JOB_FILE=${EXE_DIR}/run_job.sh
1007    NPROC=32
1008    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1009    cd ${EXE_DIR}
1010    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
1011    set_namelist namelist_cfg nn_it000 1
1012    set_namelist namelist_cfg nn_itend 96
1013    set_namelist namelist_cfg nn_stock 48
1014    set_namelist namelist_cfg ln_clobber .true.
1015    set_namelist namelist_cfg ln_read_cfg .false.
1016    set_namelist namelist_cfg jpni 4
1017    set_namelist namelist_cfg jpnj 8
1018    set_namelist namelist_cfg jpnij 32
1019    if [ ${USING_MPMD} == "yes" ] ; then
1020       set_xio_using_server iodef.xml true
1021    else
1022       set_xio_using_server iodef.xml false
1023    fi
1024    cd ${SETTE_DIR}
1025    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1026
1027    cd ${SETTE_DIR}
1028    export TEST_NAME="SHORT"
1029    . ./prepare_exe_dir.sh
1030    cd ${EXE_DIR}
1031    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
1032    set_namelist namelist_cfg nn_it000 49
1033    set_namelist namelist_cfg nn_itend 96
1034    set_namelist namelist_cfg nn_stock 48
1035    set_namelist namelist_cfg ln_rstart .true.
1036    set_namelist namelist_cfg nn_rstctl 2
1037    set_namelist namelist_cfg ln_clobber .true.
1038    set_namelist namelist_cfg ln_read_cfg .false.
1039    set_namelist namelist_cfg jpni 4
1040    set_namelist namelist_cfg jpnj 8
1041    set_namelist namelist_cfg jpnij 32
1042    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
1043    if [ ${USING_MPMD} == "yes" ] ; then
1044       set_xio_using_server iodef.xml true
1045    else
1046       set_xio_using_server iodef.xml false
1047    fi
1048    for (( i=1; i<=$NPROC; i++)) ; do
1049        L_NPROC=$(( $i - 1 ))
1050        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1051        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
1052    done
1053    if [ ${USING_MPMD} == "yes" ] ; then
1054       set_xio_using_server iodef.xml true
1055    else
1056       set_xio_using_server iodef.xml false
1057    fi
1058    cd ${SETTE_DIR}
1059    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1060    cd ${SETTE_DIR}
1061    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1062fi
1063if [ ${config} -eq 13 ] ;  then
1064    ## Reproducibility tests for ISOMIP
1065    # to avoid unwanted ISOMIP_?? repository in CONFIG dir, unset NEMO_TDIR is needed
1066    unset NEMO_TDIR           
1067    export TEST_NAME="REPRO_4_8"
1068    cd ${CONFIG_DIR0}
1069    . ./makenemo -m ${CMP_NAM} -n ISOMIP_32 -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
1070    cd ${SETTE_DIR}
1071    . ./param.cfg
1072    . ./all_functions.sh
1073    . ./prepare_exe_dir.sh
1074    JOB_FILE=${EXE_DIR}/run_job.sh
1075    NPROC=32
1076    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1077    cd ${EXE_DIR}
1078    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
1079    set_namelist namelist_cfg nn_it000 1
1080    set_namelist namelist_cfg nn_itend 48
1081    set_namelist namelist_cfg ln_ctl .false.
1082    set_namelist namelist_cfg ln_clobber .true.
1083    set_namelist namelist_cfg ln_read_cfg .false.
1084    set_namelist namelist_cfg jpni 4
1085    set_namelist namelist_cfg jpnj 8
1086    set_namelist namelist_cfg jpnij 32
1087    if [ ${USING_MPMD} == "yes" ] ; then
1088       set_xio_using_server iodef.xml true
1089    else
1090       set_xio_using_server iodef.xml false
1091    fi
1092    cd ${SETTE_DIR}
1093    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1094    cd ${SETTE_DIR}
1095    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1096
1097    cd ${SETTE_DIR}
1098    export TEST_NAME="REPRO_8_4"
1099    . ./prepare_exe_dir.sh
1100    JOB_FILE=${EXE_DIR}/run_job.sh
1101    NPROC=32
1102    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1103    cd ${EXE_DIR}
1104    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
1105    set_namelist namelist_cfg nn_it000 1
1106    set_namelist namelist_cfg nn_itend 48
1107    set_namelist namelist_cfg ln_ctl .false.
1108    set_namelist namelist_cfg ln_clobber .true.
1109    set_namelist namelist_cfg ln_read_cfg .false.
1110    set_namelist namelist_cfg jpni 8
1111    set_namelist namelist_cfg jpnj 4
1112    set_namelist namelist_cfg jpnij 32
1113    if [ ${USING_MPMD} == "yes" ] ; then
1114       set_xio_using_server iodef.xml true
1115    else
1116       set_xio_using_server iodef.xml false
1117    fi
1118    cd ${SETTE_DIR}
1119    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1120    cd ${SETTE_DIR}
1121    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1122
1123fi
1124
1125## Test assimilation interface code, OBS and ASM for reproducibility
1126## Restartability not tested (ASM code not restartable while increments are being applied)
1127if [ ${config} -eq 14 ] ; then
1128   ## Reproducibility tests for ORCA2_LIM_OBS
1129    unset NEMO_TDIR
1130    export TEST_NAME="REPRO_4_8"
1131    cd ${CONFIG_DIR0}
1132    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM3_OBS -r ORCA2_LIM3 -j 8 add_key "key_asminc" del_key ${DEL_KEYS}
1133    cd ${SETTE_DIR}
1134    . ./param.cfg
1135    . ./all_functions.sh
1136    . ./prepare_exe_dir.sh
1137    JOB_FILE=${EXE_DIR}/run_job.sh
1138    NPROC=32
1139    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1140    cd ${EXE_DIR}
1141    set_namelist namelist_cfg nn_it000 1
1142    set_namelist namelist_cfg nn_itend 75
1143    set_namelist namelist_cfg nn_fwb 0
1144    set_namelist namelist_cfg ln_ctl .false.
1145    set_namelist namelist_cfg ln_clobber .true.
1146    set_namelist namelist_cfg ln_read_cfg .true.
1147    set_namelist namelist_cfg ln_linssh .false.
1148    set_namelist namelist_cfg jpni 4
1149    set_namelist namelist_cfg jpnj 8
1150    set_namelist namelist_cfg jpnij 32
1151    set_namelist namelist_cfg ln_diaobs .true.
1152    set_namelist namelist_cfg ln_t3d .true.
1153    set_namelist namelist_cfg ln_s3d .true.
1154    set_namelist namelist_cfg ln_sst .true.
1155    set_namelist namelist_cfg ln_sla .true.
1156    set_namelist namelist_cfg ln_sic .true.
1157    set_namelist namelist_cfg ln_vel3d .true.
1158    set_namelist namelist_cfg ln_bkgwri .true.
1159    set_namelist namelist_cfg ln_trainc .true.
1160    set_namelist namelist_cfg ln_dyninc .true.
1161    set_namelist namelist_cfg ln_sshinc .true.
1162    set_namelist namelist_cfg ln_asmiau .true.
1163    if [ ${USING_MPMD} == "yes" ] ; then
1164       set_xio_using_server iodef.xml true
1165    else
1166       set_xio_using_server iodef.xml false
1167    fi
1168    cd ${SETTE_DIR}
1169    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1170    cd ${SETTE_DIR}
1171    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1172
1173   cd ${SETTE_DIR}
1174    export TEST_NAME="REPRO_8_4"
1175    . ./prepare_exe_dir.sh
1176    JOB_FILE=${EXE_DIR}/run_job.sh
1177    NPROC=32
1178    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1179    cd ${EXE_DIR}
1180    set_namelist namelist_cfg nn_it000 1
1181    set_namelist namelist_cfg nn_itend 75
1182    set_namelist namelist_cfg nn_fwb 0
1183    set_namelist namelist_cfg ln_ctl .false.
1184    set_namelist namelist_cfg ln_clobber .true.
1185    set_namelist namelist_cfg ln_read_cfg .true.
1186    set_namelist namelist_cfg ln_linssh .false.
1187    set_namelist namelist_cfg jpni 8
1188    set_namelist namelist_cfg jpnj 4
1189    set_namelist namelist_cfg jpnij 32
1190    set_namelist namelist_cfg ln_diaobs .true.
1191    set_namelist namelist_cfg ln_t3d .true.
1192    set_namelist namelist_cfg ln_s3d .true.
1193    set_namelist namelist_cfg ln_sst .true.
1194    set_namelist namelist_cfg ln_sla .true.
1195    set_namelist namelist_cfg ln_sic .true.
1196    set_namelist namelist_cfg ln_vel3d .true.
1197    set_namelist namelist_cfg ln_bkgwri .true.
1198    set_namelist namelist_cfg ln_trainc .true.
1199    set_namelist namelist_cfg ln_dyninc .true.
1200    set_namelist namelist_cfg ln_sshinc .true.
1201    set_namelist namelist_cfg ln_asmiau .true.
1202    if [ ${USING_MPMD} == "yes" ] ; then
1203       set_xio_using_server iodef.xml true
1204    else
1205       set_xio_using_server iodef.xml false
1206    fi
1207    cd ${SETTE_DIR}
1208    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1209    cd ${SETTE_DIR}
1210    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1211fi
1212# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
1213if [ ${config} -eq 15 ] ;  then
1214    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
1215    unset NEMO_TDIR
1216    export TEST_NAME="SHORT"
1217    cd ${CONFIG_DIR0}
1218    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1219    cd ${SETTE_DIR}
1220    . ./param.cfg
1221    . ./all_functions.sh
1222    . ./prepare_exe_dir.sh
1223    JOB_FILE=${EXE_DIR}/run_job.sh
1224    NPROC=2
1225    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1226    cd ${EXE_DIR}
1227    set_namelist namelist_cfg nn_it000 1
1228    set_namelist namelist_cfg nn_itend 75
1229    set_namelist namelist_cfg ln_ctl .false.
1230    set_namelist namelist_cfg ln_clobber .true.
1231    set_namelist namelist_cfg ln_read_cfg .true.
1232    set_namelist namelist_cfg ln_linssh .true.
1233    set_namelist namelist_cfg ln_hpg_sco .false.
1234    set_namelist namelist_cfg ln_hpg_zps .true.
1235    set_namelist namelist_cfg nn_fwb 0
1236    set_namelist namelist_cfg jpni 1
1237    set_namelist namelist_cfg jpnj 2
1238    set_namelist namelist_cfg jpnij 2
1239    set_namelist 1_namelist_cfg nn_it000 1
1240    set_namelist 1_namelist_cfg nn_itend 150
1241    set_namelist 1_namelist_cfg ln_ctl .false.
1242    set_namelist 1_namelist_cfg ln_clobber .true.
1243    set_namelist 1_namelist_cfg ln_read_cfg .true.
1244    set_namelist 1_namelist_cfg ln_linssh .true.
1245    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1246    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1247    if [ ${USING_MPMD} == "yes" ] ; then
1248       set_xio_using_server iodef.xml true
1249    else
1250       set_xio_using_server iodef.xml false
1251    fi
1252    cd ${SETTE_DIR}
1253    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1254    cd ${SETTE_DIR}
1255    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1256fi
1257
1258# test code corruption with AGRIF
1259# Compile and run with or without AGRIF ORCA2_LIM
1260if [ ${config} -eq 16 ] ;  then
1261    # First run same as 15 but without zoom
1262    unset NEMO_TDIR
1263    export TEST_NAME="SHORT_NOZOOM"
1264    cd ${CONFIG_DIR0}
1265    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_2_2 -r ORCA2_LIM -j 8 add_key "key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1266    cd ${SETTE_DIR}
1267    . ./param.cfg
1268    . ./all_functions.sh
1269    . ./prepare_exe_dir.sh
1270    JOB_FILE=${EXE_DIR}/run_job.sh
1271    NPROC=4
1272    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1273    cd ${EXE_DIR}
1274    set_namelist namelist_cfg nn_it000 1
1275    set_namelist namelist_cfg nn_itend 75
1276    set_namelist namelist_cfg ln_ctl .false.
1277    set_namelist namelist_cfg ln_clobber .true.
1278    set_namelist namelist_cfg ln_read_cfg .true.
1279    set_namelist namelist_cfg ln_linssh .true.
1280    set_namelist namelist_cfg ln_hpg_sco .false.
1281    set_namelist namelist_cfg ln_hpg_zps .true.
1282    set_namelist namelist_cfg nn_fwb 0
1283    set_namelist namelist_cfg jpni 2
1284    set_namelist namelist_cfg jpnj 2
1285    set_namelist namelist_cfg jpnij 4
1286#
1287#   Set the number of fine grids to zero:   
1288    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1289
1290    if [ ${USING_MPMD} == "yes" ] ; then
1291       set_xio_using_server iodef.xml true
1292    else
1293       set_xio_using_server iodef.xml false
1294    fi
1295    cd ${SETTE_DIR}
1296    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1297    cd ${SETTE_DIR}
1298    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1299
1300    unset NEMO_TDIR
1301    export TEST_NAME="SHORT_NOAGRIF"
1302    cd ${CONFIG_DIR0}
1303    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_2_2_NAG -r ORCA2_LIM -j 8 del_key "key_zdftmx" del_key ${DEL_KEYS}
1304    cd ${SETTE_DIR}
1305    . ./param.cfg
1306    . ./all_functions.sh
1307    . ./prepare_exe_dir.sh
1308    JOB_FILE=${EXE_DIR}/run_job.sh
1309    NPROC=4
1310    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1311    cd ${EXE_DIR}
1312    set_namelist namelist_cfg nn_it000 1
1313    set_namelist namelist_cfg nn_itend 75
1314    set_namelist namelist_cfg ln_ctl .false.
1315    set_namelist namelist_cfg ln_clobber .true.
1316    set_namelist namelist_cfg ln_read_cfg .true.
1317    set_namelist namelist_cfg ln_linssh .true.
1318    set_namelist namelist_cfg ln_hpg_sco .false.
1319    set_namelist namelist_cfg ln_hpg_zps .true.
1320    set_namelist namelist_cfg nn_fwb 0
1321    set_namelist namelist_cfg jpni 2
1322    set_namelist namelist_cfg jpnj 2
1323    set_namelist namelist_cfg jpnij 4
1324#
1325    if [ ${USING_MPMD} == "yes" ] ; then
1326       set_xio_using_server iodef.xml true
1327    else
1328       set_xio_using_server iodef.xml false
1329    fi
1330    cd ${SETTE_DIR}
1331    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1332    cd ${SETTE_DIR}
1333    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1334
1335fi
1336
1337## Restartability tests for ORCA2_LIM_AGRIF
1338if [ ${config} -eq 17 ] ;  then
1339    unset NEMO_TDIR
1340    export TEST_NAME="LONG"
1341    cd ${CONFIG_DIR0}
1342    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_LONG -r ORCA2_LIM -j 8 add_key "key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1343    cd ${SETTE_DIR}
1344    . ./param.cfg
1345    . ./all_functions.sh
1346    . ./prepare_exe_dir.sh
1347    JOB_FILE=${EXE_DIR}/run_job.sh
1348    NPROC=4
1349    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1350    cd ${EXE_DIR}
1351    set_namelist namelist_cfg cn_exp \"O2LP_LONG\"
1352    set_namelist namelist_cfg nn_it000 1
1353    set_namelist namelist_cfg nn_itend 150
1354    set_namelist namelist_cfg nn_stock 75
1355    set_namelist namelist_cfg ln_clobber .true.
1356    set_namelist namelist_cfg ln_read_cfg .true.
1357    set_namelist namelist_cfg ln_linssh .true.
1358    set_namelist namelist_cfg ln_hpg_sco .false.
1359    set_namelist namelist_cfg ln_hpg_zps .true.
1360    set_namelist namelist_cfg nn_fwb 0
1361    set_namelist namelist_cfg jpni 2
1362    set_namelist namelist_cfg jpnj 2
1363    set_namelist namelist_cfg jpnij 4
1364    set_namelist 1_namelist_cfg cn_exp \"O2LP_LONG\"
1365    set_namelist 1_namelist_cfg nn_it000 1
1366    set_namelist 1_namelist_cfg nn_itend 300
1367    set_namelist 1_namelist_cfg nn_stock 150
1368    set_namelist 1_namelist_cfg ln_ctl .false.
1369    set_namelist 1_namelist_cfg ln_clobber .true.
1370    set_namelist 1_namelist_cfg ln_read_cfg .true.
1371    set_namelist 1_namelist_cfg ln_linssh .true.
1372    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1373    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1374#
1375    if [ ${USING_MPMD} == "yes" ] ; then
1376       set_xio_using_server iodef.xml true
1377    else
1378       set_xio_using_server iodef.xml false
1379    fi
1380    cd ${SETTE_DIR}
1381    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1382   
1383    cd ${SETTE_DIR}
1384    export TEST_NAME="SHORT"
1385    . ./prepare_exe_dir.sh
1386    cd ${EXE_DIR}
1387    set_namelist namelist_cfg cn_exp \"O2LP_SHORT\"
1388    set_namelist namelist_cfg nn_it000 76
1389    set_namelist namelist_cfg nn_itend 150
1390    set_namelist namelist_cfg nn_stock 75
1391    set_namelist namelist_cfg ln_rstart .true.
1392    set_namelist namelist_cfg nn_rstctl 2
1393    set_namelist namelist_cfg ln_clobber .true.
1394    set_namelist namelist_cfg ln_read_cfg .true.
1395    set_namelist namelist_cfg ln_linssh .true.
1396    set_namelist namelist_cfg ln_hpg_sco .false.
1397    set_namelist namelist_cfg ln_hpg_zps .true.
1398    set_namelist namelist_cfg nn_fwb 0
1399    set_namelist namelist_cfg jpni 2
1400    set_namelist namelist_cfg jpnj 2
1401
1402    set_namelist namelist_cfg jpnij 4
1403#   set_namelist namelist_cfg nn_solv 2
1404    set_namelist 1_namelist_cfg cn_exp \"O2LP_SHORT\"
1405    set_namelist 1_namelist_cfg nn_it000 151
1406    set_namelist 1_namelist_cfg nn_itend 300
1407    set_namelist 1_namelist_cfg nn_stock 150
1408    set_namelist 1_namelist_cfg ln_rstart .true.
1409    set_namelist 1_namelist_cfg nn_rstctl 2
1410    set_namelist 1_namelist_cfg ln_clobber .true.
1411    set_namelist 1_namelist_cfg ln_read_cfg .true.
1412    set_namelist 1_namelist_cfg ln_linssh .true.
1413    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1414    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1415    set_namelist namelist_cfg cn_ocerst_in \"O2LP_LONG_00000075_restart\"
1416    set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
1417
1418    set_namelist 1_namelist_cfg cn_ocerst_in \"O2LP_LONG_00000150_restart\"
1419
1420    for (( i=1; i<=$NPROC; i++)) ; do
1421        L_NPROC=$(( $i - 1 ))
1422        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1423        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
1424        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
1425        ln -sf ../LONG/1_O2LP_LONG_00000150_restart_${L_NPROC}.nc .
1426    done
1427    if [ ${USING_MPMD} == "yes" ] ; then
1428       set_xio_using_server iodef.xml true
1429    else
1430       set_xio_using_server iodef.xml false
1431    fi
1432    cd ${SETTE_DIR}
1433    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1434    cd ${SETTE_DIR}
1435    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1436fi
1437
1438## Reproducibility tests for ORCA2_LIM_AGRIF
1439if [ ${config} -eq 18 ] ;  then
1440    unset NEMO_TDIR
1441    export TEST_NAME="REPRO_4_4"
1442    cd ${CONFIG_DIR0}
1443    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_16 -r ORCA2_LIM -j 8 add_key "key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1444    cd ${SETTE_DIR}
1445    . ./param.cfg
1446    . ./all_functions.sh
1447    . ./prepare_exe_dir.sh
1448    JOB_FILE=${EXE_DIR}/run_job.sh
1449    NPROC=16
1450    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1451    cd ${EXE_DIR}
1452    set_namelist namelist_cfg nn_it000 1
1453    set_namelist namelist_cfg nn_itend 75
1454    set_namelist namelist_cfg ln_ctl .false.
1455    set_namelist namelist_cfg ln_clobber .true.
1456    set_namelist namelist_cfg ln_read_cfg .true.
1457    set_namelist namelist_cfg ln_linssh .true.
1458    set_namelist namelist_cfg ln_hpg_sco .false.
1459    set_namelist namelist_cfg ln_hpg_zps .true.
1460    set_namelist namelist_cfg nn_fwb 0
1461    set_namelist namelist_cfg jpni 4
1462    set_namelist namelist_cfg jpnj 4
1463    set_namelist namelist_cfg jpnij 16
1464    set_namelist 1_namelist_cfg nn_it000 1
1465    set_namelist 1_namelist_cfg nn_itend 150
1466    set_namelist 1_namelist_cfg ln_ctl .false.
1467    set_namelist 1_namelist_cfg ln_clobber .true.
1468    set_namelist 1_namelist_cfg ln_read_cfg .true.
1469    set_namelist 1_namelist_cfg ln_linssh .true.
1470    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1471    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1472
1473    if [ ${USING_MPMD} == "yes" ] ; then
1474       set_xio_using_server iodef.xml true
1475    else
1476       set_xio_using_server iodef.xml false
1477    fi
1478    cd ${SETTE_DIR}
1479    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1480    cd ${SETTE_DIR}
1481    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1482
1483    cd ${SETTE_DIR}
1484    export TEST_NAME="REPRO_2_8"
1485    . ./prepare_exe_dir.sh
1486    JOB_FILE=${EXE_DIR}/run_job.sh
1487    NPROC=16
1488    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1489    cd ${EXE_DIR}
1490    set_namelist namelist_cfg nn_it000 1
1491    set_namelist namelist_cfg nn_itend 75
1492    set_namelist namelist_cfg ln_ctl .false.
1493    set_namelist namelist_cfg ln_clobber .true.
1494    set_namelist namelist_cfg ln_read_cfg .true.
1495    set_namelist namelist_cfg ln_linssh .true.
1496    set_namelist namelist_cfg ln_hpg_sco .false.
1497    set_namelist namelist_cfg ln_hpg_zps .true.
1498    set_namelist namelist_cfg nn_fwb 0
1499    set_namelist namelist_cfg jpni 2
1500    set_namelist namelist_cfg jpnj 8
1501    set_namelist namelist_cfg jpnij 16
1502    set_namelist 1_namelist_cfg nn_it000 1
1503    set_namelist 1_namelist_cfg nn_itend 150
1504    set_namelist 1_namelist_cfg ln_ctl .false.
1505    set_namelist 1_namelist_cfg ln_clobber .true.
1506    set_namelist 1_namelist_cfg ln_read_cfg .true.
1507    set_namelist 1_namelist_cfg ln_linssh .true.
1508    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1509    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1510
1511    if [ ${USING_MPMD} == "yes" ] ; then
1512       set_xio_using_server iodef.xml true
1513    else
1514       set_xio_using_server iodef.xml false
1515    fi
1516    cd ${SETTE_DIR}
1517    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1518    cd ${SETTE_DIR}
1519    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1520fi
1521
1522done
Note: See TracBrowser for help on using the repository browser.