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

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

update sette

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