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

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

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

Last change on this file since 9602 was 9602, checked in by nicolasmartin, 6 years ago

Changes to comply with the new structure of the trunk

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