source: utils/CI/sette/sette.sh @ 9658

Last change on this file since 9658 was 9658, checked in by nicolasmartin, 3 years ago

Reorganisation plan for NEMO repository: fix to make sette works with new location of makenemo

  • Property svn:executable set to *
File size: 48.3 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#  prepare_job.sh     : to generate the script run_job.sh
69#
70#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
71#                        see sette.sh and BATCH_TEMPLATE directory
72#
73#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
74#        can be found paths to the input tar file)
75#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
76#        directory
77#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
78#        remain in ${NEW_CONF}/EXP00
79#
80#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
81#        executed commands
82#
83#  NOTE: if sette.sh is stopped in output.sette there is written the last command
84#        executed by sette.sh
85#
86# example use: ./sette.sh
87#########################################################################################
88#
89# Compiler among those in NEMOGCM/ARCH
90COMPILER=X64_ADA
91
92export BATCH_COMMAND_PAR="llsubmit"
93export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
94export INTERACT_FLAG="no"
95export MPIRUN_FLAG="yes"
96export USING_XIOS="yes"
97#
98export DEL_KEYS="key_iomput"
99if [ ${USING_XIOS} == "yes" ] 
100 then
101   export DEL_KEYS=""
102fi
103#
104# Settings which control the use of stand alone servers (only relevant if using xios)
105#
106export USING_MPMD="no"
107export NUM_XIOSERVERS=4
108export JOB_PREFIX=batch-mpmd
109#
110if [ ${USING_MPMD} == "no" ] 
111 then
112   export NUM_XIOSERVERS=0
113   export JOB_PREFIX=batch
114fi
115#
116#
117if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
118 then
119   echo "Incompatible choices. MPMD mode requires the XIOS server"
120   exit
121fi
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=$(dirname $SETTE_DIR)
126CONFIG_DIR0=${MAIN_DIR}/cfgs
127TOOLS_DIR=${MAIN_DIR}/tools
128
129CMP_NAM=${1:-$COMPILER}
130# Copy job_batch_COMPILER file for specific compiler into job_batch_template
131cd ${SETTE_DIR}
132cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
133# Description of configuration tested:
134# GYRE_PISCES       :  1
135# ORCA2_SI3_PISCES  :  2
136# ORCA2_OFF_PISCES  :  3
137# AMM12             :  4
138# SAS               :  5
139# ORCA2_SI3_OBS     :  6
140# AGRIF             :  7 & 8  test AGRIF in a double zoom configuration (AGRIF_NORDIC)
141#                               and check that key_agrif without zoom = no key_agrif
142# SPITZ12           :  9      regional configuration including sea-ice and tides (Spitzbergen)
143
144for config in 1 2 3 4 5 6 7 8 9
145do
146
147# -----------
148# GYRE_PISCES
149# -----------
150if [ ${config} -eq 1 ] ;  then
151## Restartability tests for GYRE_PISCES
152    export TEST_NAME="LONG"
153    cd ${MAIN_DIR}
154    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
155    cd ${SETTE_DIR}
156    . ./param.cfg
157    . ./all_functions.sh
158    . ./prepare_exe_dir.sh
159    JOB_FILE=${EXE_DIR}/run_job.sh
160    NPROC=8
161    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
162    cd ${EXE_DIR} 
163    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
164    set_namelist namelist_cfg nn_it000 1
165    set_namelist namelist_cfg nn_itend 1080
166    set_namelist namelist_cfg nn_stock  540
167    set_namelist namelist_cfg ln_linssh .true.
168    set_namelist namelist_cfg jpni 2
169    set_namelist namelist_cfg jpnj 4
170    set_namelist namelist_cfg jpnij 8
171    if [ ${USING_MPMD} == "yes" ] ; then
172       set_xio_using_server iodef.xml true
173    else
174       set_xio_using_server iodef.xml false
175    fi
176    cd ${SETTE_DIR}
177    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
178
179    cd ${SETTE_DIR}
180    export TEST_NAME="SHORT"
181    . ./prepare_exe_dir.sh
182    cd ${EXE_DIR}
183    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
184    set_namelist namelist_cfg nn_it000 541
185    set_namelist namelist_cfg nn_itend 1080
186    set_namelist namelist_cfg nn_stock 540
187    set_namelist namelist_cfg ln_rstart .true.
188    set_namelist namelist_cfg nn_rstctl 2
189    set_namelist namelist_cfg ln_linssh .true.
190    set_namelist namelist_cfg jpni 2
191    set_namelist namelist_cfg jpnj 4
192    set_namelist namelist_cfg jpnij 8
193    set_namelist namelist_top_cfg ln_rsttr .true.
194    set_namelist namelist_top_cfg nn_rsttr 2
195    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000540_restart\"
196    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000540_restart_trc\"
197    if [ ${USING_MPMD} == "yes" ] ; then
198       set_xio_using_server iodef.xml true
199    else
200       set_xio_using_server iodef.xml false
201    fi
202    for (( i=1; i<=$NPROC; i++)) ; do
203        L_NPROC=$(( $i - 1 ))
204        L_NPROC=`printf "%04d\n" ${L_NPROC}`
205        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_${L_NPROC}.nc .
206        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_trc_${L_NPROC}.nc .
207    done
208    if [ ${USING_MPMD} == "yes" ] ; then
209       set_xio_using_server iodef.xml true
210    else
211       set_xio_using_server iodef.xml false
212    fi
213    cd ${SETTE_DIR}
214    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
215    cd ${SETTE_DIR}
216    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
217
218## Reproducibility tests for GYRE_PISCES
219    export TEST_NAME="REPRO_2_4"
220    cd ${MAIN_DIR}
221    cd ${SETTE_DIR}
222    . ./param.cfg
223    . ./all_functions.sh
224    . ./prepare_exe_dir.sh
225    JOB_FILE=${EXE_DIR}/run_job.sh
226    NPROC=8
227    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
228    cd ${EXE_DIR}
229    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
230    set_namelist namelist_cfg nn_it000 1
231    set_namelist namelist_cfg nn_itend 1080
232    set_namelist namelist_cfg ln_linssh .true.
233    set_namelist namelist_cfg jpni 2
234    set_namelist namelist_cfg jpnj 4
235    set_namelist namelist_cfg jpnij 8
236    if [ ${USING_MPMD} == "yes" ] ; then
237       set_xio_using_server iodef.xml true
238    else
239       set_xio_using_server iodef.xml false
240    fi
241    cd ${SETTE_DIR}
242    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
243    cd ${SETTE_DIR}
244    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
245
246    cd ${SETTE_DIR}
247    export TEST_NAME="REPRO_4_2"
248    . ./prepare_exe_dir.sh
249    JOB_FILE=${EXE_DIR}/run_job.sh
250    NPROC=8
251    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
252    cd ${EXE_DIR}
253    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
254    set_namelist namelist_cfg nn_it000 1
255    set_namelist namelist_cfg nn_itend 1080
256    set_namelist namelist_cfg ln_linssh .true.
257    set_namelist namelist_cfg jpni 4
258    set_namelist namelist_cfg jpnj 2
259    set_namelist namelist_cfg jpnij 8
260    if [ ${USING_MPMD} == "yes" ] ; then
261       set_xio_using_server iodef.xml true
262    else
263       set_xio_using_server iodef.xml false
264    fi
265    cd ${SETTE_DIR}
266    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
267    cd ${SETTE_DIR}
268    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
269
270fi
271
272# -----------------
273# ORCA2_SI3_PISCES
274# -----------------
275if [ ${config} -eq 2 ] ;  then
276## Restartability tests for ORCA2_SI3_PISCES
277    export TEST_NAME="LONG"
278    cd ${MAIN_DIR}
279    . ./makenemo -m ${CMP_NAM} -n ORCA2_SI3_PISCES_ST -r ORCA2_SI3_PISCES -j 8 del_key ${DEL_KEYS}
280    cd ${SETTE_DIR}
281    . ./param.cfg
282    . ./all_functions.sh
283    . ./prepare_exe_dir.sh
284    JOB_FILE=${EXE_DIR}/run_job.sh
285    NPROC=32
286    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
287    cd ${EXE_DIR}
288    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
289    set_namelist namelist_cfg nn_it000 1
290    set_namelist namelist_cfg nn_itend 1000
291    set_namelist namelist_cfg nn_stock 500
292    set_namelist namelist_cfg jpni 4
293    set_namelist namelist_cfg jpnj 8
294    set_namelist namelist_cfg jpnij 32
295    set_namelist namelist_ice_cfg ln_icediachk .true.
296    set_namelist namelist_top_cfg ln_trcdta .false.
297    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
298    # if not you need input files, and for tests is not necessary
299    set_namelist namelist_pisces_cfg ln_presatm .false.
300    set_namelist namelist_pisces_cfg ln_varpar .false.
301    set_namelist namelist_pisces_cfg ln_dust .false.
302    set_namelist namelist_pisces_cfg ln_solub .false.
303    set_namelist namelist_pisces_cfg ln_river .false.
304    set_namelist namelist_pisces_cfg ln_ndepo .false.
305    set_namelist namelist_pisces_cfg ln_ironsed .false.
306    set_namelist namelist_pisces_cfg ln_ironice .false.
307    set_namelist namelist_pisces_cfg ln_hydrofe .false.
308    # put ln_pisdmp to false : no restoring to global mean value
309    set_namelist namelist_pisces_cfg ln_pisdmp .false.
310    if [ ${USING_MPMD} == "yes" ] ; then
311       set_xio_using_server iodef.xml true
312    else
313       set_xio_using_server iodef.xml false
314    fi
315    cd ${SETTE_DIR}
316    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
317   
318    cd ${SETTE_DIR}
319    export TEST_NAME="SHORT"
320    . ./prepare_exe_dir.sh
321    cd ${EXE_DIR}
322    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
323    set_namelist namelist_cfg nn_it000 501
324    set_namelist namelist_cfg nn_itend 1000
325    set_namelist namelist_cfg nn_stock 500
326    set_namelist namelist_cfg ln_rstart .true.
327    set_namelist namelist_cfg nn_rstctl 2
328    set_namelist namelist_cfg jpni 4
329    set_namelist namelist_cfg jpnj 8
330    set_namelist namelist_cfg jpnij 32
331    set_namelist namelist_top_cfg ln_rsttr .true.
332    set_namelist namelist_top_cfg nn_rsttr 2
333    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000500_restart\"
334    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000500_restart_trc\"
335    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000500_restart_ice\"
336    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
337    # if not you need input files, and for tests is not necessary
338    set_namelist namelist_pisces_cfg ln_presatm .false.
339    set_namelist namelist_pisces_cfg ln_varpar .false.
340    set_namelist namelist_pisces_cfg ln_dust .false.
341    set_namelist namelist_pisces_cfg ln_solub .false.
342    set_namelist namelist_pisces_cfg ln_river .false.
343    set_namelist namelist_pisces_cfg ln_ndepo .false.
344    set_namelist namelist_pisces_cfg ln_ironsed .false.
345    set_namelist namelist_pisces_cfg ln_ironice .false.
346    set_namelist namelist_pisces_cfg ln_hydrofe .false.
347    # put ln_pisdmp to false : no restoring to global mean value
348    set_namelist namelist_pisces_cfg ln_pisdmp .false.
349    for (( i=1; i<=$NPROC; i++)) ; do
350        L_NPROC=$(( $i - 1 ))
351        L_NPROC=`printf "%04d\n" ${L_NPROC}`
352        ln -sf ../LONG/O2L3P_LONG_00000500_restart_${L_NPROC}.nc .
353        ln -sf ../LONG/O2L3P_LONG_00000500_restart_trc_${L_NPROC}.nc .
354        ln -sf ../LONG/O2L3P_LONG_00000500_restart_ice_${L_NPROC}.nc .
355        ln -sf ../LONG/O2L3P_LONG_icebergs_00000500_restart_${L_NPROC}.nc O2L3P_LONG_00000500_restart_icebergs_${L_NPROC}.nc
356    done
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_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
364    cd ${SETTE_DIR}
365    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
366
367## Reproducibility tests for ORCA2_SI3_PISCES
368    export TEST_NAME="REPRO_4_8"
369    cd ${MAIN_DIR}
370    cd ${SETTE_DIR}
371    . ./param.cfg
372    . ./all_functions.sh
373    . ./prepare_exe_dir.sh
374    JOB_FILE=${EXE_DIR}/run_job.sh
375    NPROC=32
376    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
377    cd ${EXE_DIR}
378    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
379    set_namelist namelist_cfg nn_it000 1
380    set_namelist namelist_cfg nn_itend 1000
381    set_namelist namelist_cfg jpni 4
382    set_namelist namelist_cfg jpnj 8
383    set_namelist namelist_cfg jpnij 32
384    set_namelist namelist_top_cfg ln_trcdta .false.
385    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
386    # if not you need input files, and for tests is not necessary
387    set_namelist namelist_pisces_cfg ln_presatm .false.
388    set_namelist namelist_pisces_cfg ln_varpar .false.
389    set_namelist namelist_pisces_cfg ln_dust .false.
390    set_namelist namelist_pisces_cfg ln_solub .false.
391    set_namelist namelist_pisces_cfg ln_river .false.
392    set_namelist namelist_pisces_cfg ln_ndepo .false.
393    set_namelist namelist_pisces_cfg ln_ironsed .false.
394    set_namelist namelist_pisces_cfg ln_ironice .false.
395    set_namelist namelist_pisces_cfg ln_hydrofe .false.
396    # put ln_pisdmp to false : no restoring to global mean value
397    set_namelist namelist_pisces_cfg ln_pisdmp .false.
398    if [ ${USING_MPMD} == "yes" ] ; then
399       set_xio_using_server iodef.xml true
400    else
401       set_xio_using_server iodef.xml false
402    fi
403    cd ${SETTE_DIR}
404    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
405    cd ${SETTE_DIR}
406    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
407
408    cd ${SETTE_DIR}
409    export TEST_NAME="REPRO_8_4"
410    . ./prepare_exe_dir.sh
411    JOB_FILE=${EXE_DIR}/run_job.sh
412    NPROC=32
413    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
414    cd ${EXE_DIR}
415    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
416    set_namelist namelist_cfg nn_it000 1
417    set_namelist namelist_cfg nn_itend 1000
418    set_namelist namelist_cfg jpni 8
419    set_namelist namelist_cfg jpnj 4
420    set_namelist namelist_cfg jpnij 32
421    set_namelist namelist_top_cfg ln_trcdta .false.
422    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
423    # if not you need input files, and for tests is not necessary
424    set_namelist namelist_pisces_cfg ln_presatm .false.
425    set_namelist namelist_pisces_cfg ln_varpar .false.
426    set_namelist namelist_pisces_cfg ln_dust .false.
427    set_namelist namelist_pisces_cfg ln_solub .false.
428    set_namelist namelist_pisces_cfg ln_river .false.
429    set_namelist namelist_pisces_cfg ln_ndepo .false.
430    set_namelist namelist_pisces_cfg ln_ironsed .false.
431    set_namelist namelist_pisces_cfg ln_ironice .false.
432    set_namelist namelist_pisces_cfg ln_hydrofe .false.
433    # put ln_pisdmp to false : no restoring to global mean value
434    set_namelist namelist_pisces_cfg ln_pisdmp .false.
435    if [ ${USING_MPMD} == "yes" ] ; then
436       set_xio_using_server iodef.xml true
437    else
438       set_xio_using_server iodef.xml false
439    fi
440    cd ${SETTE_DIR}
441    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
442    cd ${SETTE_DIR}
443    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
444fi
445
446# ----------------
447# ORCA2_OFF_PISCES
448# ----------------
449if [ ${config} -eq 3 ] ;  then
450## Restartability tests for ORCA2_OFF_PISCES
451    export TEST_NAME="LONG"
452    cd ${MAIN_DIR}
453    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
454    cd ${SETTE_DIR}
455    . ./param.cfg
456    . ./all_functions.sh
457    . ./prepare_exe_dir.sh
458    JOB_FILE=${EXE_DIR}/run_job.sh
459    NPROC=32
460    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
461    cd ${EXE_DIR}
462    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
463    set_namelist namelist_cfg nn_it000 1
464    set_namelist namelist_cfg nn_itend 380
465    set_namelist namelist_cfg nn_stock 190
466    set_namelist namelist_cfg jpni 4
467    set_namelist namelist_cfg jpnj 8
468    set_namelist namelist_cfg jpnij 32
469    set_namelist namelist_top_cfg ln_trcdta .false.
470    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
471    # if not you need input files, and for tests is not necessary
472    set_namelist namelist_pisces_cfg ln_presatm .false.
473    set_namelist namelist_pisces_cfg ln_varpar .false.
474    set_namelist namelist_pisces_cfg ln_dust .false.
475    set_namelist namelist_pisces_cfg ln_solub .false.
476    set_namelist namelist_pisces_cfg ln_river .false.
477    set_namelist namelist_pisces_cfg ln_ndepo .false.
478    set_namelist namelist_pisces_cfg ln_ironsed .false.
479    set_namelist namelist_pisces_cfg ln_ironice .false.
480    set_namelist namelist_pisces_cfg ln_hydrofe .false.
481    # put ln_pisdmp to false : no restoring to global mean value
482    set_namelist namelist_pisces_cfg ln_pisdmp .false.
483    if [ ${USING_MPMD} == "yes" ] ; then
484       set_xio_using_server iodef.xml true
485    else
486       set_xio_using_server iodef.xml false
487    fi
488    cd ${SETTE_DIR}
489    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
490   
491    cd ${SETTE_DIR}
492    export TEST_NAME="SHORT"
493    . ./prepare_exe_dir.sh
494    cd ${EXE_DIR}
495    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
496    set_namelist namelist_cfg nn_it000 191
497    set_namelist namelist_cfg nn_itend 380
498    set_namelist namelist_cfg nn_stock 190
499    set_namelist namelist_cfg jpni 4
500    set_namelist namelist_cfg jpnj 8
501    set_namelist namelist_cfg jpnij 32
502    set_namelist namelist_top_cfg ln_rsttr .true.
503    set_namelist namelist_top_cfg nn_rsttr 2
504    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\"
505    for (( i=1; i<=$NPROC; i++)) ; do
506        L_NPROC=$(( $i - 1 ))
507        L_NPROC=`printf "%04d\n" ${L_NPROC}`
508        ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc .
509    done
510    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
511    # if not you need input files, and for tests is not necessary
512    set_namelist namelist_pisces_cfg ln_presatm .false.
513    set_namelist namelist_pisces_cfg ln_varpar .false.
514    set_namelist namelist_pisces_cfg ln_dust .false.
515    set_namelist namelist_pisces_cfg ln_solub .false.
516    set_namelist namelist_pisces_cfg ln_river .false.
517    set_namelist namelist_pisces_cfg ln_ndepo .false.
518    set_namelist namelist_pisces_cfg ln_ironsed .false.
519    set_namelist namelist_pisces_cfg ln_ironice .false.
520    set_namelist namelist_pisces_cfg ln_hydrofe .false.
521    # put ln_pisdmp to false : no restoring to global mean value
522    set_namelist namelist_pisces_cfg ln_pisdmp .false.
523    if [ ${USING_MPMD} == "yes" ] ; then
524       set_xio_using_server iodef.xml true
525    else
526       set_xio_using_server iodef.xml false
527    fi
528    cd ${SETTE_DIR}
529    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
530    cd ${SETTE_DIR}
531    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
532
533## Reproducibility tests for ORCA2_OFF_PISCES
534    export TEST_NAME="REPRO_4_8"
535    cd ${MAIN_DIR}
536    cd ${SETTE_DIR}
537    . ./param.cfg
538    . ./all_functions.sh
539    . ./prepare_exe_dir.sh
540    JOB_FILE=${EXE_DIR}/run_job.sh
541    NPROC=32
542    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
543    cd ${EXE_DIR}
544    set_namelist namelist_cfg cn_exp \"OFFP_48\"
545    set_namelist namelist_cfg nn_it000 1
546    set_namelist namelist_cfg nn_itend 380
547    set_namelist namelist_cfg jpni 4
548    set_namelist namelist_cfg jpnj 8
549    set_namelist namelist_cfg jpnij 32
550    set_namelist namelist_top_cfg ln_trcdta .false.
551    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
552    # if not you need input files, and for tests is not necessary
553    set_namelist namelist_pisces_cfg ln_presatm .false.
554    set_namelist namelist_pisces_cfg ln_varpar .false.
555    set_namelist namelist_pisces_cfg ln_dust .false.
556    set_namelist namelist_pisces_cfg ln_solub .false.
557    set_namelist namelist_pisces_cfg ln_river .false.
558    set_namelist namelist_pisces_cfg ln_ndepo .false.
559    set_namelist namelist_pisces_cfg ln_ironsed .false.
560    set_namelist namelist_pisces_cfg ln_ironice .false.
561    set_namelist namelist_pisces_cfg ln_hydrofe .false.
562    # put ln_pisdmp to false : no restoring to global mean value
563    set_namelist namelist_pisces_cfg ln_pisdmp .false.
564    if [ ${USING_MPMD} == "yes" ] ; then
565       set_xio_using_server iodef.xml true
566    else
567       set_xio_using_server iodef.xml false
568    fi
569    cd ${SETTE_DIR}
570    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
571    cd ${SETTE_DIR}
572    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
573
574    cd ${SETTE_DIR}
575    export TEST_NAME="REPRO_8_4"
576    . ./prepare_exe_dir.sh
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_84\"
582    set_namelist namelist_cfg nn_it000 1
583    set_namelist namelist_cfg nn_itend 380
584    set_namelist namelist_cfg jpni 8
585    set_namelist namelist_cfg jpnj 4
586    set_namelist namelist_cfg jpnij 32
587    set_namelist namelist_top_cfg ln_trcdta .false.
588    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
589    # if not you need input files, and for tests is not necessary
590    set_namelist namelist_pisces_cfg ln_presatm .false.
591    set_namelist namelist_pisces_cfg ln_varpar .false.
592    set_namelist namelist_pisces_cfg ln_dust .false.
593    set_namelist namelist_pisces_cfg ln_solub .false.
594    set_namelist namelist_pisces_cfg ln_river .false.
595    set_namelist namelist_pisces_cfg ln_ndepo .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}
608    cd ${SETTE_DIR}
609    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
610fi
611
612# -----
613# AMM12
614# -----
615if [ ${config} -eq 4 ] ;  then
616    ## Restartability tests for AMM12
617    export TEST_NAME="LONG"
618    cd ${MAIN_DIR}
619    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS}
620    cd ${SETTE_DIR}
621    . ./param.cfg
622    . ./all_functions.sh
623    . ./prepare_exe_dir.sh
624    JOB_FILE=${EXE_DIR}/run_job.sh
625    NPROC=32
626    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
627    cd ${EXE_DIR}
628    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
629    set_namelist namelist_cfg nn_it000 1
630    set_namelist namelist_cfg nn_itend 576
631    set_namelist namelist_cfg nn_stock 288
632    set_namelist namelist_cfg jpni 4
633    set_namelist namelist_cfg jpnj 8
634    set_namelist namelist_cfg jpnij 32
635    if [ ${USING_MPMD} == "yes" ] ; then
636       set_xio_using_server iodef.xml true
637    else
638       set_xio_using_server iodef.xml false
639    fi
640    cd ${SETTE_DIR}
641    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
642
643    cd ${SETTE_DIR}
644    export TEST_NAME="SHORT"
645    . ./prepare_exe_dir.sh
646    cd ${EXE_DIR}
647    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
648    set_namelist namelist_cfg nn_it000 289
649    set_namelist namelist_cfg nn_itend 576
650    set_namelist namelist_cfg jpni 4
651    set_namelist namelist_cfg jpnj 8
652    set_namelist namelist_cfg jpnij 32
653    set_namelist namelist_cfg ln_rstart .true.
654    set_namelist namelist_cfg nn_rstctl 2
655    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
656    set_namelist namelist_cfg nn_date0 20120102
657    for (( i=1; i<=$NPROC; i++)) ; do
658        L_NPROC=$(( $i - 1 ))
659        L_NPROC=`printf "%04d\n" ${L_NPROC}`
660        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
661    done
662    if [ ${USING_MPMD} == "yes" ] ; then
663       set_xio_using_server iodef.xml true
664    else
665       set_xio_using_server iodef.xml false
666    fi
667    cd ${SETTE_DIR}
668    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
669    cd ${SETTE_DIR}
670    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
671
672## Reproducibility tests for AMM12
673    export TEST_NAME="REPRO_8_4"
674    cd ${MAIN_DIR}
675    cd ${SETTE_DIR}
676    . ./param.cfg
677    . ./all_functions.sh
678    . ./prepare_exe_dir.sh
679    JOB_FILE=${EXE_DIR}/run_job.sh
680    NPROC=32
681    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
682    cd ${EXE_DIR}
683    set_namelist namelist_cfg cn_exp \"AMM12_84\"
684    set_namelist namelist_cfg nn_it000 1
685    set_namelist namelist_cfg nn_itend 576
686    set_namelist namelist_cfg jpni 8
687    set_namelist namelist_cfg jpnj 4
688    set_namelist namelist_cfg jpnij 32
689    if [ ${USING_MPMD} == "yes" ] ; then
690       set_xio_using_server iodef.xml true
691    else
692       set_xio_using_server iodef.xml false
693    fi
694    cd ${SETTE_DIR}
695    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
696    cd ${SETTE_DIR}
697    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
698
699    cd ${SETTE_DIR}
700    export TEST_NAME="REPRO_4_8"
701    . ./prepare_exe_dir.sh
702    JOB_FILE=${EXE_DIR}/run_job.sh
703    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
704    cd ${EXE_DIR}
705    set_namelist namelist_cfg cn_exp \"AMM12_48\"
706    set_namelist namelist_cfg nn_it000 1
707    set_namelist namelist_cfg nn_itend 576
708    set_namelist namelist_cfg jpni 4
709    set_namelist namelist_cfg jpnj 8
710    set_namelist namelist_cfg jpnij 32
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_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
718    cd ${SETTE_DIR}
719    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
720fi
721
722
723# ---------
724# ORCA2_SAS
725# ---------
726if [ ${config} -eq 5 ] ;  then
727## Restartability tests
728    export TEST_NAME="LONG"
729    cd ${MAIN_DIR}
730    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_SI3_ST -r ORCA2_SAS_SI3 -j 8 del_key ${DEL_KEYS}
731    cd ${SETTE_DIR}
732    . ./param.cfg
733    . ./all_functions.sh
734    . ./prepare_exe_dir.sh
735    JOB_FILE=${EXE_DIR}/run_job.sh
736    NPROC=32
737    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
738    cd ${EXE_DIR}
739    set_namelist namelist_cfg cn_exp \"SAS\"
740    set_namelist namelist_cfg nn_it000 1
741    set_namelist namelist_cfg nn_itend 240
742    set_namelist namelist_cfg nn_stock 120
743    set_namelist namelist_cfg jpni 4
744    set_namelist namelist_cfg jpnj 8
745    set_namelist namelist_cfg jpnij 32
746    set_namelist namelist_ice_cfg ln_icediachk .true.
747    if [ ${USING_MPMD} == "yes" ] ; then
748       set_xio_using_server iodef.xml true
749    else
750       set_xio_using_server iodef.xml false
751    fi
752    cd ${SETTE_DIR}
753    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
754
755    cd ${SETTE_DIR}
756    export TEST_NAME="SHORT"
757    . ./prepare_exe_dir.sh
758    cd ${EXE_DIR}
759    set_namelist namelist_cfg cn_exp \"SAS\"
760    set_namelist namelist_cfg nn_it000 121
761    set_namelist namelist_cfg nn_itend 240
762    set_namelist namelist_cfg jpni 4
763    set_namelist namelist_cfg jpnj 8
764    set_namelist namelist_cfg jpnij 32
765    set_namelist namelist_cfg ln_rstart .true.
766    set_namelist namelist_cfg nn_rstctl 2
767    set_namelist namelist_cfg nn_date0 010109
768    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\"
769    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\"
770    if [ ${USING_MPMD} == "yes" ] ; then
771       set_xio_using_server iodef.xml true
772    else
773       set_xio_using_server iodef.xml false
774    fi
775    for (( i=1; i<=$NPROC; i++)) ; do
776        L_NPROC=$(( $i - 1 ))
777        L_NPROC=`printf "%04d\n" ${L_NPROC}`
778        ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc .
779        ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc .
780    done
781    cd ${SETTE_DIR}
782    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
783    cd ${SETTE_DIR}
784    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
785
786## Reproducibility tests
787    export TEST_NAME="REPRO_4_8"
788    cd ${MAIN_DIR}
789    cd ${SETTE_DIR}
790    . ./param.cfg
791    . ./all_functions.sh
792    . ./prepare_exe_dir.sh
793    JOB_FILE=${EXE_DIR}/run_job.sh
794    NPROC=32
795    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
796    cd ${EXE_DIR}
797    set_namelist namelist_cfg cn_exp \"SAS_48\"
798    set_namelist namelist_cfg nn_it000 1
799    set_namelist namelist_cfg nn_itend 75
800    set_namelist namelist_cfg jpni 4
801    set_namelist namelist_cfg jpnj 8
802    set_namelist namelist_cfg jpnij 32
803    if [ ${USING_MPMD} == "yes" ] ; then
804       set_xio_using_server iodef.xml true
805    else
806       set_xio_using_server iodef.xml false
807    fi
808    cd ${SETTE_DIR}
809    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
810    cd ${SETTE_DIR}
811    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
812
813    cd ${SETTE_DIR}
814    export TEST_NAME="REPRO_8_4"
815    . ./prepare_exe_dir.sh
816    JOB_FILE=${EXE_DIR}/run_job.sh
817    NPROC=32
818    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
819    cd ${EXE_DIR}
820    set_namelist namelist_cfg cn_exp \"SAS_84\"
821    set_namelist namelist_cfg nn_it000 1
822    set_namelist namelist_cfg nn_itend 75
823    set_namelist namelist_cfg jpni 8
824    set_namelist namelist_cfg jpnj 4
825    set_namelist namelist_cfg jpnij 32
826    if [ ${USING_MPMD} == "yes" ] ; then
827       set_xio_using_server iodef.xml true
828    else
829       set_xio_using_server iodef.xml false
830    fi
831    cd ${SETTE_DIR}
832    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
833    cd ${SETTE_DIR}
834    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
835
836fi
837
838
839# --------------
840# ORCA2_SI3_OBS
841# --------------
842## Test assimilation interface code, OBS and ASM for reproducibility
843## Restartability not tested (ASM code not restartable while increments are being applied)
844if [ ${config} -eq 6 ] ; then
845## Reproducibility tests
846    export TEST_NAME="REPRO_4_8"
847    cd ${MAIN_DIR}
848    . ./makenemo -m ${CMP_NAM} -n ORCA2_SI3_OBS_ST -r ORCA2_SI3_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc" del_key "key_top"
849    cd ${SETTE_DIR}
850    . ./param.cfg
851    . ./all_functions.sh
852    . ./prepare_exe_dir.sh
853    JOB_FILE=${EXE_DIR}/run_job.sh
854    NPROC=32
855    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
856    cd ${EXE_DIR}
857    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
858    set_namelist namelist_cfg nn_it000 1
859    set_namelist namelist_cfg nn_itend 75
860    set_namelist namelist_cfg ln_read_cfg .true.
861    set_namelist namelist_cfg jpni 4
862    set_namelist namelist_cfg jpnj 8
863    set_namelist namelist_cfg jpnij 32
864    set_namelist namelist_cfg ln_diaobs .true.
865    set_namelist namelist_cfg ln_t3d .true.
866    set_namelist namelist_cfg ln_s3d .true.
867    set_namelist namelist_cfg ln_sst .true.
868    set_namelist namelist_cfg ln_sla .true.
869    set_namelist namelist_cfg ln_sic .true.
870    set_namelist namelist_cfg ln_vel3d .true.
871    set_namelist namelist_cfg ln_bkgwri .true.
872    set_namelist namelist_cfg ln_trainc .true.
873    set_namelist namelist_cfg ln_dyninc .true.
874    set_namelist namelist_cfg ln_sshinc .true.
875    set_namelist namelist_cfg ln_asmiau .true.
876    #remove all useless options for pisces (due to ORCA2_SI3_PISCES reference configuration)
877    set_namelist namelist_top_cfg ln_trcdta .false.
878    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
879    # if not you need input files, and for tests is not necessary
880    set_namelist namelist_pisces_cfg ln_presatm .false.
881    set_namelist namelist_pisces_cfg ln_varpar .false.
882    set_namelist namelist_pisces_cfg ln_dust .false.
883    set_namelist namelist_pisces_cfg ln_solub .false.
884    set_namelist namelist_pisces_cfg ln_river .false.
885    set_namelist namelist_pisces_cfg ln_ndepo .false.
886    set_namelist namelist_pisces_cfg ln_ironsed .false.
887    set_namelist namelist_pisces_cfg ln_ironice .false.
888    set_namelist namelist_pisces_cfg ln_hydrofe .false.
889    if [ ${USING_MPMD} == "yes" ] ; then
890       set_xio_using_server iodef.xml true
891    else
892       set_xio_using_server iodef.xml false
893    fi
894    cd ${SETTE_DIR}
895    . ./prepare_job.sh input_ORCA2_SI3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
896    cd ${SETTE_DIR}
897    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
898
899   cd ${SETTE_DIR}
900    export TEST_NAME="REPRO_8_4"
901    . ./prepare_exe_dir.sh
902    JOB_FILE=${EXE_DIR}/run_job.sh
903    NPROC=32
904    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
905    cd ${EXE_DIR}
906    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
907    set_namelist namelist_cfg nn_it000 1
908    set_namelist namelist_cfg nn_itend 75
909    set_namelist namelist_cfg ln_read_cfg .true.
910    set_namelist namelist_cfg jpni 8
911    set_namelist namelist_cfg jpnj 4
912    set_namelist namelist_cfg jpnij 32
913    set_namelist namelist_cfg ln_diaobs .true.
914    set_namelist namelist_cfg ln_t3d .true.
915    set_namelist namelist_cfg ln_s3d .true.
916    set_namelist namelist_cfg ln_sst .true.
917    set_namelist namelist_cfg ln_sla .true.
918    set_namelist namelist_cfg ln_sic .true.
919    set_namelist namelist_cfg ln_vel3d .true.
920    set_namelist namelist_cfg ln_bkgwri .true.
921    set_namelist namelist_cfg ln_trainc .true.
922    set_namelist namelist_cfg ln_dyninc .true.
923    set_namelist namelist_cfg ln_sshinc .true.
924    set_namelist namelist_cfg ln_asmiau .true.
925    #remove all useless options for pisces (due to ORCA2_SI3_PISCES reference configuration)
926    set_namelist namelist_top_cfg ln_trcdta .false.
927    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
928    # if not you need input files, and for tests is not necessary
929    set_namelist namelist_pisces_cfg ln_presatm .false.
930    set_namelist namelist_pisces_cfg ln_varpar .false.
931    set_namelist namelist_pisces_cfg ln_dust .false.
932    set_namelist namelist_pisces_cfg ln_solub .false.
933    set_namelist namelist_pisces_cfg ln_river .false.
934    set_namelist namelist_pisces_cfg ln_ndepo .false.
935    set_namelist namelist_pisces_cfg ln_ironsed .false.
936    set_namelist namelist_pisces_cfg ln_ironice .false.
937    set_namelist namelist_pisces_cfg ln_hydrofe .false.
938    if [ ${USING_MPMD} == "yes" ] ; then
939       set_xio_using_server iodef.xml true
940    else
941       set_xio_using_server iodef.xml false
942    fi
943    cd ${SETTE_DIR}
944    . ./prepare_job.sh input_ORCA2_SI3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
945    cd ${SETTE_DIR}
946    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
947fi
948
949# ------------
950# AGRIF NORDIC
951# -----------
952if [ ${config} -eq 7 ] ;  then
953## Restartability tests
954    export TEST_NAME="LONG"
955    cd ${MAIN_DIR}
956    . ./makenemo -m ${CMP_NAM} -n AGRIF_NORDIC_ST -r AGRIF_NORDIC -j 8 del_key "key_top"
957    cd ${SETTE_DIR}
958    . ./param.cfg
959    . ./all_functions.sh
960    . ./prepare_exe_dir.sh
961    JOB_FILE=${EXE_DIR}/run_job.sh
962    NPROC=32
963    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
964    cd ${EXE_DIR}
965    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
966    set_namelist namelist_cfg nn_it000 1
967    set_namelist namelist_cfg nn_itend 20
968    set_namelist namelist_cfg nn_stock 10
969    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
970    set_namelist 1_namelist_cfg nn_it000 1
971    set_namelist 1_namelist_cfg nn_itend 80
972    set_namelist 1_namelist_cfg nn_stock 40
973    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
974    set_namelist 2_namelist_cfg nn_it000 1
975    set_namelist 2_namelist_cfg nn_itend 240
976    set_namelist 2_namelist_cfg nn_stock 120
977
978    if [ ${USING_MPMD} == "yes" ] ; then
979       set_xio_using_server iodef.xml true
980    else
981       set_xio_using_server iodef.xml false
982    fi
983    cd ${SETTE_DIR}
984    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
985   
986    cd ${SETTE_DIR}
987    export TEST_NAME="SHORT"
988    . ./prepare_exe_dir.sh
989    cd ${EXE_DIR}
990    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
991    set_namelist namelist_cfg nn_it000 11
992    set_namelist namelist_cfg nn_itend 20
993    set_namelist namelist_cfg nn_stock 10
994    set_namelist namelist_cfg ln_rstart .true.
995    set_namelist namelist_cfg nn_rstctl 2
996    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
997    set_namelist 1_namelist_cfg nn_it000 41
998    set_namelist 1_namelist_cfg nn_itend 80
999    set_namelist 1_namelist_cfg nn_stock 40
1000    set_namelist 1_namelist_cfg ln_rstart .true.
1001    set_namelist 1_namelist_cfg nn_rstctl 2
1002    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1003    set_namelist 2_namelist_cfg nn_it000 121
1004    set_namelist 2_namelist_cfg nn_itend 240
1005    set_namelist 2_namelist_cfg nn_stock 120
1006    set_namelist 2_namelist_cfg ln_rstart .true.
1007    set_namelist 2_namelist_cfg nn_rstctl 2
1008    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1009    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1010    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1011    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1012    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1013    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1014
1015    for (( i=1; i<=$NPROC; i++)) ; do
1016        L_NPROC=$(( $i - 1 ))
1017        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1018        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1019        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1020        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1021        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1022        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1023        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1024    done
1025    if [ ${USING_MPMD} == "yes" ] ; then
1026       set_xio_using_server iodef.xml true
1027    else
1028       set_xio_using_server iodef.xml false
1029    fi
1030    cd ${SETTE_DIR}
1031    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1032    cd ${SETTE_DIR}
1033    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1034
1035## Reproducibility tests
1036    export TEST_NAME="REPRO_4_8"
1037    cd ${MAIN_DIR}
1038    cd ${SETTE_DIR}
1039    . ./param.cfg
1040    . ./all_functions.sh
1041    . ./prepare_exe_dir.sh
1042    JOB_FILE=${EXE_DIR}/run_job.sh
1043    NPROC=32
1044    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1045    cd ${EXE_DIR}
1046    set_namelist namelist_cfg cn_exp \"AGRIF_48\"
1047    set_namelist namelist_cfg nn_it000 1
1048    set_namelist namelist_cfg nn_itend 20
1049    set_namelist namelist_cfg jpni 4
1050    set_namelist namelist_cfg jpnj 8
1051    set_namelist namelist_cfg jpnij 32
1052    set_namelist 1_namelist_cfg nn_it000 1
1053    set_namelist 1_namelist_cfg nn_itend 80
1054    set_namelist 1_namelist_cfg jpni 4
1055    set_namelist 1_namelist_cfg jpnj 8
1056    set_namelist 1_namelist_cfg jpnij 32
1057    set_namelist 2_namelist_cfg nn_it000 1
1058    set_namelist 2_namelist_cfg nn_itend 240
1059    set_namelist 2_namelist_cfg jpni 4
1060    set_namelist 2_namelist_cfg jpnj 8
1061    set_namelist 2_namelist_cfg jpnij 32
1062
1063    if [ ${USING_MPMD} == "yes" ] ; then
1064       set_xio_using_server iodef.xml true
1065    else
1066       set_xio_using_server iodef.xml false
1067    fi
1068    cd ${SETTE_DIR}
1069    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1070    cd ${SETTE_DIR}
1071    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1072
1073    cd ${SETTE_DIR}
1074    export TEST_NAME="REPRO_8_4"
1075    . ./prepare_exe_dir.sh
1076    JOB_FILE=${EXE_DIR}/run_job.sh
1077    NPROC=32
1078    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1079    cd ${EXE_DIR}
1080    set_namelist namelist_cfg cn_exp \"AGRIF_84\"
1081    set_namelist namelist_cfg nn_it000 1
1082    set_namelist namelist_cfg nn_itend 20
1083    set_namelist namelist_cfg jpni 8
1084    set_namelist namelist_cfg jpnj 4
1085    set_namelist namelist_cfg jpnij 32
1086    set_namelist 1_namelist_cfg nn_it000 1
1087    set_namelist 1_namelist_cfg nn_itend 80
1088    set_namelist 1_namelist_cfg jpni 8
1089    set_namelist 1_namelist_cfg jpnj 4
1090    set_namelist 1_namelist_cfg jpnij 32
1091    set_namelist 2_namelist_cfg nn_it000 1
1092    set_namelist 2_namelist_cfg nn_itend 240
1093    set_namelist 2_namelist_cfg jpni 8
1094    set_namelist 2_namelist_cfg jpnj 4
1095    set_namelist 2_namelist_cfg jpnij 32
1096
1097    if [ ${USING_MPMD} == "yes" ] ; then
1098       set_xio_using_server iodef.xml true
1099    else
1100       set_xio_using_server iodef.xml false
1101    fi
1102    cd ${SETTE_DIR}
1103    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1104    cd ${SETTE_DIR}
1105    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1106
1107## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
1108    export TEST_NAME="ORCA2"
1109    cd ${MAIN_DIR}
1110    cd ${SETTE_DIR}
1111    . ./param.cfg
1112    . ./all_functions.sh
1113    . ./prepare_exe_dir.sh
1114    JOB_FILE=${EXE_DIR}/run_job.sh
1115    NPROC=32
1116    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1117    cd ${EXE_DIR}
1118    set_namelist namelist_cfg cn_exp \"ORCA2\"
1119    set_namelist namelist_cfg nn_it000 1
1120    set_namelist namelist_cfg nn_itend 150
1121
1122#   Set the number of fine grids to zero:   
1123    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1124
1125    if [ ${USING_MPMD} == "yes" ] ; then
1126       set_xio_using_server iodef.xml true
1127    else
1128       set_xio_using_server iodef.xml false
1129    fi
1130    cd ${SETTE_DIR}
1131    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1132    cd ${SETTE_DIR}
1133    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1134
1135fi
1136
1137
1138## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_NORDIC_ST/ORCA2)
1139if [ ${config} -eq 8 ] ;  then
1140    export TEST_NAME="ORCA2"
1141    cd ${MAIN_DIR}
1142    . ./makenemo -m ${CMP_NAM} -n AGRIF_NORDIC_NOAGRIF_ST -r AGRIF_NORDIC -j 8 del_key "key_top key_agrif"
1143    cd ${SETTE_DIR}
1144    . ./param.cfg
1145    . ./all_functions.sh
1146    . ./prepare_exe_dir.sh
1147    JOB_FILE=${EXE_DIR}/run_job.sh
1148    NPROC=32
1149    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1150    cd ${EXE_DIR}
1151    set_namelist namelist_cfg cn_exp \"ORCA2\"
1152    set_namelist namelist_cfg nn_it000 1
1153    set_namelist namelist_cfg nn_itend 150
1154#
1155    if [ ${USING_MPMD} == "yes" ] ; then
1156       set_xio_using_server iodef.xml true
1157    else
1158       set_xio_using_server iodef.xml false
1159    fi
1160    cd ${SETTE_DIR}
1161    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1162    cd ${SETTE_DIR}
1163    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1164
1165fi
1166
1167
1168# -------
1169# SPITZ12
1170# -------
1171if [ ${config} -eq 9 ] ;  then
1172## Restartability tests
1173    export TEST_NAME="LONG"
1174    cd ${MAIN_DIR}
1175    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 del_key ${DEL_KEYS}
1176    cd ${SETTE_DIR}
1177    . ./param.cfg
1178    . ./all_functions.sh
1179    . ./prepare_exe_dir.sh
1180    JOB_FILE=${EXE_DIR}/run_job.sh
1181    NPROC=32
1182    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1183    cd ${EXE_DIR}
1184    set_namelist namelist_cfg cn_exp \"S12_LONG\"
1185    set_namelist namelist_cfg nn_it000 1
1186    set_namelist namelist_cfg nn_itend 100
1187    set_namelist namelist_cfg nn_stock 50
1188    set_namelist namelist_cfg jpni 4
1189    set_namelist namelist_cfg jpnj 8
1190    set_namelist namelist_cfg jpnij 32
1191    set_namelist namelist_ice_cfg ln_icediachk .true.
1192    if [ ${USING_MPMD} == "yes" ] ; then
1193       set_xio_using_server iodef.xml true
1194    else
1195       set_xio_using_server iodef.xml false
1196    fi
1197    cd ${SETTE_DIR}
1198    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1199   
1200    cd ${SETTE_DIR}
1201    export TEST_NAME="SHORT"
1202    . ./prepare_exe_dir.sh
1203    cd ${EXE_DIR}
1204    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
1205    set_namelist namelist_cfg nn_it000 51
1206    set_namelist namelist_cfg nn_itend 100
1207    set_namelist namelist_cfg nn_stock 50
1208    set_namelist namelist_cfg ln_rstart .true.
1209    set_namelist namelist_cfg nn_rstctl 2
1210    set_namelist namelist_cfg jpni 4
1211    set_namelist namelist_cfg jpnj 8
1212    set_namelist namelist_cfg jpnij 32
1213    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000050_restart\"
1214    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000050_restart_ice\"
1215    for (( i=1; i<=$NPROC; i++)) ; do
1216        L_NPROC=$(( $i - 1 ))
1217        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1218        ln -sf ../LONG/S12_LONG_00000050_restart_${L_NPROC}.nc .
1219        ln -sf ../LONG/S12_LONG_00000050_restart_ice_${L_NPROC}.nc .
1220    done
1221    if [ ${USING_MPMD} == "yes" ] ; then
1222       set_xio_using_server iodef.xml true
1223    else
1224       set_xio_using_server iodef.xml false
1225    fi
1226    cd ${SETTE_DIR}
1227    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1228    cd ${SETTE_DIR}
1229    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1230
1231## Reproducibility tests
1232    export TEST_NAME="REPRO_4_8"
1233    cd ${MAIN_DIR}
1234    cd ${SETTE_DIR}
1235    . ./param.cfg
1236    . ./all_functions.sh
1237    . ./prepare_exe_dir.sh
1238    JOB_FILE=${EXE_DIR}/run_job.sh
1239    NPROC=32
1240    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1241    cd ${EXE_DIR}
1242    set_namelist namelist_cfg cn_exp \"S12_48\"
1243    set_namelist namelist_cfg nn_it000 1
1244    set_namelist namelist_cfg nn_itend 100
1245    set_namelist namelist_cfg jpni 4
1246    set_namelist namelist_cfg jpnj 8
1247    set_namelist namelist_cfg jpnij 32
1248    if [ ${USING_MPMD} == "yes" ] ; then
1249       set_xio_using_server iodef.xml true
1250    else
1251       set_xio_using_server iodef.xml false
1252    fi
1253    cd ${SETTE_DIR}
1254    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1255    cd ${SETTE_DIR}
1256    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1257
1258    cd ${SETTE_DIR}
1259    export TEST_NAME="REPRO_8_4"
1260    . ./prepare_exe_dir.sh
1261    JOB_FILE=${EXE_DIR}/run_job.sh
1262    NPROC=32
1263    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1264    cd ${EXE_DIR}
1265    set_namelist namelist_cfg cn_exp \"S12_84\"
1266    set_namelist namelist_cfg nn_it000 1
1267    set_namelist namelist_cfg nn_itend 100
1268    set_namelist namelist_cfg jpni 8
1269    set_namelist namelist_cfg jpnj 4
1270    set_namelist namelist_cfg jpnij 32
1271    if [ ${USING_MPMD} == "yes" ] ; then
1272       set_xio_using_server iodef.xml true
1273    else
1274       set_xio_using_server iodef.xml false
1275    fi
1276    cd ${SETTE_DIR}
1277    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1278    cd ${SETTE_DIR}
1279    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1280fi
1281
1282
1283done
Note: See TracBrowser for help on using the repository browser.