source: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/SETTE/sette.sh @ 8292

Last change on this file since 8292 was 8292, checked in by clem, 3 years ago

also correct sette.sh

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