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 branches/2017/dev_merge_2017/NEMOGCM/SETTE – NEMO

source: branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh @ 9110

Last change on this file since 9110 was 9110, checked in by mathiot, 6 years ago

restore reading config from userdef instead domcfg + restore non linear drag + change processor decomposition (7x3, 4x8 and 3x5). runstat similar in all config

  • Property svn:executable set to *
File size: 54.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#                      (run.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
136# ORCA2_LIM3_PISCES :  2
137# ORCA2_OFF_PISCES  :  3
138# AMM12             :  4
139# SAS               :  5     fos SAS there is no run.stat so is useless to test REPRO
140# ISOMIP            :  6
141# ORCA2_LIM3_OBS    :  7
142# ORCA2_AGRIF_LIM3  :  8
143# ORCA2AGR          :  9 & 10  AGRIF active with no zoom, compared to no AGRIF cpp key
144
145for config in 1 2 3 4 5 6 7 8 9 10
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_ST -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}
222
223    ## Reproducibility tests for GYRE_PISCES
224    export TEST_NAME="REPRO_4_8"
225    cd ${CONFIG_DIR0}
226    cd ${SETTE_DIR}
227    . ./param.cfg
228    . ./all_functions.sh
229    . ./prepare_exe_dir.sh
230    JOB_FILE=${EXE_DIR}/run_job.sh
231    NPROC=32
232    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
233    cd ${EXE_DIR}
234    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
235    set_namelist namelist_cfg nn_it000 1
236    set_namelist namelist_cfg nn_itend 60
237    set_namelist namelist_cfg nn_fwb 0
238    set_namelist namelist_cfg ln_ctl .false.
239    set_namelist namelist_cfg ln_clobber .true.
240    set_namelist namelist_cfg ln_linssh .true.
241    set_namelist namelist_cfg ln_read_cfg .false.
242    set_namelist namelist_cfg jpni 4
243    set_namelist namelist_cfg jpnj 8
244    set_namelist namelist_cfg jpnij 32
245    if [ ${USING_MPMD} == "yes" ] ; then
246       set_xio_using_server iodef.xml true
247    else
248       set_xio_using_server iodef.xml false
249    fi
250    cd ${SETTE_DIR}
251    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
252    cd ${SETTE_DIR}
253    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
254
255    cd ${SETTE_DIR}
256    export TEST_NAME="REPRO_8_4"
257    . ./prepare_exe_dir.sh
258    JOB_FILE=${EXE_DIR}/run_job.sh
259    NPROC=32
260    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
261    cd ${EXE_DIR}
262    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
263    set_namelist namelist_cfg nn_it000 1
264    set_namelist namelist_cfg nn_itend 60
265    set_namelist namelist_cfg nn_fwb 0
266    set_namelist namelist_cfg ln_ctl .false.
267    set_namelist namelist_cfg ln_clobber .true.
268    set_namelist namelist_cfg ln_linssh .true.
269    set_namelist namelist_cfg ln_read_cfg .false.
270    set_namelist namelist_cfg jpni 8
271    set_namelist namelist_cfg jpnj 4
272    set_namelist namelist_cfg jpnij 32
273    if [ ${USING_MPMD} == "yes" ] ; then
274       set_xio_using_server iodef.xml true
275    else
276       set_xio_using_server iodef.xml false
277    fi
278    cd ${SETTE_DIR}
279    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
280    cd ${SETTE_DIR}
281    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
282
283fi
284
285# TESTS FOR ORCA2_LIM3_PISCES CONFIGURATION
286if [ ${config} -eq 2 ] ;  then
287    ## Restartability tests for ORCA2_LIM3_PISCES
288    export TEST_NAME="LONG"
289    cd ${CONFIG_DIR0}
290    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_ST -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
291    cd ${SETTE_DIR}
292    . ./param.cfg
293    . ./all_functions.sh
294    . ./prepare_exe_dir.sh
295    JOB_FILE=${EXE_DIR}/run_job.sh
296    NPROC=32
297    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
298    cd ${EXE_DIR}
299    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
300    set_namelist namelist_cfg nn_it000 1
301    set_namelist namelist_cfg nn_itend 150
302    set_namelist namelist_cfg nn_stock 75
303    set_namelist namelist_cfg ln_clobber .true.
304    set_namelist namelist_cfg ln_read_cfg .true.
305    set_namelist namelist_cfg ln_linssh .false.
306    set_namelist namelist_cfg nn_fwb 0
307    set_namelist namelist_cfg jpni 4
308    set_namelist namelist_cfg jpnj 8
309    set_namelist namelist_cfg jpnij 32
310    set_namelist namelist_ice_cfg ln_icediachk .true.
311##    set_namelist namelist_ice_cfg ln_icediahsb .true.
312    set_namelist namelist_top_cfg ln_trcdta .false.
313    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
314    # if not you need input files, and for tests is not necessary
315    set_namelist namelist_pisces_cfg ln_presatm .false.
316    set_namelist namelist_pisces_cfg ln_varpar .false.
317    set_namelist namelist_pisces_cfg ln_dust .false.
318    set_namelist namelist_pisces_cfg ln_solub .false.
319    set_namelist namelist_pisces_cfg ln_river .false.
320    set_namelist namelist_pisces_cfg ln_ndepo .false.
321    set_namelist namelist_pisces_cfg ln_ironsed .false.
322    set_namelist namelist_pisces_cfg ln_ironice .false.
323    set_namelist namelist_pisces_cfg ln_hydrofe .false.
324    if [ ${USING_MPMD} == "yes" ] ; then
325       set_xio_using_server iodef.xml true
326    else
327       set_xio_using_server iodef.xml false
328    fi
329    cd ${SETTE_DIR}
330    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
331   
332    cd ${SETTE_DIR}
333    export TEST_NAME="SHORT"
334    . ./prepare_exe_dir.sh
335    cd ${EXE_DIR}
336    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
337    set_namelist namelist_cfg nn_it000 76
338    set_namelist namelist_cfg nn_itend 150
339    set_namelist namelist_cfg nn_stock 75
340    set_namelist namelist_cfg ln_rstart .true.
341    set_namelist namelist_cfg nn_rstctl 2
342    set_namelist namelist_cfg ln_clobber .true.
343    set_namelist namelist_cfg ln_read_cfg .true.
344    set_namelist namelist_cfg ln_linssh .false.
345    set_namelist namelist_cfg ln_icebergs .true.
346    set_namelist namelist_cfg nn_fwb 0
347    set_namelist namelist_cfg jpni 4
348    set_namelist namelist_cfg jpnj 8
349    set_namelist namelist_cfg jpnij 32
350    set_namelist namelist_ice_cfg ln_icediachk .true.
351##    set_namelist namelist_ice_cfg ln_icediahsb .true.
352    set_namelist namelist_top_cfg ln_rsttr .true.
353    set_namelist namelist_top_cfg nn_rsttr 2
354    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000075_restart\"
355    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000075_restart_trc\"
356    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000075_restart_ice\"
357    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
358    # if not you need input files, and for tests is not necessary
359    set_namelist namelist_pisces_cfg ln_presatm .false.
360    set_namelist namelist_pisces_cfg ln_varpar .false.
361    set_namelist namelist_pisces_cfg ln_dust .false.
362    set_namelist namelist_pisces_cfg ln_solub .false.
363    set_namelist namelist_pisces_cfg ln_river .false.
364    set_namelist namelist_pisces_cfg ln_ndepo .false.
365    set_namelist namelist_pisces_cfg ln_ironsed .false.
366    set_namelist namelist_pisces_cfg ln_ironice .false.
367    set_namelist namelist_pisces_cfg ln_hydrofe .false.
368    # put ln_pisdmp to false : no restoring to global mean value
369    set_namelist namelist_pisces_cfg ln_pisdmp .false.
370    for (( i=1; i<=$NPROC; i++)) ; do
371        L_NPROC=$(( $i - 1 ))
372        L_NPROC=`printf "%04d\n" ${L_NPROC}`
373        ln -sf ../LONG/O2L3P_LONG_00000075_restart_${L_NPROC}.nc .
374        ln -sf ../LONG/O2L3P_LONG_00000075_restart_trc_${L_NPROC}.nc .
375        ln -sf ../LONG/O2L3P_LONG_00000075_restart_ice_${L_NPROC}.nc .
376        ln -sf ../LONG/O2L3P_LONG_icebergs_00000075_restart_${L_NPROC}.nc O2L3P_LONG_00000075_restart_icebergs_${L_NPROC}.nc
377    done
378    if [ ${USING_MPMD} == "yes" ] ; then
379       set_xio_using_server iodef.xml true
380    else
381       set_xio_using_server iodef.xml false
382    fi
383    cd ${SETTE_DIR}
384    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
385    cd ${SETTE_DIR}
386    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
387
388    ## Reproducibility tests for ORCA2_LIM3_PISCES
389    export TEST_NAME="REPRO_4_8"
390    cd ${CONFIG_DIR0}
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=32
397    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
398    cd ${EXE_DIR}
399    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
400    set_namelist namelist_cfg nn_it000 1
401    set_namelist namelist_cfg nn_itend 75
402    set_namelist namelist_cfg nn_fwb 0
403    set_namelist namelist_cfg ln_ctl .false.
404    set_namelist namelist_cfg ln_clobber .true.
405    set_namelist namelist_cfg ln_read_cfg .true.
406    set_namelist namelist_cfg ln_linssh .false.
407    set_namelist namelist_cfg ln_icebergs .true.
408    set_namelist namelist_cfg jpni 4
409    set_namelist namelist_cfg jpnj 8
410    set_namelist namelist_cfg jpnij 32
411    set_namelist namelist_ice_cfg ln_icediachk .true.
412    set_namelist namelist_ice_cfg ln_icediahsb .true.
413    set_namelist namelist_top_cfg ln_trcdta .false.
414    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
415    # if not you need input files, and for tests is not necessary
416    set_namelist namelist_pisces_cfg ln_presatm .false.
417    set_namelist namelist_pisces_cfg ln_varpar .false.
418    set_namelist namelist_pisces_cfg ln_dust .false.
419    set_namelist namelist_pisces_cfg ln_solub .false.
420    set_namelist namelist_pisces_cfg ln_river .false.
421    set_namelist namelist_pisces_cfg ln_ndepo .false.
422    set_namelist namelist_pisces_cfg ln_ironsed .false.
423    set_namelist namelist_pisces_cfg ln_ironice .false.
424    set_namelist namelist_pisces_cfg ln_hydrofe .false.
425    # put ln_pisdmp to false : no restoring to global mean value
426    set_namelist namelist_pisces_cfg ln_pisdmp .false.
427    if [ ${USING_MPMD} == "yes" ] ; then
428       set_xio_using_server iodef.xml true
429    else
430       set_xio_using_server iodef.xml false
431    fi
432    cd ${SETTE_DIR}
433    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
434    cd ${SETTE_DIR}
435    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
436
437    cd ${SETTE_DIR}
438    export TEST_NAME="REPRO_8_4"
439    . ./prepare_exe_dir.sh
440    JOB_FILE=${EXE_DIR}/run_job.sh
441    NPROC=32
442    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
443    cd ${EXE_DIR}
444    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
445    set_namelist namelist_cfg nn_it000 1
446    set_namelist namelist_cfg nn_itend 75
447    set_namelist namelist_cfg ln_clobber .true.
448    set_namelist namelist_cfg ln_read_cfg .true.
449    set_namelist namelist_cfg ln_linssh .false.
450    set_namelist namelist_cfg ln_icebergs .true.
451    set_namelist namelist_cfg nn_fwb 0
452    set_namelist namelist_cfg jpni 8
453    set_namelist namelist_cfg jpnj 4
454    set_namelist namelist_cfg jpnij 32
455    set_namelist namelist_ice_cfg ln_icediachk .true.
456    set_namelist namelist_ice_cfg ln_icediahsb .true.
457    set_namelist namelist_top_cfg ln_trcdta .false.
458    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
459    # if not you need input files, and for tests is not necessary
460    set_namelist namelist_pisces_cfg ln_presatm .false.
461    set_namelist namelist_pisces_cfg ln_varpar .false.
462    set_namelist namelist_pisces_cfg ln_dust .false.
463    set_namelist namelist_pisces_cfg ln_solub .false.
464    set_namelist namelist_pisces_cfg ln_river .false.
465    set_namelist namelist_pisces_cfg ln_ndepo .false.
466    set_namelist namelist_pisces_cfg ln_ironsed .false.
467    set_namelist namelist_pisces_cfg ln_ironice .false.
468    set_namelist namelist_pisces_cfg ln_hydrofe .false.
469    # put ln_pisdmp to false : no restoring to global mean value
470    set_namelist namelist_pisces_cfg ln_pisdmp .false.
471    if [ ${USING_MPMD} == "yes" ] ; then
472       set_xio_using_server iodef.xml true
473    else
474       set_xio_using_server iodef.xml false
475    fi
476    cd ${SETTE_DIR}
477    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
478    cd ${SETTE_DIR}
479    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
480fi
481
482# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
483if [ ${config} -eq 3 ] ;  then
484    ## Restartability tests for ORCA2_OFF_PISCES
485    export TEST_NAME="LONG"
486    cd ${CONFIG_DIR0}
487    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
488    cd ${SETTE_DIR}
489    . ./param.cfg
490    . ./all_functions.sh
491    . ./prepare_exe_dir.sh
492    JOB_FILE=${EXE_DIR}/run_job.sh
493    NPROC=32
494    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
495    cd ${EXE_DIR}
496    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
497    set_namelist namelist_cfg nn_it000 1
498    set_namelist namelist_cfg nn_itend 40
499    set_namelist namelist_cfg nn_stock 20
500    set_namelist namelist_cfg ln_clobber .true.
501    set_namelist namelist_cfg ln_read_cfg .true.
502    set_namelist namelist_cfg ln_linssh .true.
503    set_namelist namelist_cfg jpni 4
504    set_namelist namelist_cfg jpnj 8
505    set_namelist namelist_cfg jpnij 32
506    set_namelist namelist_top_cfg ln_trcdta .false.
507    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
508    # if not you need input files, and for tests is not necessary
509    set_namelist namelist_pisces_cfg ln_presatm .false.
510    set_namelist namelist_pisces_cfg ln_varpar .false.
511    set_namelist namelist_pisces_cfg ln_dust .false.
512    set_namelist namelist_pisces_cfg ln_solub .false.
513    set_namelist namelist_pisces_cfg ln_river .false.
514    set_namelist namelist_pisces_cfg ln_ndepo .false.
515    set_namelist namelist_pisces_cfg ln_ironsed .false.
516    set_namelist namelist_pisces_cfg ln_ironice .false.
517    set_namelist namelist_pisces_cfg ln_hydrofe .false.
518    # put ln_pisdmp to false : no restoring to global mean value
519    set_namelist namelist_pisces_cfg ln_pisdmp .false.
520    if [ ${USING_MPMD} == "yes" ] ; then
521       set_xio_using_server iodef.xml true
522    else
523       set_xio_using_server iodef.xml false
524    fi
525    cd ${SETTE_DIR}
526    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
527   
528    cd ${SETTE_DIR}
529    export TEST_NAME="SHORT"
530    . ./prepare_exe_dir.sh
531    cd ${EXE_DIR}
532    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
533    set_namelist namelist_cfg nn_it000 21
534    set_namelist namelist_cfg nn_itend 40
535    set_namelist namelist_cfg nn_stock 20
536    set_namelist namelist_cfg ln_clobber .true.
537    set_namelist namelist_cfg ln_read_cfg .true.
538    set_namelist namelist_cfg ln_linssh .true.
539    set_namelist namelist_cfg jpni 4
540    set_namelist namelist_cfg jpnj 8
541    set_namelist namelist_cfg jpnij 32
542    set_namelist namelist_top_cfg ln_rsttr .true.
543    set_namelist namelist_top_cfg nn_rsttr 2
544    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
545    for (( i=1; i<=$NPROC; i++)) ; do
546        L_NPROC=$(( $i - 1 ))
547        L_NPROC=`printf "%04d\n" ${L_NPROC}`
548        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
549    done
550    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
551    # if not you need input files, and for tests is not necessary
552    set_namelist namelist_pisces_cfg ln_presatm .false.
553    set_namelist namelist_pisces_cfg ln_varpar .false.
554    set_namelist namelist_pisces_cfg ln_dust .false.
555    set_namelist namelist_pisces_cfg ln_solub .false.
556    set_namelist namelist_pisces_cfg ln_river .false.
557    set_namelist namelist_pisces_cfg ln_ndepo .false.
558    set_namelist namelist_pisces_cfg ln_ironsed .false.
559    set_namelist namelist_pisces_cfg ln_ironice .false.
560    set_namelist namelist_pisces_cfg ln_hydrofe .false.
561    # put ln_pisdmp to false : no restoring to global mean value
562    set_namelist namelist_pisces_cfg ln_pisdmp .false.
563    if [ ${USING_MPMD} == "yes" ] ; then
564       set_xio_using_server iodef.xml true
565    else
566       set_xio_using_server iodef.xml false
567    fi
568    cd ${SETTE_DIR}
569    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
570    cd ${SETTE_DIR}
571    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
572
573    ## Reproducibility tests for ORCA2_OFF_PISCES
574    export TEST_NAME="REPRO_4_8"
575    cd ${CONFIG_DIR0}
576    cd ${SETTE_DIR}
577    . ./param.cfg
578    . ./all_functions.sh
579    . ./prepare_exe_dir.sh
580    JOB_FILE=${EXE_DIR}/run_job.sh
581    NPROC=32
582    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
583    cd ${EXE_DIR}
584    set_namelist namelist_cfg cn_exp \"OFFP_48\"
585    set_namelist namelist_cfg nn_it000 1
586    set_namelist namelist_cfg nn_itend 40
587    set_namelist namelist_cfg ln_ctl .false.
588    set_namelist namelist_cfg ln_clobber .true.
589    set_namelist namelist_cfg ln_read_cfg .true.
590    set_namelist namelist_cfg ln_linssh .true.
591    set_namelist namelist_cfg jpni 4
592    set_namelist namelist_cfg jpnj 8
593    set_namelist namelist_cfg jpnij 32
594    set_namelist namelist_top_cfg ln_trcdta .false.
595    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
596    # if not you need input files, and for tests is not necessary
597    set_namelist namelist_pisces_cfg ln_presatm .false.
598    set_namelist namelist_pisces_cfg ln_varpar .false.
599    set_namelist namelist_pisces_cfg ln_dust .false.
600    set_namelist namelist_pisces_cfg ln_solub .false.
601    set_namelist namelist_pisces_cfg ln_river .false.
602    set_namelist namelist_pisces_cfg ln_ndepo .false.
603    set_namelist namelist_pisces_cfg ln_ironsed .false.
604    set_namelist namelist_pisces_cfg ln_ironice .false.
605    set_namelist namelist_pisces_cfg ln_hydrofe .false.
606    # put ln_pisdmp to false : no restoring to global mean value
607    set_namelist namelist_pisces_cfg ln_pisdmp .false.
608    if [ ${USING_MPMD} == "yes" ] ; then
609       set_xio_using_server iodef.xml true
610    else
611       set_xio_using_server iodef.xml false
612    fi
613    cd ${SETTE_DIR}
614    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
615    cd ${SETTE_DIR}
616    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
617
618    cd ${SETTE_DIR}
619    export TEST_NAME="REPRO_8_4"
620    . ./prepare_exe_dir.sh
621    JOB_FILE=${EXE_DIR}/run_job.sh
622    NPROC=32
623    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
624    cd ${EXE_DIR}
625    set_namelist namelist_cfg cn_exp \"OFFP_84\"
626    set_namelist namelist_cfg nn_it000 1
627    set_namelist namelist_cfg nn_itend 40
628    set_namelist namelist_cfg ln_ctl .false.
629    set_namelist namelist_cfg ln_clobber .true.
630    set_namelist namelist_cfg ln_read_cfg .true.
631    set_namelist namelist_cfg ln_linssh .true.
632    set_namelist namelist_cfg jpni 8
633    set_namelist namelist_cfg jpnj 4
634    set_namelist namelist_cfg jpnij 32
635    set_namelist namelist_top_cfg ln_trcdta .false.
636    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
637    # if not you need input files, and for tests is not necessary
638    set_namelist namelist_pisces_cfg ln_presatm .false.
639    set_namelist namelist_pisces_cfg ln_varpar .false.
640    set_namelist namelist_pisces_cfg ln_dust .false.
641    set_namelist namelist_pisces_cfg ln_solub .false.
642    set_namelist namelist_pisces_cfg ln_river .false.
643    set_namelist namelist_pisces_cfg ln_ndepo .false.
644    set_namelist namelist_pisces_cfg ln_ironsed .false.
645    set_namelist namelist_pisces_cfg ln_ironice .false.
646    set_namelist namelist_pisces_cfg ln_hydrofe .false.
647    # put ln_pisdmp to false : no restoring to global mean value
648    set_namelist namelist_pisces_cfg ln_pisdmp .false.
649    if [ ${USING_MPMD} == "yes" ] ; then
650       set_xio_using_server iodef.xml true
651    else
652       set_xio_using_server iodef.xml false
653    fi
654    cd ${SETTE_DIR}
655    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
656    cd ${SETTE_DIR}
657    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
658fi
659
660# TESTS FOR AMM12 CONFIGURATION
661if [ ${config} -eq 4 ] ;  then
662    ## Restartability tests for AMM12
663    export TEST_NAME="LONG"
664    cd ${CONFIG_DIR0}
665    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS}
666    cd ${SETTE_DIR}
667    . ./param.cfg
668    . ./all_functions.sh
669    . ./prepare_exe_dir.sh
670    JOB_FILE=${EXE_DIR}/run_job.sh
671    NPROC=32
672    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
673    cd ${EXE_DIR}
674    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
675    set_namelist namelist_cfg nn_it000 1
676    set_namelist namelist_cfg nn_itend 576
677    set_namelist namelist_cfg nn_stock 288
678    set_namelist namelist_cfg nn_fwb 0
679    set_namelist namelist_cfg ln_ctl .false.
680    set_namelist namelist_cfg ln_clobber .true.
681    set_namelist namelist_cfg ln_read_cfg .true.
682    set_namelist namelist_cfg ln_linssh .false.
683##SF
684    set_namelist namelist_cfg ln_lin .true.
685    set_namelist namelist_cfg ln_loglayer .false.
686##SF
687    set_namelist namelist_cfg jpni 4
688    set_namelist namelist_cfg jpnj 8
689    set_namelist namelist_cfg jpnij 32
690    if [ ${USING_MPMD} == "yes" ] ; then
691       set_xio_using_server iodef.xml true
692    else
693       set_xio_using_server iodef.xml false
694    fi
695    cd ${SETTE_DIR}
696    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
697
698    cd ${SETTE_DIR}
699    export TEST_NAME="SHORT"
700    . ./prepare_exe_dir.sh
701    cd ${EXE_DIR}
702    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
703    set_namelist namelist_cfg nn_it000 289
704    set_namelist namelist_cfg nn_itend 576
705    set_namelist namelist_cfg nn_fwb 0
706    set_namelist namelist_cfg ln_ctl .false.
707    set_namelist namelist_cfg ln_clobber .true.
708    set_namelist namelist_cfg ln_read_cfg .true.
709    set_namelist namelist_cfg ln_linssh .false.
710##SF
711    set_namelist namelist_cfg ln_lin .true.
712    set_namelist namelist_cfg ln_loglayer .false.
713##SF
714    set_namelist namelist_cfg jpni 4
715    set_namelist namelist_cfg jpnj 8
716    set_namelist namelist_cfg jpnij 32
717    set_namelist namelist_cfg ln_rstart .true.
718    set_namelist namelist_cfg nn_rstctl 2
719    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
720    set_namelist namelist_cfg nn_date0 20120102
721    for (( i=1; i<=$NPROC; i++)) ; do
722        L_NPROC=$(( $i - 1 ))
723        L_NPROC=`printf "%04d\n" ${L_NPROC}`
724        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
725    done
726    if [ ${USING_MPMD} == "yes" ] ; then
727       set_xio_using_server iodef.xml true
728    else
729       set_xio_using_server iodef.xml false
730    fi
731    cd ${SETTE_DIR}
732    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
733    cd ${SETTE_DIR}
734    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
735
736## Reproducibility tests for AMM12
737    export TEST_NAME="REPRO_8_4"
738    cd ${CONFIG_DIR0}
739    cd ${SETTE_DIR}
740    . ./param.cfg
741    . ./all_functions.sh
742    . ./prepare_exe_dir.sh
743    JOB_FILE=${EXE_DIR}/run_job.sh
744    NPROC=32
745    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
746    cd ${EXE_DIR}
747    set_namelist namelist_cfg cn_exp \"AMM12_84\"
748    set_namelist namelist_cfg nn_it000 1
749    set_namelist namelist_cfg nn_itend 576
750    set_namelist namelist_cfg nn_fwb 0
751    set_namelist namelist_cfg ln_ctl .false.
752    set_namelist namelist_cfg ln_clobber .true.
753    set_namelist namelist_cfg ln_read_cfg .true.
754    set_namelist namelist_cfg ln_linssh .false.
755##SF
756    set_namelist namelist_cfg ln_lin .true.
757    set_namelist namelist_cfg ln_loglayer .false.
758##SF
759    set_namelist namelist_cfg jpni 8
760    set_namelist namelist_cfg jpnj 4
761    set_namelist namelist_cfg jpnij 32
762    if [ ${USING_MPMD} == "yes" ] ; then
763       set_xio_using_server iodef.xml true
764    else
765       set_xio_using_server iodef.xml false
766    fi
767    cd ${SETTE_DIR}
768    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
769    cd ${SETTE_DIR}
770    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
771
772    cd ${SETTE_DIR}
773    export TEST_NAME="REPRO_4_8"
774    . ./prepare_exe_dir.sh
775    JOB_FILE=${EXE_DIR}/run_job.sh
776    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
777    cd ${EXE_DIR}
778    set_namelist namelist_cfg cn_exp \"AMM12_48\"
779    set_namelist namelist_cfg nn_it000 1
780    set_namelist namelist_cfg nn_itend 576
781    set_namelist namelist_cfg nn_fwb 0
782    set_namelist namelist_cfg ln_ctl .false.
783    set_namelist namelist_cfg ln_clobber .true.
784    set_namelist namelist_cfg ln_read_cfg .true.
785    set_namelist namelist_cfg ln_linssh .false.
786##SF
787    set_namelist namelist_cfg ln_lin .true.
788    set_namelist namelist_cfg ln_loglayer .false.
789##SF
790    set_namelist namelist_cfg jpni 4
791    set_namelist namelist_cfg jpnj 8
792    set_namelist namelist_cfg jpnij 32
793    if [ ${USING_MPMD} == "yes" ] ; then
794       set_xio_using_server iodef.xml true
795    else
796       set_xio_using_server iodef.xml false
797    fi
798    cd ${SETTE_DIR}
799    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
800    cd ${SETTE_DIR}
801    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
802fi
803
804
805# TESTS FOR ORCA2_SAS_LIM3 CONFIGURATION
806if [ ${config} -eq 5 ] ;  then
807    ## Restartability tests for SAS
808    export TEST_NAME="LONG"
809    cd ${CONFIG_DIR0}
810    . ./makenemo -m ${CMP_NAM} -n SAS_ST -r ORCA2_SAS_LIM3 -j 8 del_key ${DEL_KEYS}
811    cd ${SETTE_DIR}
812    . ./param.cfg
813    . ./all_functions.sh
814    . ./prepare_exe_dir.sh
815    JOB_FILE=${EXE_DIR}/run_job.sh
816    NPROC=32
817    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
818    cd ${EXE_DIR}
819    set_namelist namelist_cfg cn_exp \"SAS\"
820    set_namelist namelist_cfg nn_it000 1
821    set_namelist namelist_cfg nn_itend 240
822    set_namelist namelist_cfg nn_stock 120
823    set_namelist namelist_cfg ln_ctl .false.
824    set_namelist namelist_cfg ln_clobber .true.
825    set_namelist namelist_cfg ln_read_cfg .true.
826    set_namelist namelist_cfg ln_linssh .true.
827    set_namelist namelist_cfg nn_fwb 0
828    set_namelist namelist_cfg jpni 4
829    set_namelist namelist_cfg jpnj 8
830    set_namelist namelist_cfg jpnij 32
831    set_namelist namelist_ice_cfg ln_icediachk .true.
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_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
839
840    cd ${SETTE_DIR}
841    export TEST_NAME="SHORT"
842    . ./prepare_exe_dir.sh
843    cd ${EXE_DIR}
844    set_namelist namelist_cfg cn_exp \"SAS\"
845    set_namelist namelist_cfg nn_it000 121
846    set_namelist namelist_cfg nn_itend 240
847    set_namelist namelist_cfg ln_ctl .false.
848    set_namelist namelist_cfg ln_clobber .true.
849    set_namelist namelist_cfg ln_read_cfg .true.
850    set_namelist namelist_cfg ln_linssh .true.
851    set_namelist namelist_cfg nn_fwb 0
852    set_namelist namelist_cfg jpni 4
853    set_namelist namelist_cfg jpnj 8
854    set_namelist namelist_cfg jpnij 32
855    set_namelist namelist_cfg ln_rstart .true.
856    set_namelist namelist_cfg nn_rstctl 2
857    set_namelist namelist_cfg nn_date0 010109
858    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\"
859    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\"
860    if [ ${USING_MPMD} == "yes" ] ; then
861       set_xio_using_server iodef.xml true
862    else
863       set_xio_using_server iodef.xml false
864    fi
865    for (( i=1; i<=$NPROC; i++)) ; do
866        L_NPROC=$(( $i - 1 ))
867        L_NPROC=`printf "%04d\n" ${L_NPROC}`
868        ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc .
869        ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc .
870    done
871    cd ${SETTE_DIR}
872    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
873    cd ${SETTE_DIR}
874    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
875fi
876
877# TESTS FOR ISOMIP CONFIGURATION
878if [ ${config} -eq 6 ] ;  then
879    ## Restartability tests for ISOMIP
880    export TEST_NAME="LONG"
881    cd ${CONFIG_DIR0}
882    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
883    cd ${SETTE_DIR}
884    . ./param.cfg
885    . ./all_functions.sh
886    . ./prepare_exe_dir.sh
887    JOB_FILE=${EXE_DIR}/run_job.sh
888    NPROC=15
889    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
890    cd ${EXE_DIR}
891    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
892    set_namelist namelist_cfg nn_it000 1
893    set_namelist namelist_cfg nn_itend 96
894    set_namelist namelist_cfg nn_stock 48
895    set_namelist namelist_cfg ln_clobber .true.
896    set_namelist namelist_cfg ln_read_cfg .false.
897    set_namelist namelist_cfg ln_icebergs .false.
898    set_namelist namelist_cfg ln_bergdia .false.
899    set_namelist namelist_cfg jpni 5
900    set_namelist namelist_cfg jpnj 3
901    set_namelist namelist_cfg jpnij 15
902    if [ ${USING_MPMD} == "yes" ] ; then
903       set_xio_using_server iodef.xml true
904    else
905       set_xio_using_server iodef.xml false
906    fi
907    cd ${SETTE_DIR}
908    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
909
910    cd ${SETTE_DIR}
911    export TEST_NAME="SHORT"
912    . ./prepare_exe_dir.sh
913    cd ${EXE_DIR}
914    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
915    set_namelist namelist_cfg nn_it000 49
916    set_namelist namelist_cfg nn_itend 96
917    set_namelist namelist_cfg nn_stock 48
918    set_namelist namelist_cfg ln_rstart .true.
919    set_namelist namelist_cfg nn_rstctl 2
920    set_namelist namelist_cfg ln_clobber .true.
921    set_namelist namelist_cfg ln_read_cfg .false.
922    set_namelist namelist_cfg ln_bergdia .false.
923    set_namelist namelist_cfg jpni 5
924    set_namelist namelist_cfg jpnj 3
925    set_namelist namelist_cfg jpnij 15
926    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
927    if [ ${USING_MPMD} == "yes" ] ; then
928       set_xio_using_server iodef.xml true
929    else
930       set_xio_using_server iodef.xml false
931    fi
932    for (( i=1; i<=$NPROC; i++)) ; do
933        L_NPROC=$(( $i - 1 ))
934        L_NPROC=`printf "%04d\n" ${L_NPROC}`
935        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
936    done
937    if [ ${USING_MPMD} == "yes" ] ; then
938       set_xio_using_server iodef.xml true
939    else
940       set_xio_using_server iodef.xml false
941    fi
942    cd ${SETTE_DIR}
943    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
944    cd ${SETTE_DIR}
945    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
946
947    ## Reproducibility tests for ISOMIP
948    export TEST_NAME="REPRO_7_3"
949    cd ${CONFIG_DIR0}
950    cd ${SETTE_DIR}
951    . ./param.cfg
952    . ./all_functions.sh
953    . ./prepare_exe_dir.sh
954    JOB_FILE=${EXE_DIR}/run_job.sh
955    NPROC=21
956    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
957    cd ${EXE_DIR}
958    set_namelist namelist_cfg cn_exp \"ISOMIP_73\"
959    set_namelist namelist_cfg nn_it000 1
960    set_namelist namelist_cfg nn_itend 48
961    set_namelist namelist_cfg ln_ctl .false.
962    set_namelist namelist_cfg ln_clobber .true.
963    set_namelist namelist_cfg ln_read_cfg .false.
964    set_namelist namelist_cfg ln_bergdia .false.
965    set_namelist namelist_cfg jpni 7
966    set_namelist namelist_cfg jpnj 3
967    set_namelist namelist_cfg jpnij 21
968    if [ ${USING_MPMD} == "yes" ] ; then
969       set_xio_using_server iodef.xml true
970    else
971       set_xio_using_server iodef.xml false
972    fi
973    cd ${SETTE_DIR}
974    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
975    cd ${SETTE_DIR}
976    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
977
978    cd ${SETTE_DIR}
979    export TEST_NAME="REPRO_8_4"
980    . ./prepare_exe_dir.sh
981    JOB_FILE=${EXE_DIR}/run_job.sh
982    NPROC=32
983    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
984    cd ${EXE_DIR}
985    set_namelist namelist_cfg cn_exp \"ISOMIP_84\"
986    set_namelist namelist_cfg nn_it000 1
987    set_namelist namelist_cfg nn_itend 48
988    set_namelist namelist_cfg ln_ctl .false.
989    set_namelist namelist_cfg ln_clobber .true.
990    set_namelist namelist_cfg ln_read_cfg .false.
991    set_namelist namelist_cfg ln_bergdia .false.
992    set_namelist namelist_cfg jpni 8
993    set_namelist namelist_cfg jpnj 4
994    set_namelist namelist_cfg jpnij 32
995    if [ ${USING_MPMD} == "yes" ] ; then
996       set_xio_using_server iodef.xml true
997    else
998       set_xio_using_server iodef.xml false
999    fi
1000    cd ${SETTE_DIR}
1001    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1002    cd ${SETTE_DIR}
1003    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1004
1005fi
1006
1007## Test assimilation interface code, OBS and ASM for reproducibility
1008## Restartability not tested (ASM code not restartable while increments are being applied)
1009if [ ${config} -eq 7 ] ; then
1010   ## Reproducibility tests for ORCA2_LIM3_OBS
1011    export TEST_NAME="REPRO_4_8"
1012    cd ${CONFIG_DIR0}
1013    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM3_OBS_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3"  -j 8 add_key "key_asminc" del_key "key_top"
1014    cd ${SETTE_DIR}
1015    . ./param.cfg
1016    . ./all_functions.sh
1017    . ./prepare_exe_dir.sh
1018    JOB_FILE=${EXE_DIR}/run_job.sh
1019    NPROC=32
1020    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1021    cd ${EXE_DIR}
1022    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
1023    set_namelist namelist_cfg nn_it000 1
1024    set_namelist namelist_cfg nn_itend 75
1025    set_namelist namelist_cfg nn_fwb 0
1026    set_namelist namelist_cfg ln_ctl .false.
1027    set_namelist namelist_cfg ln_clobber .true.
1028    set_namelist namelist_cfg ln_read_cfg .true.
1029    set_namelist namelist_cfg ln_linssh .false.
1030    set_namelist namelist_cfg ln_icebergs .false.
1031    set_namelist namelist_cfg jpni 4
1032    set_namelist namelist_cfg jpnj 8
1033    set_namelist namelist_cfg jpnij 32
1034    set_namelist namelist_cfg ln_diaobs .true.
1035    set_namelist namelist_cfg ln_t3d .true.
1036    set_namelist namelist_cfg ln_s3d .true.
1037    set_namelist namelist_cfg ln_sst .true.
1038    set_namelist namelist_cfg ln_sla .true.
1039    set_namelist namelist_cfg ln_sic .true.
1040    set_namelist namelist_cfg ln_vel3d .true.
1041    set_namelist namelist_cfg ln_bkgwri .true.
1042    set_namelist namelist_cfg ln_trainc .true.
1043    set_namelist namelist_cfg ln_dyninc .true.
1044    set_namelist namelist_cfg ln_sshinc .true.
1045    set_namelist namelist_cfg ln_asmiau .true.
1046    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1047    set_namelist namelist_top_cfg ln_trcdta .false.
1048    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1049    # if not you need input files, and for tests is not necessary
1050    set_namelist namelist_pisces_cfg ln_presatm .false.
1051    set_namelist namelist_pisces_cfg ln_varpar .false.
1052    set_namelist namelist_pisces_cfg ln_dust .false.
1053    set_namelist namelist_pisces_cfg ln_solub .false.
1054    set_namelist namelist_pisces_cfg ln_river .false.
1055    set_namelist namelist_pisces_cfg ln_ndepo .false.
1056    set_namelist namelist_pisces_cfg ln_ironsed .false.
1057    set_namelist namelist_pisces_cfg ln_ironice .false.
1058    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1059    if [ ${USING_MPMD} == "yes" ] ; then
1060       set_xio_using_server iodef.xml true
1061    else
1062       set_xio_using_server iodef.xml false
1063    fi
1064    cd ${SETTE_DIR}
1065    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1066    cd ${SETTE_DIR}
1067    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1068
1069   cd ${SETTE_DIR}
1070    export TEST_NAME="REPRO_8_4"
1071    . ./prepare_exe_dir.sh
1072    JOB_FILE=${EXE_DIR}/run_job.sh
1073    NPROC=32
1074    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1075    cd ${EXE_DIR}
1076    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
1077    set_namelist namelist_cfg nn_it000 1
1078    set_namelist namelist_cfg nn_itend 75
1079    set_namelist namelist_cfg nn_fwb 0
1080    set_namelist namelist_cfg ln_ctl .false.
1081    set_namelist namelist_cfg ln_clobber .true.
1082    set_namelist namelist_cfg ln_read_cfg .true.
1083    set_namelist namelist_cfg ln_linssh .false.
1084    set_namelist namelist_cfg ln_icebergs .false.
1085    set_namelist namelist_cfg jpni 8
1086    set_namelist namelist_cfg jpnj 4
1087    set_namelist namelist_cfg jpnij 32
1088    set_namelist namelist_cfg ln_diaobs .true.
1089    set_namelist namelist_cfg ln_t3d .true.
1090    set_namelist namelist_cfg ln_s3d .true.
1091    set_namelist namelist_cfg ln_sst .true.
1092    set_namelist namelist_cfg ln_sla .true.
1093    set_namelist namelist_cfg ln_sic .true.
1094    set_namelist namelist_cfg ln_vel3d .true.
1095    set_namelist namelist_cfg ln_bkgwri .true.
1096    set_namelist namelist_cfg ln_trainc .true.
1097    set_namelist namelist_cfg ln_dyninc .true.
1098    set_namelist namelist_cfg ln_sshinc .true.
1099    set_namelist namelist_cfg ln_asmiau .true.
1100    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1101    set_namelist namelist_top_cfg ln_trcdta .false.
1102    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1103    # if not you need input files, and for tests is not necessary
1104    set_namelist namelist_pisces_cfg ln_presatm .false.
1105    set_namelist namelist_pisces_cfg ln_varpar .false.
1106    set_namelist namelist_pisces_cfg ln_dust .false.
1107    set_namelist namelist_pisces_cfg ln_solub .false.
1108    set_namelist namelist_pisces_cfg ln_river .false.
1109    set_namelist namelist_pisces_cfg ln_ndepo .false.
1110    set_namelist namelist_pisces_cfg ln_ironsed .false.
1111    set_namelist namelist_pisces_cfg ln_ironice .false.
1112    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1113    if [ ${USING_MPMD} == "yes" ] ; then
1114       set_xio_using_server iodef.xml true
1115    else
1116       set_xio_using_server iodef.xml false
1117    fi
1118    cd ${SETTE_DIR}
1119    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1120    cd ${SETTE_DIR}
1121    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1122fi
1123# TEST FOR ORCA2_LIM3_AGRIF : AGULHAS AGRIF
1124if [ ${config} -eq 8 ] ;  then
1125## Restartability tests
1126    export TEST_NAME="LONG"
1127    cd ${CONFIG_DIR0}
1128    . ./makenemo -m ${CMP_NAM} -n ORCA2AGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1129    cd ${SETTE_DIR}
1130    . ./param.cfg
1131    . ./all_functions.sh
1132    . ./prepare_exe_dir.sh
1133    JOB_FILE=${EXE_DIR}/run_job.sh
1134    NPROC=4
1135    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1136    cd ${EXE_DIR}
1137    set_namelist namelist_cfg cn_exp \"O2AGRIF_LONG\"
1138    set_namelist namelist_cfg nn_it000 1
1139    set_namelist namelist_cfg nn_itend 150
1140    set_namelist namelist_cfg nn_stock 75
1141    set_namelist namelist_cfg ln_clobber .true.
1142    set_namelist namelist_cfg ln_read_cfg .true.
1143    set_namelist namelist_cfg nn_fwb 0
1144    set_namelist namelist_cfg jpni 2
1145    set_namelist namelist_cfg jpnj 2
1146    set_namelist namelist_cfg jpnij 4
1147    set_namelist 1_namelist_cfg cn_exp \"O2AGRIF_LONG\"
1148    set_namelist 1_namelist_cfg nn_it000 1
1149    set_namelist 1_namelist_cfg nn_itend 300
1150    set_namelist 1_namelist_cfg nn_stock 150
1151    set_namelist 1_namelist_cfg nn_fsbc 1
1152    set_namelist 1_namelist_cfg ln_ctl .false.
1153    set_namelist 1_namelist_cfg ln_clobber .true.
1154    set_namelist 1_namelist_cfg ln_read_cfg .true.
1155    set_namelist 1_namelist_cfg ln_linssh .false.
1156    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1157    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1158    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1159#
1160    if [ ${USING_MPMD} == "yes" ] ; then
1161       set_xio_using_server iodef.xml true
1162    else
1163       set_xio_using_server iodef.xml false
1164    fi
1165    cd ${SETTE_DIR}
1166    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1167   
1168    cd ${SETTE_DIR}
1169    export TEST_NAME="SHORT"
1170    . ./prepare_exe_dir.sh
1171    cd ${EXE_DIR}
1172    set_namelist namelist_cfg cn_exp \"O2AGRIF_SHORT\"
1173    set_namelist namelist_cfg nn_it000 76
1174    set_namelist namelist_cfg nn_itend 150
1175    set_namelist namelist_cfg nn_stock 75
1176    set_namelist namelist_cfg ln_rstart .true.
1177    set_namelist namelist_cfg nn_rstctl 2
1178    set_namelist namelist_cfg ln_clobber .true.
1179    set_namelist namelist_cfg ln_read_cfg .true.
1180    set_namelist namelist_cfg ln_linssh .false.
1181    set_namelist namelist_cfg nn_fwb 0
1182    set_namelist namelist_cfg jpni 2
1183    set_namelist namelist_cfg jpnj 2
1184    set_namelist namelist_cfg jpnij 4
1185    set_namelist 1_namelist_cfg cn_exp \"O2AGRIF_SHORT\"
1186    set_namelist 1_namelist_cfg nn_it000 151
1187    set_namelist 1_namelist_cfg nn_itend 300
1188    set_namelist 1_namelist_cfg nn_stock 150
1189    set_namelist 1_namelist_cfg nn_fsbc 1
1190    set_namelist 1_namelist_cfg ln_rstart .true.
1191    set_namelist 1_namelist_cfg nn_rstctl 2
1192    set_namelist 1_namelist_cfg ln_clobber .true.
1193    set_namelist 1_namelist_cfg ln_read_cfg .true.
1194    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1195    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1196    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1197    set_namelist namelist_cfg cn_ocerst_in \"O2AGRIF_LONG_00000075_restart\"
1198    set_namelist namelist_ice_cfg cn_icerst_in \"O2AGRIF_LONG_00000075_restart_ice\"
1199    set_namelist 1_namelist_cfg cn_ocerst_in \"O2AGRIF_LONG_00000150_restart\"
1200    set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2AGRIF_LONG_00000150_restart_ice\"
1201
1202    for (( i=1; i<=$NPROC; i++)) ; do
1203        L_NPROC=$(( $i - 1 ))
1204        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1205        ln -sf ../LONG/O2AGRIF_LONG_00000075_restart_${L_NPROC}.nc .
1206        ln -sf ../LONG/O2AGRIF_LONG_00000075_restart_ice_${L_NPROC}.nc .
1207        ln -sf ../LONG/1_O2AGRIF_LONG_00000150_restart_${L_NPROC}.nc .
1208        ln -sf ../LONG/1_O2AGRIF_LONG_00000150_restart_ice_${L_NPROC}.nc .
1209    done
1210    if [ ${USING_MPMD} == "yes" ] ; then
1211       set_xio_using_server iodef.xml true
1212    else
1213       set_xio_using_server iodef.xml false
1214    fi
1215    cd ${SETTE_DIR}
1216    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1217    cd ${SETTE_DIR}
1218    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1219
1220
1221## Reproducibility tests for ORCA2_LIM3_AGRIF
1222    export TEST_NAME="REPRO_4_4"
1223    cd ${CONFIG_DIR0}
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=16
1230    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1231    cd ${EXE_DIR}
1232    set_namelist namelist_cfg cn_exp \"O2AGRIF_44\"
1233    set_namelist namelist_cfg nn_it000 1
1234    set_namelist namelist_cfg nn_itend 75
1235    set_namelist namelist_cfg ln_ctl .false.
1236    set_namelist namelist_cfg ln_clobber .true.
1237    set_namelist namelist_cfg ln_read_cfg .true.
1238    set_namelist namelist_cfg ln_linssh .false.
1239    set_namelist namelist_cfg nn_fwb 0
1240    set_namelist namelist_cfg jpni 4
1241    set_namelist namelist_cfg jpnj 4
1242    set_namelist namelist_cfg jpnij 16
1243    set_namelist 1_namelist_cfg nn_it000 1
1244    set_namelist 1_namelist_cfg nn_itend 150
1245    set_namelist 1_namelist_cfg nn_fsbc 1
1246    set_namelist 1_namelist_cfg ln_ctl .false.
1247    set_namelist 1_namelist_cfg ln_clobber .true.
1248    set_namelist 1_namelist_cfg ln_read_cfg .true.
1249    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1250    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1251    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1252
1253    if [ ${USING_MPMD} == "yes" ] ; then
1254       set_xio_using_server iodef.xml true
1255    else
1256       set_xio_using_server iodef.xml false
1257    fi
1258    cd ${SETTE_DIR}
1259    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1260    cd ${SETTE_DIR}
1261    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1262
1263    cd ${SETTE_DIR}
1264    export TEST_NAME="REPRO_2_8"
1265    . ./prepare_exe_dir.sh
1266    JOB_FILE=${EXE_DIR}/run_job.sh
1267    NPROC=16
1268    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1269    cd ${EXE_DIR}
1270    set_namelist namelist_cfg cn_exp \"O2AGRIF_28\"
1271    set_namelist namelist_cfg nn_it000 1
1272    set_namelist namelist_cfg nn_itend 75
1273    set_namelist namelist_cfg ln_ctl .false.
1274    set_namelist namelist_cfg ln_clobber .true.
1275    set_namelist namelist_cfg ln_read_cfg .true.
1276    set_namelist namelist_cfg ln_linssh .false.
1277    set_namelist namelist_cfg nn_fwb 0
1278    set_namelist namelist_cfg jpni 2
1279    set_namelist namelist_cfg jpnj 8
1280    set_namelist namelist_cfg jpnij 16
1281    set_namelist 1_namelist_cfg nn_it000 1
1282    set_namelist 1_namelist_cfg nn_itend 150
1283    set_namelist 1_namelist_cfg nn_fsbc 1
1284    set_namelist 1_namelist_cfg ln_ctl .false.
1285    set_namelist 1_namelist_cfg nn_fsbc 1
1286    set_namelist 1_namelist_cfg ln_clobber .true.
1287    set_namelist 1_namelist_cfg ln_read_cfg .true.
1288    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1289    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1290    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1291
1292    if [ ${USING_MPMD} == "yes" ] ; then
1293       set_xio_using_server iodef.xml true
1294    else
1295       set_xio_using_server iodef.xml false
1296    fi
1297    cd ${SETTE_DIR}
1298    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1299    cd ${SETTE_DIR}
1300    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1301fi
1302
1303# test code corruption with AGRIF
1304if [ ${config} -eq 9 ] ;  then
1305
1306# Compile with AGRIF but run with no zoom
1307    export TEST_NAME="AGRIFNOZ"
1308    cd ${CONFIG_DIR0}
1309    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOZOOM_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1310    cd ${SETTE_DIR}
1311    . ./param.cfg
1312    . ./all_functions.sh
1313    . ./prepare_exe_dir.sh
1314    JOB_FILE=${EXE_DIR}/run_job.sh
1315    NPROC=4
1316    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1317    cd ${EXE_DIR}
1318    set_namelist namelist_cfg cn_exp \"AGRIFNOZ_SHORT\"
1319    set_namelist namelist_cfg nn_it000 1
1320    set_namelist namelist_cfg nn_itend 75
1321    set_namelist namelist_cfg ln_ctl .false.
1322    set_namelist namelist_cfg ln_clobber .true.
1323    set_namelist namelist_cfg ln_read_cfg .true.
1324    set_namelist namelist_cfg ln_linssh .false.
1325    set_namelist namelist_cfg ln_hpg_sco .true.
1326    set_namelist namelist_cfg ln_hpg_zps .false.
1327    set_namelist namelist_cfg nn_fwb 0
1328    set_namelist namelist_cfg jpni 2
1329    set_namelist namelist_cfg jpnj 2
1330    set_namelist namelist_cfg jpnij 4
1331    set_namelist namelist_cfg ln_icebergs .false.   
1332#
1333#   Set the number of fine grids to zero:   
1334    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1335
1336    if [ ${USING_MPMD} == "yes" ] ; then
1337       set_xio_using_server iodef.xml true
1338    else
1339       set_xio_using_server iodef.xml false
1340    fi
1341    cd ${SETTE_DIR}
1342    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1343    cd ${SETTE_DIR}
1344    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1345
1346fi
1347
1348if [ ${config} -eq 10 ] ;  then
1349# Compile with same option as 9 = ORCA2AGUL_NOZOOM, except ne key_agrif to check AGRIF does not hurt...
1350    export TEST_NAME="AGRIFNO"
1351    cd ${CONFIG_DIR0}
1352    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOAGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 del_key "key_top"
1353    cd ${SETTE_DIR}
1354    . ./param.cfg
1355    . ./all_functions.sh
1356    . ./prepare_exe_dir.sh
1357    JOB_FILE=${EXE_DIR}/run_job.sh
1358    NPROC=4
1359    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1360    cd ${EXE_DIR}
1361    set_namelist namelist_cfg cn_exp \"AGRIFNO_SHORT\"
1362    set_namelist namelist_cfg nn_it000 1
1363    set_namelist namelist_cfg nn_itend 75
1364    set_namelist namelist_cfg ln_ctl .false.
1365    set_namelist namelist_cfg ln_clobber .true.
1366    set_namelist namelist_cfg ln_read_cfg .true.
1367    set_namelist namelist_cfg ln_linssh .false.
1368    set_namelist namelist_cfg ln_hpg_sco .true.
1369    set_namelist namelist_cfg ln_hpg_zps .false.
1370    set_namelist namelist_cfg nn_fwb 0
1371    set_namelist namelist_cfg jpni 2
1372    set_namelist namelist_cfg jpnj 2
1373    set_namelist namelist_cfg jpnij 4
1374    set_namelist namelist_cfg ln_icebergs .false.       
1375#
1376    if [ ${USING_MPMD} == "yes" ] ; then
1377       set_xio_using_server iodef.xml true
1378    else
1379       set_xio_using_server iodef.xml false
1380    fi
1381    cd ${SETTE_DIR}
1382    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1383    cd ${SETTE_DIR}
1384    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1385
1386fi
1387
1388done
Note: See TracBrowser for help on using the repository browser.