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_reference-configurations.sh in utils/CI/sette_ticket2452 – NEMO

source: utils/CI/sette_ticket2452/sette_reference-configurations.sh @ 12819

Last change on this file since 12819 was 12819, checked in by gsamson, 2 years ago

add missing line in previous commit r12818 (ticket #2452)

  • Property svn:executable set to *
File size: 61.0 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 nemo 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#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
69#
70#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report
71#                       ( not doing it could lead to false positive )
72#
73#  prepare_job.sh     : to generate the script run_job.sh
74#
75#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
76#                        see sette.sh and BATCH_TEMPLATE directory
77#
78#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
79#        can be found paths to the input tar file)
80#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
81#        directory
82#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
83#        remain in ${NEW_CONF}/EXP00
84#
85#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
86#        executed commands
87#
88#  NOTE: if sette.sh is stopped in output.sette there is written the last command
89#        executed by sette.sh
90#
91# example use: ./sette.sh
92#########################################################################################
93#
94# LOAD param value
95SETTE_DIR=$(cd $(dirname "$0"); pwd)
96MAIN_DIR=$(dirname $SETTE_DIR)
97. ./param.cfg
98
99export BATCH_COMMAND_PAR=${BATCH_CMD}
100export BATCH_COMMAND_SEQ=${BATCH_CMD}
101export INTERACT_FLAG="no"
102export MPIRUN_FLAG="yes"
103export USING_ICEBERGS="yes"
104#
105export DEL_KEYS="key_iomput"
106if [ ${USING_XIOS} == "yes" ] 
107 then
108   export DEL_KEYS=""
109fi
110#
111export ADD_KEYS=""
112if [ ${ADD_NOSIGNEDZERO} == "yes" ]
113 then
114   export ADD_KEYS="key_nosignedzero"
115fi
116#
117# Settings which control the use of stand alone servers (only relevant if using xios)
118#
119export NUM_XIOSERVERS=4
120export JOB_PREFIX=${JOB_PREFIX_MPMD}
121#
122if [ ${USING_MPMD} == "no" ] 
123 then
124   export NUM_XIOSERVERS=0
125   export JOB_PREFIX=${JOB_PREFIX_NOMPMD}
126fi
127#
128#
129if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ]
130 then
131   echo "Incompatible choices. MPMD mode requires the XIOS server"
132   exit
133fi
134
135# Directory to run the tests
136CONFIG_DIR0=${MAIN_DIR}/cfgs
137TOOLS_DIR=${MAIN_DIR}/tools
138
139CMP_NAM=${1:-$COMPILER}
140# Copy job_batch_COMPILER file for specific compiler into job_batch_template
141cd ${SETTE_DIR}
142cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
143# Description of available configurations:
144# GYRE_PISCES       :
145# ORCA2_ICE_PISCES  :
146# ORCA2_OFF_PISCES  :
147# AMM12             :
148# SAS               :
149# ORCA2_ICE_OBS     :
150# AGRIF             : test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific (AGRIF_DEMO)
151#                       and check that key_agrif without zoom = no key_agrif
152# SPITZ12           : regional configuration including sea-ice and tides (Spitzbergen)
153
154for config in ${TEST_CONFIGS}
155do
156
157# -----------
158# GYRE_PISCES
159# -----------
160if [ ${config} == "GYRE_PISCES" ] ;  then
161## Restartability tests for GYRE_PISCES
162    export TEST_NAME="LONG"
163    cd ${MAIN_DIR}
164    #
165    # syncronisation if target directory/file exist (not done by makenemo)
166    . ${SETTE_DIR}/all_functions.sh
167    sync_config  GYRE_PISCES GYRE_PISCES_ST 'cfgs'
168    clean_config GYRE_PISCES GYRE_PISCES_ST 'cfgs'
169    #
170    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
171    cd ${SETTE_DIR}
172    . ./param.cfg
173    . ./all_functions.sh
174    . ./prepare_exe_dir.sh
175    set_valid_dir
176    clean_valid_dir
177    JOB_FILE=${EXE_DIR}/run_job.sh
178    NPROC=8
179    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
180    cd ${EXE_DIR} 
181    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
182    set_namelist namelist_cfg nn_it000 1
183    set_namelist namelist_cfg nn_itend 1080
184    set_namelist namelist_cfg nn_stock  540
185    set_namelist namelist_cfg ln_linssh .true.
186    set_namelist namelist_cfg jpni 2
187    set_namelist namelist_cfg jpnj 4
188    set_namelist namelist_cfg sn_cfctl%l_config .true.
189    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
190    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
191    if [ ${USING_MPMD} == "yes" ] ; then
192       set_xio_using_server iodef.xml true
193    else
194       set_xio_using_server iodef.xml false
195    fi
196    cd ${SETTE_DIR}
197    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
198
199    cd ${SETTE_DIR}
200    export TEST_NAME="SHORT"
201    . ./prepare_exe_dir.sh
202    set_valid_dir
203    clean_valid_dir
204    cd ${EXE_DIR}
205    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
206    set_namelist namelist_cfg nn_it000 541
207    set_namelist namelist_cfg nn_itend 1080
208    set_namelist namelist_cfg nn_stock 540
209    set_namelist namelist_cfg ln_rstart .true.
210    set_namelist namelist_cfg nn_rstctl 2
211    set_namelist namelist_cfg ln_linssh .true.
212    set_namelist namelist_cfg jpni 2
213    set_namelist namelist_cfg jpnj 4
214    set_namelist namelist_cfg sn_cfctl%l_config .true.
215    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
216    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
217    set_namelist namelist_top_cfg ln_rsttr .true.
218    set_namelist namelist_top_cfg nn_rsttr 2
219    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000540_restart\"
220    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000540_restart_trc\"
221    if [ ${USING_MPMD} == "yes" ] ; then
222       set_xio_using_server iodef.xml true
223    else
224       set_xio_using_server iodef.xml false
225    fi
226    for (( i=1; i<=$NPROC; i++)) ; do
227        L_NPROC=$(( $i - 1 ))
228        L_NPROC=`printf "%04d\n" ${L_NPROC}`
229        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_${L_NPROC}.nc .
230        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_trc_${L_NPROC}.nc .
231    done
232    cd ${SETTE_DIR}
233    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
234    cd ${SETTE_DIR}
235    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
236
237## Reproducibility tests for GYRE_PISCES
238    export TEST_NAME="REPRO_2_4"
239    cd ${MAIN_DIR}
240    cd ${SETTE_DIR}
241    . ./param.cfg
242    . ./all_functions.sh
243    . ./prepare_exe_dir.sh
244    set_valid_dir
245    clean_valid_dir
246    JOB_FILE=${EXE_DIR}/run_job.sh
247    NPROC=8
248    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
249    cd ${EXE_DIR}
250    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
251    set_namelist namelist_cfg nn_it000 1
252    set_namelist namelist_cfg nn_itend 1080
253    set_namelist namelist_cfg ln_linssh .true.
254    set_namelist namelist_cfg jpni 2
255    set_namelist namelist_cfg jpnj 4
256    set_namelist namelist_cfg sn_cfctl%l_config .true.
257    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
258    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
259    if [ ${USING_MPMD} == "yes" ] ; then
260       set_xio_using_server iodef.xml true
261    else
262       set_xio_using_server iodef.xml false
263    fi
264    cd ${SETTE_DIR}
265    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
266    cd ${SETTE_DIR}
267    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
268
269    cd ${SETTE_DIR}
270    export TEST_NAME="REPRO_4_2"
271    . ./prepare_exe_dir.sh
272    set_valid_dir
273    clean_valid_dir
274    JOB_FILE=${EXE_DIR}/run_job.sh
275    NPROC=8
276    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
277    cd ${EXE_DIR}
278    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
279    set_namelist namelist_cfg nn_it000 1
280    set_namelist namelist_cfg nn_itend 1080
281    set_namelist namelist_cfg ln_linssh .true.
282    set_namelist namelist_cfg jpni 4
283    set_namelist namelist_cfg jpnj 2
284    set_namelist namelist_cfg sn_cfctl%l_config .true.
285    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
286    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
287    if [ ${USING_MPMD} == "yes" ] ; then
288       set_xio_using_server iodef.xml true
289    else
290       set_xio_using_server iodef.xml false
291    fi
292    cd ${SETTE_DIR}
293    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
294    cd ${SETTE_DIR}
295    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
296
297fi
298
299# -----------------
300# ORCA2_ICE_PISCES
301# -----------------
302if [ ${config} == "ORCA2_ICE_PISCES" ] ;  then
303## Restartability tests for ORCA2_ICE_PISCES
304    export TEST_NAME="LONG"
305    cd ${MAIN_DIR}
306    #
307    # syncronisation if target directory/file exist (not done by makenemo)
308    . ${SETTE_DIR}/all_functions.sh
309    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
310    clean_config ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
311    #
312    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
313    cd ${SETTE_DIR}
314    . ./param.cfg
315    . ./all_functions.sh
316    . ./prepare_exe_dir.sh
317    set_valid_dir
318    clean_valid_dir
319    JOB_FILE=${EXE_DIR}/run_job.sh
320    NPROC=32
321    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
322    cd ${EXE_DIR}
323    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
324    set_namelist namelist_cfg nn_it000 1
325    set_namelist namelist_cfg nn_itend 992
326    set_namelist namelist_cfg nn_stock 496
327    set_namelist namelist_cfg jpni 4
328    set_namelist namelist_cfg jpnj 8
329    set_namelist namelist_cfg sn_cfctl%l_config .true.
330    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
331    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
332    set_namelist namelist_cfg ln_use_calving .true.
333    set_namelist namelist_cfg nn_date0 20130101
334    set_namelist namelist_cfg ln_blk  .false.
335    set_namelist namelist_cfg ln_abl  .true.
336    set_namelist namelist_cfg sn_wndi " 'uwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'uwnd', .false., .false., 'monthly', '', 'U10', '' "
337    set_namelist namelist_cfg sn_wndj " 'vwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'vwnd', .false., .false., 'monthly', '', 'V10', '' "
338    set_namelist namelist_cfg sn_tair " 'tair_ERAI_L25Z10_ORCA2_ana1d', 24., 'tair', .false., .false., 'monthly', '', '', '' "
339    set_namelist namelist_cfg sn_humi " 'humi_ERAI_L25Z10_ORCA2_ana1d', 24., 'humi', .false., .false., 'monthly', '', '', '' "
340    set_namelist namelist_cfg ln_wave .true.
341    set_namelist namelist_cfg ln_cdgw .true.
342    set_namelist namelist_cfg ln_sdw  .true.
343    set_namelist namelist_cfg nn_sdrift 1
344    set_namelist namelist_cfg ln_stcor .true.
345    set_namelist namelist_cfg ln_tauwoc .true.
346    #
347    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
348    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
349    #
350    set_namelist namelist_ice_cfg ln_icediachk .true.
351    set_namelist namelist_top_cfg ln_trcdta .false.
352    set_namelist namelist_top_cfg ln_trcbc  .false.
353    # put ln_ironsed, ln_hydrofe to false
354    # if not you need input files, and for tests is not necessary
355    set_namelist namelist_pisces_cfg ln_varpar .false.
356    set_namelist namelist_pisces_cfg ln_ironsed .false.
357    set_namelist namelist_pisces_cfg ln_ironice .false.
358    set_namelist namelist_pisces_cfg ln_hydrofe .false.
359    # put ln_pisdmp to false : no restoring to global mean value
360    set_namelist namelist_pisces_cfg ln_pisdmp .false.
361    if [ ${USING_MPMD} == "yes" ] ; then
362       set_xio_using_server iodef.xml true
363    else
364       set_xio_using_server iodef.xml false
365    fi
366    cd ${SETTE_DIR}
367    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
368   
369    cd ${SETTE_DIR}
370    export TEST_NAME="SHORT"
371    . ./prepare_exe_dir.sh
372    set_valid_dir
373    clean_valid_dir
374    cd ${EXE_DIR}
375    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
376    set_namelist namelist_cfg nn_it000 497
377    set_namelist namelist_cfg nn_itend 992
378    set_namelist namelist_cfg nn_stock 496
379    set_namelist namelist_cfg ln_rstart .true.
380    set_namelist namelist_cfg nn_rstctl 2
381    set_namelist namelist_cfg jpni 4
382    set_namelist namelist_cfg jpnj 8
383    set_namelist namelist_cfg sn_cfctl%l_config .true.
384    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
385    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
386    set_namelist namelist_cfg nn_test_icebergs -1
387    set_namelist namelist_cfg nn_date0 20130101
388    set_namelist namelist_cfg ln_blk  .false.
389    set_namelist namelist_cfg ln_abl  .true.
390    set_namelist namelist_cfg ln_rstart_abl .true.
391    set_namelist namelist_cfg sn_wndi " 'uwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'uwnd', .false., .false., 'monthly', '', 'U10', '' "
392    set_namelist namelist_cfg sn_wndj " 'vwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'vwnd', .false., .false., 'monthly', '', 'V10', '' "
393    set_namelist namelist_cfg sn_tair " 'tair_ERAI_L25Z10_ORCA2_ana1d', 24., 'tair', .false., .false., 'monthly', '', '', '' "
394    set_namelist namelist_cfg sn_humi " 'humi_ERAI_L25Z10_ORCA2_ana1d', 24., 'humi', .false., .false., 'monthly', '', '', '' "
395    set_namelist namelist_cfg ln_wave .true.
396    set_namelist namelist_cfg ln_cdgw .true.
397    set_namelist namelist_cfg ln_sdw  .true.
398    set_namelist namelist_cfg nn_sdrift 1
399    set_namelist namelist_cfg ln_stcor .true.
400    set_namelist namelist_cfg ln_tauwoc .true.
401    #
402    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
403    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
404    #
405    set_namelist namelist_ice_cfg ln_icediachk .true.
406    set_namelist namelist_top_cfg ln_rsttr .true.
407    set_namelist namelist_top_cfg nn_rsttr 2
408    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000496_restart\"
409    set_namelist namelist_cfg cn_icbrst_in \"O2L3P_LONG_00000496_restart_icb\"
410    set_namelist namelist_cfg cn_ablrst_in \"O2L3P_LONG_00000496_restart_abl\"
411    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000496_restart_trc\"
412    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000496_restart_ice\"
413    set_namelist namelist_top_cfg ln_trcbc  .false.
414    # put ln_ironsed, ln_hydrofe to false
415    # if not you need input files, and for tests is not necessary
416    set_namelist namelist_pisces_cfg ln_varpar .false.
417    set_namelist namelist_pisces_cfg ln_ironsed .false.
418    set_namelist namelist_pisces_cfg ln_ironice .false.
419    set_namelist namelist_pisces_cfg ln_hydrofe .false.
420    # put ln_pisdmp to false : no restoring to global mean value
421    set_namelist namelist_pisces_cfg ln_pisdmp .false.
422    for (( i=1; i<=$NPROC; i++)) ; do
423        L_NPROC=$(( $i - 1 ))
424        L_NPROC=`printf "%04d\n" ${L_NPROC}`
425        ln -sf ../LONG/O2L3P_LONG_00000496_restart_${L_NPROC}.nc .
426        ln -sf ../LONG/O2L3P_LONG_00000496_restart_trc_${L_NPROC}.nc .
427        ln -sf ../LONG/O2L3P_LONG_00000496_restart_ice_${L_NPROC}.nc .
428        ln -sf ../LONG/O2L3P_LONG_00000496_restart_abl_${L_NPROC}.nc .
429        if [ ${USING_ICEBERGS} == "yes" ]
430            then
431             ln -sf ../LONG/O2L3P_LONG_00000496_restart_icb_${L_NPROC}.nc O2L3P_LONG_00000496_restart_icb_${L_NPROC}.nc
432        fi
433    done
434    if [ ${USING_MPMD} == "yes" ] ; then
435       set_xio_using_server iodef.xml true
436    else
437       set_xio_using_server iodef.xml false
438    fi
439    cd ${SETTE_DIR}
440    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
441    cd ${SETTE_DIR}
442    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
443
444## Reproducibility tests for ORCA2_ICE_PISCES
445    export TEST_NAME="REPRO_4_8"
446    cd ${MAIN_DIR}
447    cd ${SETTE_DIR}
448    . ./param.cfg
449    . ./all_functions.sh
450    . ./prepare_exe_dir.sh
451    set_valid_dir
452    clean_valid_dir
453    JOB_FILE=${EXE_DIR}/run_job.sh
454    NPROC=32
455    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
456    cd ${EXE_DIR}
457    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
458    set_namelist namelist_cfg nn_it000 1
459    set_namelist namelist_cfg nn_itend 992
460    set_namelist namelist_cfg jpni 4
461    set_namelist namelist_cfg jpnj 8
462    set_namelist namelist_cfg sn_cfctl%l_config .true.
463    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
464    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
465    set_namelist namelist_cfg nn_date0 20130101
466    set_namelist namelist_cfg ln_blk  .false.
467    set_namelist namelist_cfg ln_abl  .true.
468    set_namelist namelist_cfg sn_wndi " 'uwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'uwnd', .false., .false., 'monthly', '', 'U10', '' "
469    set_namelist namelist_cfg sn_wndj " 'vwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'vwnd', .false., .false., 'monthly', '', 'V10', '' "
470    set_namelist namelist_cfg sn_tair " 'tair_ERAI_L25Z10_ORCA2_ana1d', 24., 'tair', .false., .false., 'monthly', '', '', '' "
471    set_namelist namelist_cfg sn_humi " 'humi_ERAI_L25Z10_ORCA2_ana1d', 24., 'humi', .false., .false., 'monthly', '', '', '' "
472    set_namelist namelist_cfg ln_wave .true.
473    set_namelist namelist_cfg ln_cdgw .true.
474    set_namelist namelist_cfg ln_sdw  .true.
475    set_namelist namelist_cfg nn_sdrift 1
476    set_namelist namelist_cfg ln_stcor .true.
477    set_namelist namelist_cfg ln_tauwoc .true.
478
479    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
480    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
481
482    set_namelist namelist_top_cfg ln_trcdta .false.
483    set_namelist namelist_top_cfg ln_trcbc  .false.
484    # put ln_ironsed, ln_hydrofe to false
485    # if not you need input files, and for tests is not necessary
486    set_namelist namelist_pisces_cfg ln_varpar .false.
487    set_namelist namelist_pisces_cfg ln_ironsed .false.
488    set_namelist namelist_pisces_cfg ln_ironice .false.
489    set_namelist namelist_pisces_cfg ln_hydrofe .false.
490    # put ln_pisdmp to false : no restoring to global mean value
491    set_namelist namelist_pisces_cfg ln_pisdmp .false.
492    if [ ${USING_MPMD} == "yes" ] ; then
493       set_xio_using_server iodef.xml true
494    else
495       set_xio_using_server iodef.xml false
496    fi
497    cd ${SETTE_DIR}
498    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
499    cd ${SETTE_DIR}
500    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
501
502    cd ${SETTE_DIR}
503    export TEST_NAME="REPRO_8_4"
504    . ./prepare_exe_dir.sh
505    set_valid_dir
506    clean_valid_dir
507    JOB_FILE=${EXE_DIR}/run_job.sh
508    NPROC=32
509    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
510    cd ${EXE_DIR}
511    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
512    set_namelist namelist_cfg nn_it000 1
513    set_namelist namelist_cfg nn_itend 992
514    set_namelist namelist_cfg jpni 8
515    set_namelist namelist_cfg jpnj 4
516    set_namelist namelist_cfg sn_cfctl%l_config .true.
517    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
518    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
519    set_namelist namelist_cfg nn_date0 20130101
520    set_namelist namelist_cfg ln_blk  .false.
521    set_namelist namelist_cfg ln_abl  .true.
522    set_namelist namelist_cfg sn_wndi " 'uwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'uwnd', .false., .false., 'monthly', '', 'U10', '' "
523    set_namelist namelist_cfg sn_wndj " 'vwnd_ERAI_L25Z10_ORCA2_ana1d', 24., 'vwnd', .false., .false., 'monthly', '', 'V10', '' "
524    set_namelist namelist_cfg sn_tair " 'tair_ERAI_L25Z10_ORCA2_ana1d', 24., 'tair', .false., .false., 'monthly', '', '', '' "
525    set_namelist namelist_cfg sn_humi " 'humi_ERAI_L25Z10_ORCA2_ana1d', 24., 'humi', .false., .false., 'monthly', '', '', '' "
526    set_namelist namelist_cfg ln_wave .true.
527    set_namelist namelist_cfg ln_cdgw .true.
528    set_namelist namelist_cfg ln_sdw  .true.
529    set_namelist namelist_cfg nn_sdrift 1
530    set_namelist namelist_cfg ln_stcor .true.
531    set_namelist namelist_cfg ln_tauwoc .true.
532
533    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
534    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
535
536    set_namelist namelist_top_cfg ln_trcdta .false.
537    set_namelist namelist_top_cfg ln_trcbc  .false.
538    # put ln_ironsed, ln_hydrofe to false
539    # if not you need input files, and for tests is not necessary
540    set_namelist namelist_pisces_cfg ln_varpar .false.
541    set_namelist namelist_pisces_cfg ln_ironsed .false.
542    set_namelist namelist_pisces_cfg ln_ironice .false.
543    set_namelist namelist_pisces_cfg ln_hydrofe .false.
544    # put ln_pisdmp to false : no restoring to global mean value
545    set_namelist namelist_pisces_cfg ln_pisdmp .false.
546    if [ ${USING_MPMD} == "yes" ] ; then
547       set_xio_using_server iodef.xml true
548    else
549       set_xio_using_server iodef.xml false
550    fi
551    cd ${SETTE_DIR}
552    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
553    cd ${SETTE_DIR}
554    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
555fi
556
557# ----------------
558# ORCA2_OFF_PISCES
559# ----------------
560if [ ${config} == "ORCA2_OFF_PISCES" ] ;  then
561## Restartability tests for ORCA2_OFF_PISCES
562    export TEST_NAME="LONG"
563    cd ${MAIN_DIR}
564    #
565    # syncronisation if target directory/file exist (not done by makenemo)
566    . ${SETTE_DIR}/all_functions.sh
567    sync_config  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
568    clean_config ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
569    #
570    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
571    cd ${SETTE_DIR}
572    . ./param.cfg
573    . ./all_functions.sh
574    . ./prepare_exe_dir.sh
575    set_valid_dir
576    clean_valid_dir
577    JOB_FILE=${EXE_DIR}/run_job.sh
578    NPROC=32
579    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
580    cd ${EXE_DIR}
581    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
582    set_namelist namelist_cfg nn_it000 1
583    set_namelist namelist_cfg nn_itend 380
584    set_namelist namelist_cfg nn_stock 190
585    set_namelist namelist_cfg jpni 4
586    set_namelist namelist_cfg jpnj 8
587    set_namelist namelist_cfg sn_cfctl%l_config .true.
588    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
589    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
590    set_namelist namelist_cfg ln_qsr_rgb .true.
591    set_namelist namelist_top_cfg ln_trcdta .false.
592    set_namelist namelist_top_cfg ln_trcbc  .false.
593    # put ln_ironsed, ln_hydrofe to false
594    # if not you need input files, and for tests is not necessary
595    set_namelist namelist_pisces_cfg ln_varpar .false.
596    set_namelist namelist_pisces_cfg ln_ironsed .false.
597    set_namelist namelist_pisces_cfg ln_ironice .false.
598    set_namelist namelist_pisces_cfg ln_hydrofe .false.
599    # put ln_pisdmp to false : no restoring to global mean value
600    set_namelist namelist_pisces_cfg ln_pisdmp .false.
601    if [ ${USING_MPMD} == "yes" ] ; then
602       set_xio_using_server iodef.xml true
603    else
604       set_xio_using_server iodef.xml false
605    fi
606    cd ${SETTE_DIR}
607    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
608   
609    cd ${SETTE_DIR}
610    export TEST_NAME="SHORT"
611    . ./prepare_exe_dir.sh
612    set_valid_dir
613    clean_valid_dir
614    cd ${EXE_DIR}
615    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
616    set_namelist namelist_cfg nn_it000 191
617    set_namelist namelist_cfg nn_itend 380
618    set_namelist namelist_cfg nn_stock 190
619    set_namelist namelist_cfg jpni 4
620    set_namelist namelist_cfg jpnj 8
621    set_namelist namelist_cfg sn_cfctl%l_config .true.
622    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
623    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
624    set_namelist namelist_cfg ln_qsr_rgb .true.
625    set_namelist namelist_top_cfg ln_rsttr .true.
626    set_namelist namelist_top_cfg nn_rsttr 2
627    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\"
628    for (( i=1; i<=$NPROC; i++)) ; do
629        L_NPROC=$(( $i - 1 ))
630        L_NPROC=`printf "%04d\n" ${L_NPROC}`
631        ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc .
632    done
633    set_namelist namelist_top_cfg ln_trcbc  .false.
634    # put ln_ironsed, ln_hydrofe to false
635    # if not you need input files, and for tests is not necessary
636    set_namelist namelist_pisces_cfg ln_varpar .false.
637    set_namelist namelist_pisces_cfg ln_ironsed .false.
638    set_namelist namelist_pisces_cfg ln_ironice .false.
639    set_namelist namelist_pisces_cfg ln_hydrofe .false.
640    # put ln_pisdmp to false : no restoring to global mean value
641    set_namelist namelist_pisces_cfg ln_pisdmp .false.
642    if [ ${USING_MPMD} == "yes" ] ; then
643       set_xio_using_server iodef.xml true
644    else
645       set_xio_using_server iodef.xml false
646    fi
647    cd ${SETTE_DIR}
648    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
649    cd ${SETTE_DIR}
650    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
651
652## Reproducibility tests for ORCA2_OFF_PISCES
653    export TEST_NAME="REPRO_4_8"
654    cd ${MAIN_DIR}
655    cd ${SETTE_DIR}
656    . ./param.cfg
657    . ./all_functions.sh
658    . ./prepare_exe_dir.sh
659    set_valid_dir
660    clean_valid_dir
661    JOB_FILE=${EXE_DIR}/run_job.sh
662    NPROC=32
663    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
664    cd ${EXE_DIR}
665    set_namelist namelist_cfg cn_exp \"OFFP_48\"
666    set_namelist namelist_cfg nn_it000 1
667    set_namelist namelist_cfg nn_itend 380
668    set_namelist namelist_cfg jpni 4
669    set_namelist namelist_cfg jpnj 8
670    set_namelist namelist_cfg sn_cfctl%l_config .true.
671    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
672    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
673    set_namelist namelist_cfg ln_qsr_rgb .true.
674    set_namelist namelist_top_cfg ln_trcdta .false.
675    set_namelist namelist_top_cfg ln_trcbc  .false.
676    # put ln_ironsed, ln_hydrofe to false
677    # if not you need input files, and for tests is not necessary
678    set_namelist namelist_pisces_cfg ln_varpar .false.
679    set_namelist namelist_pisces_cfg ln_ironsed .false.
680    set_namelist namelist_pisces_cfg ln_ironice .false.
681    set_namelist namelist_pisces_cfg ln_hydrofe .false.
682    # put ln_pisdmp to false : no restoring to global mean value
683    set_namelist namelist_pisces_cfg ln_pisdmp .false.
684    if [ ${USING_MPMD} == "yes" ] ; then
685       set_xio_using_server iodef.xml true
686    else
687       set_xio_using_server iodef.xml false
688    fi
689    cd ${SETTE_DIR}
690    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
691    cd ${SETTE_DIR}
692    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
693
694    cd ${SETTE_DIR}
695    export TEST_NAME="REPRO_8_4"
696    . ./prepare_exe_dir.sh
697    set_valid_dir
698    clean_valid_dir
699    JOB_FILE=${EXE_DIR}/run_job.sh
700    NPROC=32
701    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
702    cd ${EXE_DIR}
703    set_namelist namelist_cfg cn_exp \"OFFP_84\"
704    set_namelist namelist_cfg nn_it000 1
705    set_namelist namelist_cfg nn_itend 380
706    set_namelist namelist_cfg jpni 8
707    set_namelist namelist_cfg jpnj 4
708    set_namelist namelist_cfg sn_cfctl%l_config .true.
709    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
710    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
711    set_namelist namelist_cfg ln_qsr_rgb .true.
712    set_namelist namelist_top_cfg ln_trcdta .false.
713    set_namelist namelist_top_cfg ln_trcbc  .false.
714    # put ln_ironsed, ln_hydrofe to false
715    # if not you need input files, and for tests is not necessary
716    set_namelist namelist_pisces_cfg ln_varpar .false.
717    set_namelist namelist_pisces_cfg ln_ironsed .false.
718    set_namelist namelist_pisces_cfg ln_ironice .false.
719    set_namelist namelist_pisces_cfg ln_hydrofe .false.
720    # put ln_pisdmp to false : no restoring to global mean value
721    set_namelist namelist_pisces_cfg ln_pisdmp .false.
722    if [ ${USING_MPMD} == "yes" ] ; then
723       set_xio_using_server iodef.xml true
724    else
725       set_xio_using_server iodef.xml false
726    fi
727    cd ${SETTE_DIR}
728    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
729    cd ${SETTE_DIR}
730    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
731fi
732
733# -----
734# AMM12
735# -----
736if [ ${config} == "AMM12" ] ;  then
737    ## Restartability tests for AMM12
738    export TEST_NAME="LONG"
739    cd ${MAIN_DIR}
740    #
741    # syncronisation if target directory/file exist (not done by makenemo)
742    . ${SETTE_DIR}/all_functions.sh
743    sync_config  AMM12 AMM12_ST 'cfgs'
744    clean_config AMM12 AMM12_ST 'cfgs'
745    #
746    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
747    cd ${SETTE_DIR}
748    . ./param.cfg
749    . ./all_functions.sh
750    . ./prepare_exe_dir.sh
751    set_valid_dir
752    clean_valid_dir
753    JOB_FILE=${EXE_DIR}/run_job.sh
754    NPROC=32
755    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
756    cd ${EXE_DIR}
757    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
758    set_namelist namelist_cfg nn_it000 1
759    set_namelist namelist_cfg nn_itend 576
760    set_namelist namelist_cfg nn_stock 288
761    set_namelist namelist_cfg jpni 4
762    set_namelist namelist_cfg jpnj 8
763    set_namelist namelist_cfg sn_cfctl%l_config .true.
764    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
765    if [ ${USING_MPMD} == "yes" ] ; then
766       set_xio_using_server iodef.xml true
767    else
768       set_xio_using_server iodef.xml false
769    fi
770    cd ${SETTE_DIR}
771    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
772
773    cd ${SETTE_DIR}
774    export TEST_NAME="SHORT"
775    . ./prepare_exe_dir.sh
776    set_valid_dir
777    clean_valid_dir
778    cd ${EXE_DIR}
779    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
780    set_namelist namelist_cfg nn_it000 289
781    set_namelist namelist_cfg nn_itend 576
782    set_namelist namelist_cfg jpni 4
783    set_namelist namelist_cfg jpnj 8
784    set_namelist namelist_cfg sn_cfctl%l_config .true.
785    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
786    set_namelist namelist_cfg ln_rstart .true.
787    set_namelist namelist_cfg nn_rstctl 2
788    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
789    set_namelist namelist_cfg nn_date0 20120102
790    for (( i=1; i<=$NPROC; i++)) ; do
791        L_NPROC=$(( $i - 1 ))
792        L_NPROC=`printf "%04d\n" ${L_NPROC}`
793        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
794    done
795    if [ ${USING_MPMD} == "yes" ] ; then
796       set_xio_using_server iodef.xml true
797    else
798       set_xio_using_server iodef.xml false
799    fi
800    cd ${SETTE_DIR}
801    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
802    cd ${SETTE_DIR}
803    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
804
805## Reproducibility tests for AMM12
806    export TEST_NAME="REPRO_8_4"
807    cd ${MAIN_DIR}
808    cd ${SETTE_DIR}
809    . ./param.cfg
810    . ./all_functions.sh
811    . ./prepare_exe_dir.sh
812    set_valid_dir
813    clean_valid_dir
814    JOB_FILE=${EXE_DIR}/run_job.sh
815    NPROC=32
816    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
817    cd ${EXE_DIR}
818    set_namelist namelist_cfg cn_exp \"AMM12_84\"
819    set_namelist namelist_cfg nn_it000 1
820    set_namelist namelist_cfg nn_itend 576
821    set_namelist namelist_cfg jpni 8
822    set_namelist namelist_cfg jpnj 4
823    set_namelist namelist_cfg sn_cfctl%l_config .true.
824    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
825    if [ ${USING_MPMD} == "yes" ] ; then
826       set_xio_using_server iodef.xml true
827    else
828       set_xio_using_server iodef.xml false
829    fi
830    cd ${SETTE_DIR}
831    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
832    cd ${SETTE_DIR}
833    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
834
835    cd ${SETTE_DIR}
836    export TEST_NAME="REPRO_4_8"
837    . ./prepare_exe_dir.sh
838    set_valid_dir
839    clean_valid_dir
840    JOB_FILE=${EXE_DIR}/run_job.sh
841    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
842    cd ${EXE_DIR}
843    set_namelist namelist_cfg cn_exp \"AMM12_48\"
844    set_namelist namelist_cfg nn_it000 1
845    set_namelist namelist_cfg nn_itend 576
846    set_namelist namelist_cfg jpni 4
847    set_namelist namelist_cfg jpnj 8
848    set_namelist namelist_cfg sn_cfctl%l_config .true.
849    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
850    if [ ${USING_MPMD} == "yes" ] ; then
851       set_xio_using_server iodef.xml true
852    else
853       set_xio_using_server iodef.xml false
854    fi
855    cd ${SETTE_DIR}
856    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
857    cd ${SETTE_DIR}
858    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
859fi
860
861
862# ---------
863# ORCA2_SAS
864# ---------
865if [ ${config} == "SAS" ] ;  then
866## Restartability tests
867    export TEST_NAME="LONG"
868    cd ${MAIN_DIR}
869    #
870    # syncronisation if target directory/file exist (not done by makenemo)
871    . ${SETTE_DIR}/all_functions.sh
872    sync_config  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
873    clean_config ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
874    #
875    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
876    cd ${SETTE_DIR}
877    . ./param.cfg
878    . ./all_functions.sh
879    . ./prepare_exe_dir.sh
880    set_valid_dir
881    clean_valid_dir
882    JOB_FILE=${EXE_DIR}/run_job.sh
883    NPROC=32
884    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
885    cd ${EXE_DIR}
886    set_namelist namelist_cfg cn_exp \"SAS\"
887    set_namelist namelist_cfg nn_it000 1
888    set_namelist namelist_cfg nn_itend 256
889    set_namelist namelist_cfg nn_stock 128
890    set_namelist namelist_cfg jpni 4
891    set_namelist namelist_cfg jpnj 8
892    set_namelist namelist_cfg sn_cfctl%l_config .true.
893    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
894    set_namelist namelist_ice_cfg ln_icediachk .true.
895    if [ ${USING_MPMD} == "yes" ] ; then
896       set_xio_using_server iodef.xml true
897    else
898       set_xio_using_server iodef.xml false
899    fi
900    cd ${SETTE_DIR}
901    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
902
903    cd ${SETTE_DIR}
904    export TEST_NAME="SHORT"
905    . ./prepare_exe_dir.sh
906    set_valid_dir
907    clean_valid_dir
908    cd ${EXE_DIR}
909    set_namelist namelist_cfg cn_exp \"SAS\"
910    set_namelist namelist_cfg nn_it000 129
911    set_namelist namelist_cfg nn_itend 256
912    set_namelist namelist_cfg jpni 4
913    set_namelist namelist_cfg jpnj 8
914    set_namelist namelist_cfg sn_cfctl%l_config .true.
915    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
916    set_namelist namelist_cfg ln_rstart .true.
917    set_namelist namelist_cfg nn_rstctl 2
918    set_namelist namelist_cfg nn_date0 010109
919    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000128_restart\"
920    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000128_restart_ice\"
921    if [ ${USING_MPMD} == "yes" ] ; then
922       set_xio_using_server iodef.xml true
923    else
924       set_xio_using_server iodef.xml false
925    fi
926    for (( i=1; i<=$NPROC; i++)) ; do
927        L_NPROC=$(( $i - 1 ))
928        L_NPROC=`printf "%04d\n" ${L_NPROC}`
929        ln -sf ../LONG/SAS_00000128_restart_${L_NPROC}.nc .
930        ln -sf ../LONG/SAS_00000128_restart_ice_${L_NPROC}.nc .
931    done
932    cd ${SETTE_DIR}
933    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
934    cd ${SETTE_DIR}
935    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
936
937## Reproducibility tests
938    export TEST_NAME="REPRO_4_8"
939    cd ${MAIN_DIR}
940    cd ${SETTE_DIR}
941    . ./param.cfg
942    . ./all_functions.sh
943    . ./prepare_exe_dir.sh
944    set_valid_dir
945    clean_valid_dir
946    JOB_FILE=${EXE_DIR}/run_job.sh
947    NPROC=32
948    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
949    cd ${EXE_DIR}
950    set_namelist namelist_cfg cn_exp \"SAS_48\"
951    set_namelist namelist_cfg nn_it000 1
952    set_namelist namelist_cfg nn_itend 80
953    set_namelist namelist_cfg jpni 4
954    set_namelist namelist_cfg jpnj 8
955    set_namelist namelist_cfg sn_cfctl%l_config .true.
956    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
957    if [ ${USING_MPMD} == "yes" ] ; then
958       set_xio_using_server iodef.xml true
959    else
960       set_xio_using_server iodef.xml false
961    fi
962    cd ${SETTE_DIR}
963    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
964    cd ${SETTE_DIR}
965    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
966
967    cd ${SETTE_DIR}
968    export TEST_NAME="REPRO_8_4"
969    . ./prepare_exe_dir.sh
970    set_valid_dir
971    clean_valid_dir
972    JOB_FILE=${EXE_DIR}/run_job.sh
973    NPROC=32
974    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
975    cd ${EXE_DIR}
976    set_namelist namelist_cfg cn_exp \"SAS_84\"
977    set_namelist namelist_cfg nn_it000 1
978    set_namelist namelist_cfg nn_itend 80
979    set_namelist namelist_cfg jpni 8
980    set_namelist namelist_cfg jpnj 4
981    set_namelist namelist_cfg sn_cfctl%l_config .true.
982    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
983    if [ ${USING_MPMD} == "yes" ] ; then
984       set_xio_using_server iodef.xml true
985    else
986       set_xio_using_server iodef.xml false
987    fi
988    cd ${SETTE_DIR}
989    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
990    cd ${SETTE_DIR}
991    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
992
993fi
994
995
996# --------------
997# ORCA2_ICE_OBS
998# --------------
999## Test assimilation interface code, OBS and ASM for reproducibility
1000## Restartability not tested (ASM code not restartable while increments are being applied)
1001if [ ${config} == "ORCA2_ICE_OBS" ] ; then
1002## Reproducibility tests
1003    export TEST_NAME="REPRO_4_8"
1004    cd ${MAIN_DIR}
1005    #
1006    # syncronisation if target directory/file exist (not done by makenemo)
1007    . ${SETTE_DIR}/all_functions.sh
1008    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
1009    clean_config ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
1010    #
1011    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc ${ADD_KEYS}" del_key "key_top"
1012    cd ${SETTE_DIR}
1013    . ./param.cfg
1014    . ./all_functions.sh
1015    . ./prepare_exe_dir.sh
1016    set_valid_dir
1017    clean_valid_dir
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 80
1025    set_namelist namelist_cfg ln_read_cfg .true.
1026    set_namelist namelist_cfg jpni 4
1027    set_namelist namelist_cfg jpnj 8
1028    set_namelist namelist_cfg sn_cfctl%l_config .true.
1029    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1030    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
1031    set_namelist namelist_cfg ln_diaobs .true.
1032    set_namelist namelist_cfg ln_t3d .true.
1033    set_namelist namelist_cfg ln_s3d .true.
1034    set_namelist namelist_cfg ln_sst .true.
1035    set_namelist namelist_cfg ln_sla .true.
1036    set_namelist namelist_cfg ln_sic .true.
1037    set_namelist namelist_cfg ln_vel3d .true.
1038    set_namelist namelist_cfg ln_bkgwri .true.
1039    set_namelist namelist_cfg ln_trainc .true.
1040    set_namelist namelist_cfg ln_dyninc .true.
1041    set_namelist namelist_cfg ln_sshinc .true.
1042    set_namelist namelist_cfg ln_asmiau .true.
1043    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
1044    set_namelist namelist_top_cfg ln_trcdta .false.
1045    set_namelist namelist_top_cfg ln_trcbc  .false.
1046    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1047    # if not you need input files, and for tests is not necessary
1048    set_namelist namelist_pisces_cfg ln_varpar .false.
1049    set_namelist namelist_pisces_cfg ln_ironsed .false.
1050    set_namelist namelist_pisces_cfg ln_ironice .false.
1051    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1052    if [ ${USING_MPMD} == "yes" ] ; then
1053       set_xio_using_server iodef.xml true
1054    else
1055       set_xio_using_server iodef.xml false
1056    fi
1057    cd ${SETTE_DIR}
1058    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1059    cd ${SETTE_DIR}
1060    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1061
1062   cd ${SETTE_DIR}
1063    export TEST_NAME="REPRO_8_4"
1064    . ./prepare_exe_dir.sh
1065    set_valid_dir
1066    clean_valid_dir
1067    JOB_FILE=${EXE_DIR}/run_job.sh
1068    NPROC=32
1069    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1070    cd ${EXE_DIR}
1071    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
1072    set_namelist namelist_cfg nn_it000 1
1073    set_namelist namelist_cfg nn_itend 80
1074    set_namelist namelist_cfg ln_read_cfg .true.
1075    set_namelist namelist_cfg jpni 8
1076    set_namelist namelist_cfg jpnj 4
1077    set_namelist namelist_cfg sn_cfctl%l_config .true.
1078    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1079    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
1080    set_namelist namelist_cfg ln_diaobs .true.
1081    set_namelist namelist_cfg ln_t3d .true.
1082    set_namelist namelist_cfg ln_s3d .true.
1083    set_namelist namelist_cfg ln_sst .true.
1084    set_namelist namelist_cfg ln_sla .true.
1085    set_namelist namelist_cfg ln_sic .true.
1086    set_namelist namelist_cfg ln_vel3d .true.
1087    set_namelist namelist_cfg ln_bkgwri .true.
1088    set_namelist namelist_cfg ln_trainc .true.
1089    set_namelist namelist_cfg ln_dyninc .true.
1090    set_namelist namelist_cfg ln_sshinc .true.
1091    set_namelist namelist_cfg ln_asmiau .true.
1092    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
1093    set_namelist namelist_top_cfg ln_trcdta .false.
1094    set_namelist namelist_top_cfg ln_trcbc  .false.
1095    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1096    # if not you need input files, and for tests is not necessary
1097    set_namelist namelist_pisces_cfg ln_varpar .false.
1098    set_namelist namelist_pisces_cfg ln_ironsed .false.
1099    set_namelist namelist_pisces_cfg ln_ironice .false.
1100    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1101    if [ ${USING_MPMD} == "yes" ] ; then
1102       set_xio_using_server iodef.xml true
1103    else
1104       set_xio_using_server iodef.xml false
1105    fi
1106    cd ${SETTE_DIR}
1107    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1108    cd ${SETTE_DIR}
1109    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1110fi
1111
1112# ------------
1113# AGRIF ICE
1114# -----------
1115if [ ${config} == "AGRIF" ] ;  then
1116## Restartability tests
1117    export TEST_NAME="LONG"
1118    cd ${MAIN_DIR}
1119    #
1120    # syncronisation if target directory/file exist (not done by makenemo)
1121    . ${SETTE_DIR}/all_functions.sh
1122    sync_config  AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1123    clean_config AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
1124    #
1125    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
1126    cd ${SETTE_DIR}
1127    . ./param.cfg
1128    . ./all_functions.sh
1129    . ./prepare_exe_dir.sh
1130    set_valid_dir
1131    clean_valid_dir
1132    JOB_FILE=${EXE_DIR}/run_job.sh
1133    NPROC=16
1134    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1135    cd ${EXE_DIR}
1136    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
1137    set_namelist namelist_cfg nn_it000 1
1138    set_namelist namelist_cfg nn_itend 20
1139    set_namelist namelist_cfg nn_stock 10
1140    set_namelist namelist_cfg sn_cfctl%l_config .true.
1141    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1142    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
1143    set_namelist 1_namelist_cfg nn_it000 1
1144    set_namelist 1_namelist_cfg nn_itend 20
1145    set_namelist 1_namelist_cfg nn_stock 10
1146    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1147    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1148    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
1149    set_namelist 2_namelist_cfg nn_it000 1
1150    set_namelist 2_namelist_cfg nn_itend 80
1151    set_namelist 2_namelist_cfg nn_stock 40
1152    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1153    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1154    set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\"
1155    set_namelist 3_namelist_cfg nn_it000 1
1156    set_namelist 3_namelist_cfg nn_itend 240
1157    set_namelist 3_namelist_cfg nn_stock 120
1158    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1159    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1160
1161    if [ ${USING_MPMD} == "yes" ] ; then
1162       set_xio_using_server iodef.xml true
1163    else
1164       set_xio_using_server iodef.xml false
1165    fi
1166    cd ${SETTE_DIR}
1167    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1168   
1169    cd ${SETTE_DIR}
1170    export TEST_NAME="SHORT"
1171    . ./prepare_exe_dir.sh
1172    set_valid_dir
1173    clean_valid_dir
1174    cd ${EXE_DIR}
1175    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
1176    set_namelist namelist_cfg nn_it000 11
1177    set_namelist namelist_cfg nn_itend 20
1178    set_namelist namelist_cfg nn_stock 10
1179    set_namelist namelist_cfg sn_cfctl%l_config .true.
1180    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1181    set_namelist namelist_cfg ln_rstart .true.
1182    set_namelist namelist_cfg nn_rstctl 2
1183    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
1184    set_namelist 1_namelist_cfg nn_it000 11
1185    set_namelist 1_namelist_cfg nn_itend 20
1186    set_namelist 1_namelist_cfg nn_stock 10
1187    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1188    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1189    set_namelist 1_namelist_cfg ln_rstart .true.
1190    set_namelist 1_namelist_cfg nn_rstctl 2
1191    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1192    set_namelist 2_namelist_cfg nn_it000 41
1193    set_namelist 2_namelist_cfg nn_itend 80
1194    set_namelist 2_namelist_cfg nn_stock 40
1195    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1196    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1197    set_namelist 2_namelist_cfg ln_rstart .true.
1198    set_namelist 2_namelist_cfg nn_rstctl 2
1199    set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\"
1200    set_namelist 3_namelist_cfg nn_it000 121
1201    set_namelist 3_namelist_cfg nn_itend 240
1202    set_namelist 3_namelist_cfg nn_stock 120
1203    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1204    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1205    set_namelist 3_namelist_cfg ln_rstart .true.
1206    set_namelist 3_namelist_cfg nn_rstctl 2
1207    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1208    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1209    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1210    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1211    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1212    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1213    set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1214    set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1215
1216    for (( i=1; i<=$NPROC; i++)) ; do
1217        L_NPROC=$(( $i - 1 ))
1218        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1219        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1220        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1221        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1222        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1223        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1224        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1225        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1226        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1227    done
1228    if [ ${USING_MPMD} == "yes" ] ; then
1229       set_xio_using_server iodef.xml true
1230    else
1231       set_xio_using_server iodef.xml false
1232    fi
1233    cd ${SETTE_DIR}
1234    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1235    cd ${SETTE_DIR}
1236    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1237
1238## Reproducibility tests
1239    export TEST_NAME="REPRO_2_8"
1240    cd ${MAIN_DIR}
1241    cd ${SETTE_DIR}
1242    . ./param.cfg
1243    . ./all_functions.sh
1244    . ./prepare_exe_dir.sh
1245    set_valid_dir
1246    clean_valid_dir
1247    JOB_FILE=${EXE_DIR}/run_job.sh
1248    NPROC=16
1249    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1250    cd ${EXE_DIR}
1251    set_namelist namelist_cfg cn_exp \"AGRIF_28\"
1252    set_namelist namelist_cfg nn_it000 1
1253    set_namelist namelist_cfg nn_itend 20
1254    set_namelist namelist_cfg jpni 2
1255    set_namelist namelist_cfg jpnj 8
1256    set_namelist namelist_cfg sn_cfctl%l_config .true.
1257    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1258    set_namelist 1_namelist_cfg cn_exp \"AGRIF_28\"
1259    set_namelist 1_namelist_cfg nn_it000 1
1260    set_namelist 1_namelist_cfg nn_itend 20
1261    set_namelist 1_namelist_cfg jpni 2
1262    set_namelist 1_namelist_cfg jpnj 8
1263    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1264    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1265    set_namelist 2_namelist_cfg cn_exp \"AGRIF_28\"
1266    set_namelist 2_namelist_cfg nn_it000 1
1267    set_namelist 2_namelist_cfg nn_itend 80
1268    set_namelist 2_namelist_cfg jpni 2
1269    set_namelist 2_namelist_cfg jpnj 8
1270    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1271    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1272    set_namelist 3_namelist_cfg cn_exp \"AGRIF_28\"
1273    set_namelist 3_namelist_cfg nn_it000 1
1274    set_namelist 3_namelist_cfg nn_itend 240
1275    set_namelist 3_namelist_cfg jpni 2
1276    set_namelist 3_namelist_cfg jpnj 8
1277    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1278    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1279
1280    if [ ${USING_MPMD} == "yes" ] ; then
1281       set_xio_using_server iodef.xml true
1282    else
1283       set_xio_using_server iodef.xml false
1284    fi
1285    cd ${SETTE_DIR}
1286    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1287    cd ${SETTE_DIR}
1288    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1289
1290    cd ${SETTE_DIR}
1291    export TEST_NAME="REPRO_4_4"
1292    . ./prepare_exe_dir.sh
1293    set_valid_dir
1294    clean_valid_dir
1295    JOB_FILE=${EXE_DIR}/run_job.sh
1296    NPROC=16
1297    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1298    cd ${EXE_DIR}
1299    set_namelist namelist_cfg cn_exp \"AGRIF_44\"
1300    set_namelist namelist_cfg nn_it000 1
1301    set_namelist namelist_cfg nn_itend 20
1302    set_namelist namelist_cfg jpni 4
1303    set_namelist namelist_cfg jpnj 4
1304    set_namelist namelist_cfg sn_cfctl%l_config .true.
1305    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1306    set_namelist 1_namelist_cfg cn_exp \"AGRIF_44\"
1307    set_namelist 1_namelist_cfg nn_it000 1
1308    set_namelist 1_namelist_cfg nn_itend 20
1309    set_namelist 1_namelist_cfg jpni 4
1310    set_namelist 1_namelist_cfg jpnj 4
1311    set_namelist 1_namelist_cfg sn_cfctl%l_config .true.
1312    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
1313    set_namelist 2_namelist_cfg cn_exp \"AGRIF_44\"
1314    set_namelist 2_namelist_cfg nn_it000 1
1315    set_namelist 2_namelist_cfg nn_itend 80
1316    set_namelist 2_namelist_cfg jpni 4
1317    set_namelist 2_namelist_cfg jpnj 4
1318    set_namelist 2_namelist_cfg sn_cfctl%l_config .true.
1319    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
1320    set_namelist 3_namelist_cfg cn_exp \"AGRIF_44\"
1321    set_namelist 3_namelist_cfg nn_it000 1
1322    set_namelist 3_namelist_cfg nn_itend 240
1323    set_namelist 3_namelist_cfg jpni 4
1324    set_namelist 3_namelist_cfg jpnj 4
1325    set_namelist 3_namelist_cfg sn_cfctl%l_config .true.
1326    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
1327
1328    if [ ${USING_MPMD} == "yes" ] ; then
1329       set_xio_using_server iodef.xml true
1330    else
1331       set_xio_using_server iodef.xml false
1332    fi
1333    cd ${SETTE_DIR}
1334    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1335    cd ${SETTE_DIR}
1336    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1337
1338## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
1339    export TEST_NAME="ORCA2"
1340    cd ${MAIN_DIR}
1341    cd ${SETTE_DIR}
1342    . ./param.cfg
1343    . ./all_functions.sh
1344    . ./prepare_exe_dir.sh
1345    set_valid_dir
1346    clean_valid_dir
1347    JOB_FILE=${EXE_DIR}/run_job.sh
1348    NPROC=32
1349    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1350    cd ${EXE_DIR}
1351    set_namelist namelist_cfg cn_exp \"ORCA2\"
1352    set_namelist namelist_cfg nn_it000 1
1353    set_namelist namelist_cfg nn_itend 150
1354    set_namelist namelist_cfg sn_cfctl%l_config .true.
1355    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1356
1357#   Set the number of fine grids to zero:   
1358    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1359
1360    if [ ${USING_MPMD} == "yes" ] ; then
1361       set_xio_using_server iodef.xml true
1362    else
1363       set_xio_using_server iodef.xml false
1364    fi
1365    cd ${SETTE_DIR}
1366    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1367    cd ${SETTE_DIR}
1368    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1369
1370fi
1371
1372
1373## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2)
1374if [ ${config} == "AGRIF" ] ;  then
1375    export TEST_NAME="ORCA2"
1376    cd ${MAIN_DIR}
1377    #
1378    # syncronisation if target directory/file exist (not done by makenemo)
1379    . ${SETTE_DIR}/all_functions.sh
1380    sync_config  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1381    clean_config AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
1382    #
1383    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "key_agrif"
1384    cd ${SETTE_DIR}
1385    . ./param.cfg
1386    . ./all_functions.sh
1387    . ./prepare_exe_dir.sh
1388    set_valid_dir
1389    clean_valid_dir
1390    JOB_FILE=${EXE_DIR}/run_job.sh
1391    NPROC=32
1392    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1393    cd ${EXE_DIR}
1394    set_namelist namelist_cfg cn_exp \"ORCA2\"
1395    set_namelist namelist_cfg nn_it000 1
1396    set_namelist namelist_cfg nn_itend 150
1397    set_namelist namelist_cfg sn_cfctl%l_config .true.
1398    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1399#
1400    if [ ${USING_MPMD} == "yes" ] ; then
1401       set_xio_using_server iodef.xml true
1402    else
1403       set_xio_using_server iodef.xml false
1404    fi
1405    cd ${SETTE_DIR}
1406    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1407    cd ${SETTE_DIR}
1408    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1409
1410fi
1411
1412# -------
1413# SPITZ12
1414# -------
1415if [ ${config} == "SPITZ12" ] ;  then
1416## Restartability tests
1417    export TEST_NAME="LONG"
1418    cd ${MAIN_DIR}
1419    #
1420    # syncronisation if target directory/file exist (not done by makenemo)
1421    . ${SETTE_DIR}/all_functions.sh
1422    sync_config  SPITZ12 SPITZ12_ST 'cfgs'
1423    clean_config SPITZ12 SPITZ12_ST 'cfgs'
1424    #
1425    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
1426    cd ${SETTE_DIR}
1427    . ./param.cfg
1428    . ./all_functions.sh
1429    . ./prepare_exe_dir.sh
1430    set_valid_dir
1431    clean_valid_dir
1432    JOB_FILE=${EXE_DIR}/run_job.sh
1433    NPROC=32
1434    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1435    cd ${EXE_DIR}
1436    set_namelist namelist_cfg cn_exp \"S12_LONG\"
1437    set_namelist namelist_cfg nn_it000 1
1438    set_namelist namelist_cfg nn_itend 240
1439    set_namelist namelist_cfg nn_stock 120
1440    set_namelist namelist_cfg nn_date0 20020101
1441    set_namelist namelist_cfg jpni 4
1442    set_namelist namelist_cfg jpnj 8
1443    set_namelist namelist_cfg sn_cfctl%l_config .true.
1444    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1445    #set_namelist namelist_ice_cfg ln_icediachk .true.
1446    if [ ${USING_MPMD} == "yes" ] ; then
1447       set_xio_using_server iodef.xml true
1448    else
1449       set_xio_using_server iodef.xml false
1450    fi
1451    cd ${SETTE_DIR}
1452    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1453   
1454    cd ${SETTE_DIR}
1455    export TEST_NAME="SHORT"
1456    . ./prepare_exe_dir.sh
1457    set_valid_dir
1458    clean_valid_dir
1459    cd ${EXE_DIR}
1460    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
1461    set_namelist namelist_cfg nn_it000 121
1462    set_namelist namelist_cfg nn_itend 240
1463    set_namelist namelist_cfg nn_stock 120
1464    set_namelist namelist_cfg ln_rstart .true.
1465    set_namelist namelist_cfg nn_rstctl 2
1466    set_namelist namelist_cfg jpni 4
1467    set_namelist namelist_cfg jpnj 8
1468    set_namelist namelist_cfg sn_cfctl%l_config .true.
1469    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1470    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000120_restart\"
1471    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000120_restart_ice\"
1472    for (( i=1; i<=$NPROC; i++)) ; do
1473        L_NPROC=$(( $i - 1 ))
1474        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1475        ln -sf ../LONG/S12_LONG_00000120_restart_${L_NPROC}.nc .
1476        ln -sf ../LONG/S12_LONG_00000120_restart_ice_${L_NPROC}.nc .
1477    done
1478    if [ ${USING_MPMD} == "yes" ] ; then
1479       set_xio_using_server iodef.xml true
1480    else
1481       set_xio_using_server iodef.xml false
1482    fi
1483    cd ${SETTE_DIR}
1484    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1485    cd ${SETTE_DIR}
1486    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1487
1488## Reproducibility tests
1489    export TEST_NAME="REPRO_4_8"
1490    cd ${MAIN_DIR}
1491    cd ${SETTE_DIR}
1492    . ./param.cfg
1493    . ./all_functions.sh
1494    . ./prepare_exe_dir.sh
1495    set_valid_dir
1496    clean_valid_dir
1497    JOB_FILE=${EXE_DIR}/run_job.sh
1498    NPROC=32
1499    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1500    cd ${EXE_DIR}
1501    set_namelist namelist_cfg cn_exp \"S12_48\"
1502    set_namelist namelist_cfg nn_it000 1
1503    set_namelist namelist_cfg nn_itend 120
1504    set_namelist namelist_cfg nn_date0 20020101
1505    set_namelist namelist_cfg jpni 4
1506    set_namelist namelist_cfg jpnj 8
1507    set_namelist namelist_cfg sn_cfctl%l_config .true.
1508    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1509    if [ ${USING_MPMD} == "yes" ] ; then
1510       set_xio_using_server iodef.xml true
1511    else
1512       set_xio_using_server iodef.xml false
1513    fi
1514    cd ${SETTE_DIR}
1515    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1516    cd ${SETTE_DIR}
1517    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1518
1519    cd ${SETTE_DIR}
1520    export TEST_NAME="REPRO_8_4"
1521    . ./prepare_exe_dir.sh
1522    set_valid_dir
1523    clean_valid_dir
1524    JOB_FILE=${EXE_DIR}/run_job.sh
1525    NPROC=32
1526    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1527    cd ${EXE_DIR}
1528    set_namelist namelist_cfg cn_exp \"S12_84\"
1529    set_namelist namelist_cfg nn_it000 1
1530    set_namelist namelist_cfg nn_itend 120
1531    set_namelist namelist_cfg nn_date0 20020101
1532    set_namelist namelist_cfg jpni 8
1533    set_namelist namelist_cfg jpnj 4
1534    set_namelist namelist_cfg sn_cfctl%l_config .true.
1535    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
1536    if [ ${USING_MPMD} == "yes" ] ; then
1537       set_xio_using_server iodef.xml true
1538    else
1539       set_xio_using_server iodef.xml false
1540    fi
1541    cd ${SETTE_DIR}
1542    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
1543    cd ${SETTE_DIR}
1544    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1545fi
1546
1547
1548done
Note: See TracBrowser for help on using the repository browser.