source: branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/SETTE/sette.sh @ 6975

Last change on this file since 6975 was 6975, checked in by flavoni, 4 years ago

change sette.sh for SIMPLIF-2

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