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 @ 13160

Last change on this file since 13160 was 13160, checked in by gsamson, 4 years ago

merge sette@r12931 into ABL sette branch; add Belenos arch/batch files; all SETTE tests identical to trunk@r13136 except ORCA2_ICE_PISCES where ABL is activated; ticket #2452

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