New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette.sh in trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette.sh @ 8583

Last change on this file since 8583 was 8583, checked in by cbricaud, 7 years ago

fix ticket #1944 in trunk ( SAS restartability)

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