source: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/SETTE/sette.sh @ 7199

Last change on this file since 7199 was 7199, checked in by cetlod, 4 years ago

new top interface: update sette.sh

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