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

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

update for SETTE

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