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 trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette.sh @ 5478

Last change on this file since 5478 was 5478, checked in by timgraham, 9 years ago

Fix for tickey #1548

  • Property svn:executable set to *
File size: 47.2 KB
Line 
1#!/bin/bash
2############################################################
3# Author : Simona Flavoni for NEMO
4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
14#set -x
15set -o posix
16#set -u
17#set -e
18# ===========
19# DESCRIPTION
20# ===========
21#
22# Variables to be checked by user:
23#
24# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory
25# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
26# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs 
27# INTERACT_FLAG     : flag to run in interactive mode "yes"
28#                           to run in batch mode "no"
29# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
30#                           to run in sequential mode (NB_PROC = 1) "no"
31# USING_XIOS        : flag to control the activation of key_iomput
32#                      "yes" to compile using key_iomput and link to the external XIOS library
33#                      "no"  to compile without key_iomput and link to the old IOIPSL library
34# USING_MPMD        : flag to control the use of stand-alone IO servers
35#                     requires USING_XIOS="yes"
36#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
37#                      "no"  to run in SPMD (attached) mode without separate IO servers
38# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
39#                     set to zero if USING_MPMD="no"
40#
41# Principal script is sette.sh, that calls
42#
43#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
44#              and links to opa in ${CONFIG_NAME}/EXP00)
45#
46#  param.cfg : sets and loads following directories:
47#
48#   FORCING_DIR         : is the directory for forcing files (tarfile)
49#   INPUT_DIR           : is the directory for input files storing
50#   TMPDIR              : is the temporary directory (if needed)
51#   NEMO_VALIDATION_DIR : is the validation directory
52#
53#   (NOTE: this file is the same for all configrations to be tested with sette)
54#
55#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
56#   set_namelist     : function declared in all_functions that sets namelist parameters
57#   post_test_tidyup : creates validation storage directory and copies required output files
58#                      (solver.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
91export BATCH_COMMAND_PAR="llsubmit"
92export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
93export INTERACT_FLAG="no"
94export MPIRUN_FLAG="yes"
95export USING_XIOS="yes"
96#
97export DEL_KEYS="key_iomput"
98if [ ${USING_XIOS} == "yes" ] 
99 then
100   export DEL_KEYS=""
101fi
102#
103# Settings which control the use of stand alone servers (only relevant if using xios)
104#
105export USING_MPMD="no"
106export NUM_XIOSERVERS=4
107export JOB_PREFIX=batch-mpmd
108#
109if [ ${USING_MPMD} == "no" ] 
110 then
111   export NUM_XIOSERVERS=0
112   export JOB_PREFIX=batch
113fi
114#
115#
116if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
117 then
118   echo "Incompatible choices. MPMD mode requires the XIOS server"
119   exit
120fi
121#
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=${SETTE_DIR%/SETTE}
126CONFIG_DIR=${MAIN_DIR}/CONFIG
127TOOLS_DIR=${MAIN_DIR}/TOOLS
128COMPIL_DIR=${TOOLS_DIR}/COMPILE
129
130CMP_NAM=${1:-$COMPILER}
131# Copy job_batch_COMPILER file for specific compiler into job_batch_template
132cd ${SETTE_DIR}
133cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
134# Description of configuration tested:
135# GYRE            : 1 &  2
136# ORCA2_LIM_PISCES: 3 &  4
137# ORCA2_OFF_PISCES: 5 &  6
138# ORCA2_LIM3      : 7 &  8
139# AMM12           : 9 & 10
140# SAS             :11 & 12
141# ISOMIP          :13 & 14
142# ORCA2_LIM_OBS:   15
143# ORCA2_AGRIF_LIM :16
144for config in  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
145
146do
147
148# TESTS FOR GYRE CONFIGURATION
149if [ ${config} -eq 1 ] ;  then
150    ## Restartability tests for GYRE
151    export TEST_NAME="LONG"
152    cd ${CONFIG_DIR}
153    . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 del_key ${DEL_KEYS}
154    cd ${SETTE_DIR}
155    . ./param.cfg
156    . ./all_functions.sh
157    . ./prepare_exe_dir.sh
158    JOB_FILE=${EXE_DIR}/run_job.sh
159    NPROC=4
160    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
161    cd ${EXE_DIR} 
162    set_namelist namelist_cfg cn_exp \"GYRE_LONG\"
163    set_namelist namelist_cfg nn_it000 1
164    set_namelist namelist_cfg nn_itend 120
165    set_namelist namelist_cfg nn_stock 60
166    set_namelist namelist_cfg ln_clobber .true.
167    set_namelist namelist_cfg nn_fwb 0
168    set_namelist namelist_cfg nn_solv 2
169    set_namelist namelist_cfg jpni 2
170    set_namelist namelist_cfg jpnj 2
171    set_namelist namelist_cfg jpnij 4
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 \"GYRE_SHORT\"
185    set_namelist namelist_cfg nn_it000 61
186    set_namelist namelist_cfg nn_itend 120
187    set_namelist namelist_cfg nn_stock 60
188    set_namelist namelist_cfg ln_rstart .true.
189    set_namelist namelist_cfg nn_rstctl 2
190    set_namelist namelist_cfg ln_clobber .true.
191    set_namelist namelist_cfg nn_fwb 0
192    set_namelist namelist_cfg nn_solv 2
193    set_namelist namelist_cfg jpni 2
194    set_namelist namelist_cfg jpnj 2
195    set_namelist namelist_cfg jpnij 4
196    set_namelist namelist_cfg cn_ocerst_in \"GYRE_LONG_00000060_restart\"
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/GYRE_LONG_00000060_restart_${L_NPROC}.nc .
206    done
207    if [ ${USING_MPMD} == "yes" ] ; then
208       set_xio_using_server iodef.xml true
209    else
210       set_xio_using_server iodef.xml false
211    fi
212    cd ${SETTE_DIR}
213    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
214    cd ${SETTE_DIR}
215    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
216fi
217
218if [ ${config} -eq 2 ] ;  then
219    ## Reproducibility tests for GYRE
220    export TEST_NAME="REPRO_1_4"
221    cd ${CONFIG_DIR}
222    . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
223    cd ${SETTE_DIR}
224    . ./param.cfg
225    . ./all_functions.sh
226    . ./prepare_exe_dir.sh
227    JOB_FILE=${EXE_DIR}/run_job.sh
228    NPROC=4
229    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
230    cd ${EXE_DIR}
231    set_namelist namelist_cfg cn_exp \"GYRE_14\"
232    set_namelist namelist_cfg nn_it000 1
233    set_namelist namelist_cfg nn_itend 60
234    set_namelist namelist_cfg nn_fwb 0
235    set_namelist namelist_cfg nn_bench 0
236    set_namelist namelist_cfg ln_ctl .false.
237    set_namelist namelist_cfg ln_clobber .true.
238    set_namelist namelist_cfg nn_solv 2
239    set_namelist namelist_cfg jpni 1
240    set_namelist namelist_cfg jpnj 4
241    set_namelist namelist_cfg jpnij 4
242    if [ ${USING_MPMD} == "yes" ] ; then
243       set_xio_using_server iodef.xml true
244    else
245       set_xio_using_server iodef.xml false
246    fi
247    cd ${SETTE_DIR}
248    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
249    cd ${SETTE_DIR}
250    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
251
252    cd ${SETTE_DIR}
253    export TEST_NAME="REPRO_2_2"
254    . ./prepare_exe_dir.sh
255    JOB_FILE=${EXE_DIR}/run_job.sh
256    NPROC=4
257    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
258    cd ${EXE_DIR}
259    set_namelist namelist_cfg cn_exp \"GYRE_22\"
260    set_namelist namelist_cfg nn_it000 1
261    set_namelist namelist_cfg nn_itend 60
262    set_namelist namelist_cfg nn_fwb 0
263    set_namelist namelist_cfg ln_ctl .false.
264    set_namelist namelist_cfg ln_clobber .true.
265    set_namelist namelist_cfg nn_solv 2
266    set_namelist namelist_cfg jpni 2
267    set_namelist namelist_cfg jpnj 2
268    set_namelist namelist_cfg jpnij 4
269    if [ ${USING_MPMD} == "yes" ] ; then
270       set_xio_using_server iodef.xml true
271    else
272       set_xio_using_server iodef.xml false
273    fi
274    cd ${SETTE_DIR}
275    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
276    cd ${SETTE_DIR}
277    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
278
279fi
280
281# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
282if [ ${config} -eq 3 ] ;  then
283    ## Restartability tests for ORCA2_LIM_PISCES
284    export TEST_NAME="LONG"
285    cd ${CONFIG_DIR}
286    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 del_key ${DEL_KEYS}
287    cd ${SETTE_DIR}
288    . ./param.cfg
289    . ./all_functions.sh
290    . ./prepare_exe_dir.sh
291    JOB_FILE=${EXE_DIR}/run_job.sh
292    NPROC=4
293    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
294    cd ${EXE_DIR}
295    set_namelist namelist_cfg cn_exp \"O2LP_LONG\"
296    set_namelist namelist_cfg nn_it000 1
297    set_namelist namelist_cfg nn_itend 150
298    set_namelist namelist_cfg nn_stock 75
299    set_namelist namelist_cfg ln_clobber .true.
300    set_namelist namelist_cfg nn_fwb 0
301    set_namelist namelist_cfg jpni 2
302    set_namelist namelist_cfg jpnj 2
303    set_namelist namelist_cfg jpnij 4
304    set_namelist namelist_cfg nn_solv 2
305    set_namelist namelist_top_cfg ln_trcdta .false.
306    set_namelist namelist_top_cfg ln_diatrc .false.
307    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
308    # if not you need input files, and for tests is not necessary
309    set_namelist namelist_pisces_cfg ln_presatm .false.
310    set_namelist namelist_pisces_cfg ln_varpar .false.
311    set_namelist namelist_pisces_cfg ln_dust .false.
312    set_namelist namelist_pisces_cfg ln_solub .false.
313    set_namelist namelist_pisces_cfg ln_river .false.
314    set_namelist namelist_pisces_cfg ln_ndepo .false.
315    set_namelist namelist_pisces_cfg ln_ironsed .false.
316    set_namelist namelist_pisces_cfg ln_hydrofe .false.
317    if [ ${USING_MPMD} == "yes" ] ; then
318       set_xio_using_server iodef.xml true
319    else
320       set_xio_using_server iodef.xml false
321    fi
322    cd ${SETTE_DIR}
323    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
324   
325    cd ${SETTE_DIR}
326    export TEST_NAME="SHORT"
327    . ./prepare_exe_dir.sh
328    cd ${EXE_DIR}
329    set_namelist namelist_cfg cn_exp \"O2LP_SHORT\"
330    set_namelist namelist_cfg nn_it000 76
331    set_namelist namelist_cfg nn_itend 150
332    set_namelist namelist_cfg nn_stock 75
333    set_namelist namelist_cfg ln_rstart .true.
334    set_namelist namelist_cfg nn_rstctl 2
335    set_namelist namelist_cfg ln_clobber .true.
336    set_namelist namelist_cfg nn_fwb 0
337    set_namelist namelist_cfg jpni 2
338    set_namelist namelist_cfg jpnj 2
339    set_namelist namelist_cfg jpnij 4
340    set_namelist namelist_cfg nn_solv 2
341    set_namelist namelist_top_cfg ln_diatrc .false.
342    set_namelist namelist_top_cfg ln_rsttr .true.
343    set_namelist namelist_top_cfg nn_rsttr 2
344    set_namelist namelist_cfg cn_ocerst_in \"O2LP_LONG_00000075_restart\"
345    set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
346    set_namelist namelist_top_cfg cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
347    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
348    # if not you need input files, and for tests is not necessary
349    set_namelist namelist_pisces_cfg ln_presatm .false.
350    set_namelist namelist_pisces_cfg ln_varpar .false.
351    set_namelist namelist_pisces_cfg ln_dust .false.
352    set_namelist namelist_pisces_cfg ln_solub .false.
353    set_namelist namelist_pisces_cfg ln_river .false.
354    set_namelist namelist_pisces_cfg ln_ndepo .false.
355    set_namelist namelist_pisces_cfg ln_ironsed .false.
356    set_namelist namelist_pisces_cfg ln_hydrofe .false.
357    # put ln_pisdmp to false : no restoring to global mean value
358    set_namelist namelist_pisces_cfg ln_pisdmp .false.
359    for (( i=1; i<=$NPROC; i++)) ; do
360        L_NPROC=$(( $i - 1 ))
361        L_NPROC=`printf "%04d\n" ${L_NPROC}`
362        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
363        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc .
364        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
365    done
366    if [ ${USING_MPMD} == "yes" ] ; then
367       set_xio_using_server iodef.xml true
368    else
369       set_xio_using_server iodef.xml false
370    fi
371    cd ${SETTE_DIR}
372    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
373    cd ${SETTE_DIR}
374    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
375fi
376
377if [ ${config} -eq 4 ] ;  then
378    ## Reproducibility tests for ORCA2_LIM_PISCES
379    export TEST_NAME="REPRO_4_4"
380    cd ${CONFIG_DIR}
381    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
382    cd ${SETTE_DIR}
383    . ./param.cfg
384    . ./all_functions.sh
385    . ./prepare_exe_dir.sh
386    JOB_FILE=${EXE_DIR}/run_job.sh
387    NPROC=16
388    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
389    cd ${EXE_DIR}
390    set_namelist namelist_cfg nn_it000 1
391    set_namelist namelist_cfg nn_itend 75
392    set_namelist namelist_cfg nn_fwb 0
393    set_namelist namelist_cfg ln_ctl .false.
394    set_namelist namelist_cfg ln_clobber .true.
395    set_namelist namelist_cfg jpni 4
396    set_namelist namelist_cfg jpnj 4
397    set_namelist namelist_cfg jpnij 16
398    set_namelist namelist_cfg nn_solv 2
399    set_namelist namelist_top_cfg ln_trcdta .false.
400    set_namelist namelist_top_cfg ln_diatrc .false.
401    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
402    # if not you need input files, and for tests is not necessary
403    set_namelist namelist_pisces_cfg ln_presatm .false.
404    set_namelist namelist_pisces_cfg ln_varpar .false.
405    set_namelist namelist_pisces_cfg ln_dust .false.
406    set_namelist namelist_pisces_cfg ln_solub .false.
407    set_namelist namelist_pisces_cfg ln_river .false.
408    set_namelist namelist_pisces_cfg ln_ndepo .false.
409    set_namelist namelist_pisces_cfg ln_ironsed .false.
410    set_namelist namelist_pisces_cfg ln_hydrofe .false.
411    # put ln_pisdmp to false : no restoring to global mean value
412    set_namelist namelist_pisces_cfg ln_pisdmp .false.
413    if [ ${USING_MPMD} == "yes" ] ; then
414       set_xio_using_server iodef.xml true
415    else
416       set_xio_using_server iodef.xml false
417    fi
418    cd ${SETTE_DIR}
419    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
420    cd ${SETTE_DIR}
421    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
422
423    cd ${SETTE_DIR}
424    export TEST_NAME="REPRO_2_8"
425    . ./prepare_exe_dir.sh
426    JOB_FILE=${EXE_DIR}/run_job.sh
427    NPROC=16
428    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
429    cd ${EXE_DIR}
430    set_namelist namelist_cfg nn_it000 1
431    set_namelist namelist_cfg nn_itend 75
432    set_namelist namelist_cfg ln_clobber .true.
433    set_namelist namelist_cfg nn_fwb 0
434    set_namelist namelist_cfg jpni 2
435    set_namelist namelist_cfg jpnj 8
436    set_namelist namelist_cfg jpnij 16
437    set_namelist namelist_cfg nn_solv 2
438    set_namelist namelist_top_cfg ln_trcdta .false.
439    set_namelist namelist_top_cfg ln_diatrc .false.
440    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
441    # if not you need input files, and for tests is not necessary
442    set_namelist namelist_pisces_cfg ln_presatm .false.
443    set_namelist namelist_pisces_cfg ln_varpar .false.
444    set_namelist namelist_pisces_cfg ln_dust .false.
445    set_namelist namelist_pisces_cfg ln_solub .false.
446    set_namelist namelist_pisces_cfg ln_river .false.
447    set_namelist namelist_pisces_cfg ln_ndepo .false.
448    set_namelist namelist_pisces_cfg ln_ironsed .false.
449    set_namelist namelist_pisces_cfg ln_hydrofe .false.
450    # put ln_pisdmp to false : no restoring to global mean value
451    set_namelist namelist_pisces_cfg ln_pisdmp .false.
452    if [ ${USING_MPMD} == "yes" ] ; then
453       set_xio_using_server iodef.xml true
454    else
455       set_xio_using_server iodef.xml false
456    fi
457    cd ${SETTE_DIR}
458    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
459    cd ${SETTE_DIR}
460    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
461fi
462
463# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
464if [ ${config} -eq 5 ] ;  then
465    ## Restartability tests for ORCA2_OFF_PISCES
466    export TEST_NAME="LONG"
467    cd ${CONFIG_DIR}
468    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
469    cd ${SETTE_DIR}
470    . ./param.cfg
471    . ./all_functions.sh
472    . ./prepare_exe_dir.sh
473    JOB_FILE=${EXE_DIR}/run_job.sh
474    NPROC=4
475    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
476    cd ${EXE_DIR}
477    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
478    set_namelist namelist_cfg nn_it000 1
479    set_namelist namelist_cfg nn_itend 40
480    set_namelist namelist_cfg nn_stock 20
481    set_namelist namelist_cfg ln_clobber .true.
482    set_namelist namelist_cfg jpni 2
483    set_namelist namelist_cfg jpnj 2
484    set_namelist namelist_cfg jpnij 4
485    set_namelist namelist_top_cfg ln_trcdta .false.
486    set_namelist namelist_top_cfg ln_diatrc .false.
487    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
488    # if not you need input files, and for tests is not necessary
489    set_namelist namelist_pisces_cfg ln_presatm .false.
490    set_namelist namelist_pisces_cfg ln_varpar .false.
491    set_namelist namelist_pisces_cfg ln_dust .false.
492    set_namelist namelist_pisces_cfg ln_solub .false.
493    set_namelist namelist_pisces_cfg ln_river .false.
494    set_namelist namelist_pisces_cfg ln_ndepo .false.
495    set_namelist namelist_pisces_cfg ln_ironsed .false.
496    set_namelist namelist_pisces_cfg ln_hydrofe .false.
497    # put ln_pisdmp to false : no restoring to global mean value
498    set_namelist namelist_pisces_cfg ln_pisdmp .false.
499    if [ ${USING_MPMD} == "yes" ] ; then
500       set_xio_using_server iodef.xml true
501    else
502       set_xio_using_server iodef.xml false
503    fi
504    cd ${SETTE_DIR}
505    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
506   
507    cd ${SETTE_DIR}
508    export TEST_NAME="SHORT"
509    . ./prepare_exe_dir.sh
510    cd ${EXE_DIR}
511    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
512    set_namelist namelist_cfg nn_it000 21
513    set_namelist namelist_cfg nn_itend 40
514    set_namelist namelist_cfg nn_stock 20
515    set_namelist namelist_cfg ln_clobber .true.
516    set_namelist namelist_cfg jpni 2
517    set_namelist namelist_cfg jpnj 2
518    set_namelist namelist_cfg jpnij 4
519    set_namelist namelist_top_cfg ln_diatrc .false.
520    set_namelist namelist_top_cfg ln_rsttr .true.
521    set_namelist namelist_top_cfg nn_rsttr 2
522    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
523    for (( i=1; i<=$NPROC; i++)) ; do
524        L_NPROC=$(( $i - 1 ))
525        L_NPROC=`printf "%04d\n" ${L_NPROC}`
526        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
527    done
528    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
529    # if not you need input files, and for tests is not necessary
530    set_namelist namelist_pisces_cfg ln_presatm .false.
531    set_namelist namelist_pisces_cfg ln_varpar .false.
532    set_namelist namelist_pisces_cfg ln_dust .false.
533    set_namelist namelist_pisces_cfg ln_solub .false.
534    set_namelist namelist_pisces_cfg ln_river .false.
535    set_namelist namelist_pisces_cfg ln_ndepo .false.
536    set_namelist namelist_pisces_cfg ln_ironsed .false.
537    set_namelist namelist_pisces_cfg ln_hydrofe .false.
538    # put ln_pisdmp to false : no restoring to global mean value
539    set_namelist namelist_pisces_cfg ln_pisdmp .false.
540    if [ ${USING_MPMD} == "yes" ] ; then
541       set_xio_using_server iodef.xml true
542    else
543       set_xio_using_server iodef.xml false
544    fi
545    cd ${SETTE_DIR}
546    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
547    cd ${SETTE_DIR}
548    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
549fi
550
551if [ ${config} -eq 6 ] ;  then
552    ## Reproducibility tests for ORCA2_OFF_PISCES
553    export TEST_NAME="REPRO_4_4"
554    cd ${CONFIG_DIR}
555    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
556    cd ${SETTE_DIR}
557    . ./param.cfg
558    . ./all_functions.sh
559    . ./prepare_exe_dir.sh
560    JOB_FILE=${EXE_DIR}/run_job.sh
561    NPROC=16
562    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
563    cd ${EXE_DIR}
564    set_namelist namelist_cfg nn_it000 1
565    set_namelist namelist_cfg nn_itend 40
566    set_namelist namelist_cfg ln_ctl .false.
567    set_namelist namelist_cfg ln_clobber .true.
568    set_namelist namelist_cfg jpni 4
569    set_namelist namelist_cfg jpnj 4
570    set_namelist namelist_cfg jpnij 16
571    set_namelist namelist_top_cfg ln_trcdta .false.
572    set_namelist namelist_top_cfg ln_diatrc .false.
573    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
574    # if not you need input files, and for tests is not necessary
575    set_namelist namelist_pisces_cfg ln_presatm .false.
576    set_namelist namelist_pisces_cfg ln_varpar .false.
577    set_namelist namelist_pisces_cfg ln_dust .false.
578    set_namelist namelist_pisces_cfg ln_solub .false.
579    set_namelist namelist_pisces_cfg ln_river .false.
580    set_namelist namelist_pisces_cfg ln_ndepo .false.
581    set_namelist namelist_pisces_cfg ln_ironsed .false.
582    set_namelist namelist_pisces_cfg ln_hydrofe .false.
583    # put ln_pisdmp to false : no restoring to global mean value
584    set_namelist namelist_pisces_cfg ln_pisdmp .false.
585    if [ ${USING_MPMD} == "yes" ] ; then
586       set_xio_using_server iodef.xml true
587    else
588       set_xio_using_server iodef.xml false
589    fi
590    cd ${SETTE_DIR}
591    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
592    cd ${SETTE_DIR}
593    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
594
595    cd ${SETTE_DIR}
596    export TEST_NAME="REPRO_2_8"
597    . ./prepare_exe_dir.sh
598    JOB_FILE=${EXE_DIR}/run_job.sh
599    NPROC=16
600    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
601    cd ${EXE_DIR}
602    set_namelist namelist_cfg nn_it000 1
603    set_namelist namelist_cfg nn_itend 40
604    set_namelist namelist_cfg ln_ctl .false.
605    set_namelist namelist_cfg ln_clobber .true.
606    set_namelist namelist_cfg jpni 2
607    set_namelist namelist_cfg jpnj 8
608    set_namelist namelist_cfg jpnij 16
609    set_namelist namelist_top_cfg ln_trcdta .false.
610    set_namelist namelist_top_cfg ln_diatrc .false.
611    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
612    # if not you need input files, and for tests is not necessary
613    set_namelist namelist_pisces_cfg ln_presatm .false.
614    set_namelist namelist_pisces_cfg ln_varpar .false.
615    set_namelist namelist_pisces_cfg ln_dust .false.
616    set_namelist namelist_pisces_cfg ln_solub .false.
617    set_namelist namelist_pisces_cfg ln_river .false.
618    set_namelist namelist_pisces_cfg ln_ndepo .false.
619    set_namelist namelist_pisces_cfg ln_ironsed .false.
620    set_namelist namelist_pisces_cfg ln_hydrofe .false.
621    # put ln_pisdmp to false : no restoring to global mean value
622    set_namelist namelist_pisces_cfg ln_pisdmp .false.
623    if [ ${USING_MPMD} == "yes" ] ; then
624       set_xio_using_server iodef.xml true
625    else
626       set_xio_using_server iodef.xml false
627    fi
628    cd ${SETTE_DIR}
629    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
630    cd ${SETTE_DIR}
631    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
632fi
633
634
635# TESTS FOR ORCA2_LIM3 CONFIGURATION
636if [ ${config} -eq 7 ] ;  then
637    ## Restartability tests for ORCA2_LIM3
638    export TEST_NAME="LONG"
639    cd ${CONFIG_DIR}
640    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_LONG -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS}
641    cd ${SETTE_DIR}
642    . ./param.cfg
643    . ./all_functions.sh
644    . ./prepare_exe_dir.sh
645    JOB_FILE=${EXE_DIR}/run_job.sh
646    NPROC=4
647    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
648    cd ${EXE_DIR}
649    set_namelist namelist_cfg cn_exp \"O2L3_LONG\"
650    set_namelist namelist_cfg nn_it000 1
651    set_namelist namelist_cfg nn_itend 150
652    set_namelist namelist_cfg nn_stock 75
653    set_namelist namelist_cfg ln_clobber .true.
654    set_namelist namelist_cfg nn_fwb 0
655    set_namelist namelist_cfg jpni 2
656    set_namelist namelist_cfg jpnj 2
657    set_namelist namelist_cfg jpnij 4
658    set_namelist namelist_cfg nn_solv 2
659    if [ ${USING_MPMD} == "yes" ] ; then
660       set_xio_using_server iodef.xml true
661    else
662       set_xio_using_server iodef.xml false
663    fi
664    cd ${SETTE_DIR}
665    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
666   
667    cd ${SETTE_DIR}
668    export TEST_NAME="SHORT"
669    . ./prepare_exe_dir.sh
670    cd ${EXE_DIR}
671    set_namelist namelist_cfg cn_exp \"O2L3_SHORT\"
672    set_namelist namelist_cfg nn_it000 76
673    set_namelist namelist_cfg nn_itend 150
674    set_namelist namelist_cfg nn_stock 75
675    set_namelist namelist_cfg ln_rstart .true.
676    set_namelist namelist_cfg nn_rstctl 2
677    set_namelist namelist_cfg ln_clobber .true.
678    set_namelist namelist_cfg nn_fwb 0
679    set_namelist namelist_cfg jpni 2
680    set_namelist namelist_cfg jpnj 2
681    set_namelist namelist_cfg jpnij 4
682    set_namelist namelist_cfg nn_solv 2
683    set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_00000075_restart\"
684    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_00000075_restart_ice\"
685    for (( i=1; i<=$NPROC; i++)) ; do
686        L_NPROC=$(( $i - 1 ))
687        L_NPROC=`printf "%04d\n" ${L_NPROC}`
688        ln -sf ../LONG/O2L3_LONG_00000075_restart_${L_NPROC}.nc .
689        ln -sf ../LONG/O2L3_LONG_00000075_restart_ice_${L_NPROC}.nc .
690    done
691    if [ ${USING_MPMD} == "yes" ] ; then
692       set_xio_using_server iodef.xml true
693    else
694       set_xio_using_server iodef.xml false
695    fi
696    cd ${SETTE_DIR}
697    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
698    cd ${SETTE_DIR}
699    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
700fi
701
702if [ ${config} -eq 8 ] ;  then
703    ## Reproducibility tests for ORCA2_LIM3
704    export TEST_NAME="REPRO_4_4"
705    cd ${CONFIG_DIR}
706    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_16 -r ORCA2_LIM3 -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
707    cd ${SETTE_DIR}
708    . ./param.cfg
709    . ./all_functions.sh
710    . ./prepare_exe_dir.sh
711    JOB_FILE=${EXE_DIR}/run_job.sh
712    NPROC=16
713    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
714    cd ${EXE_DIR}
715    set_namelist namelist_cfg nn_it000 1
716    set_namelist namelist_cfg nn_itend 75
717    set_namelist namelist_cfg nn_fwb 0
718    set_namelist namelist_cfg ln_ctl .false.
719    set_namelist namelist_cfg ln_clobber .true.
720    set_namelist namelist_cfg jpni 4
721    set_namelist namelist_cfg jpnj 4
722    set_namelist namelist_cfg jpnij 16
723    set_namelist namelist_cfg nn_solv 2
724    if [ ${USING_MPMD} == "yes" ] ; then
725       set_xio_using_server iodef.xml true
726    else
727       set_xio_using_server iodef.xml false
728    fi
729    cd ${SETTE_DIR}
730    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
731    cd ${SETTE_DIR}
732    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
733
734    cd ${SETTE_DIR}
735    export TEST_NAME="REPRO_2_8"
736    . ./prepare_exe_dir.sh
737    JOB_FILE=${EXE_DIR}/run_job.sh
738    NPROC=16
739    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
740    cd ${EXE_DIR}
741    set_namelist namelist_cfg nn_it000 1
742    set_namelist namelist_cfg nn_itend 75
743    set_namelist namelist_cfg ln_clobber .true.
744    set_namelist namelist_cfg nn_fwb 0
745    set_namelist namelist_cfg jpni 2
746    set_namelist namelist_cfg jpnj 8
747    set_namelist namelist_cfg jpnij 16
748    set_namelist namelist_cfg nn_solv 2
749    if [ ${USING_MPMD} == "yes" ] ; then
750       set_xio_using_server iodef.xml true
751    else
752       set_xio_using_server iodef.xml false
753    fi
754
755    cd ${SETTE_DIR}
756    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
757    cd ${SETTE_DIR}
758    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
759fi
760
761
762# TESTS FOR AMM12 CONFIGURATION
763if [ ${config} -eq 9 ] ;  then
764    ## Restartability tests for AMM12
765    export TEST_NAME="LONG"
766    cd ${CONFIG_DIR}
767    . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS}
768    cd ${SETTE_DIR}
769    . ./param.cfg
770    . ./all_functions.sh
771    . ./prepare_exe_dir.sh
772    JOB_FILE=${EXE_DIR}/run_job.sh
773    NPROC=32
774    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
775    cd ${EXE_DIR}
776    set_namelist namelist_cfg nn_it000 1
777    set_namelist namelist_cfg nn_itend 576
778    set_namelist namelist_cfg nn_stock 288
779    set_namelist namelist_cfg nn_fwb 0
780    set_namelist namelist_cfg ln_ctl .false.
781    set_namelist namelist_cfg ln_clobber .true.
782    set_namelist namelist_cfg jpni 8
783    set_namelist namelist_cfg jpnj 4
784    set_namelist namelist_cfg jpnij 32
785    if [ ${USING_MPMD} == "yes" ] ; then
786       set_xio_using_server iodef.xml true
787    else
788       set_xio_using_server iodef.xml false
789    fi
790    cd ${SETTE_DIR}
791    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
792
793    cd ${SETTE_DIR}
794    export TEST_NAME="SHORT"
795    . ./prepare_exe_dir.sh
796    cd ${EXE_DIR}
797    set_namelist namelist_cfg nn_it000 289
798    set_namelist namelist_cfg nn_itend 576
799    set_namelist namelist_cfg nn_fwb 0
800    set_namelist namelist_cfg ln_ctl .false.
801    set_namelist namelist_cfg ln_clobber .true.
802    set_namelist namelist_cfg jpni 8
803    set_namelist namelist_cfg jpnj 4
804    set_namelist namelist_cfg jpnij 32
805    set_namelist namelist_cfg ln_rstart .true.
806    set_namelist namelist_cfg nn_rstctl 2
807    set_namelist namelist_cfg cn_ocerst_in \"AMM12_00000288_restart_oce_out\"
808    set_namelist namelist_cfg nn_date0 20120102
809    for (( i=1; i<=$NPROC; i++)) ; do
810        L_NPROC=$(( $i - 1 ))
811        L_NPROC=`printf "%04d\n" ${L_NPROC}`
812        ln -sf ../LONG/AMM12_00000288_restart_oce_out_${L_NPROC}.nc .
813    done
814    if [ ${USING_MPMD} == "yes" ] ; then
815       set_xio_using_server iodef.xml true
816    else
817       set_xio_using_server iodef.xml false
818    fi
819    cd ${SETTE_DIR}
820    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
821    cd ${SETTE_DIR}
822    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
823fi
824
825if [ ${config} -eq 10 ] ;  then
826## Reproducibility tests for AMM12
827    export TEST_NAME="REPRO_8_4"
828    cd ${CONFIG_DIR}
829    . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${DEL_KEYS}
830    cd ${SETTE_DIR}
831    . ./param.cfg
832    . ./all_functions.sh
833    . ./prepare_exe_dir.sh
834    JOB_FILE=${EXE_DIR}/run_job.sh
835    NPROC=32
836    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
837    cd ${EXE_DIR}
838    set_namelist namelist_cfg nn_it000 1
839    set_namelist namelist_cfg nn_itend 576
840    set_namelist namelist_cfg nn_fwb 0
841    set_namelist namelist_cfg ln_ctl .false.
842    set_namelist namelist_cfg ln_clobber .true.
843    set_namelist namelist_cfg jpni 8
844    set_namelist namelist_cfg jpnj 4
845    set_namelist namelist_cfg jpnij 32
846    if [ ${USING_MPMD} == "yes" ] ; then
847       set_xio_using_server iodef.xml true
848    else
849       set_xio_using_server iodef.xml false
850    fi
851    cd ${SETTE_DIR}
852    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
853    cd ${SETTE_DIR}
854    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
855
856    cd ${SETTE_DIR}
857    export TEST_NAME="REPRO_4_8"
858    . ./prepare_exe_dir.sh
859    JOB_FILE=${EXE_DIR}/run_job.sh
860    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
861    cd ${EXE_DIR}
862    set_namelist namelist_cfg nn_it000 1
863    set_namelist namelist_cfg nn_itend 576
864    set_namelist namelist_cfg nn_fwb 0
865    set_namelist namelist_cfg ln_ctl .false.
866    set_namelist namelist_cfg ln_clobber .true.
867    set_namelist namelist_cfg jpni 4
868    set_namelist namelist_cfg jpnj 8
869    set_namelist namelist_cfg jpnij 32
870    if [ ${USING_MPMD} == "yes" ] ; then
871       set_xio_using_server iodef.xml true
872    else
873       set_xio_using_server iodef.xml false
874    fi
875    cd ${SETTE_DIR}
876    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
877    cd ${SETTE_DIR}
878    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
879fi
880
881
882# TESTS FOR ORCA2_SAS_LIM CONFIGURATION
883if [ ${config} -eq 11 ] ;  then
884    ## Restartability tests for SAS
885    export TEST_NAME="LONG"
886    cd ${CONFIG_DIR}
887    . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
888    cd ${SETTE_DIR}
889    . ./param.cfg
890    . ./all_functions.sh
891    . ./prepare_exe_dir.sh
892    JOB_FILE=${EXE_DIR}/run_job.sh
893    NPROC=32
894    \rm $JOB_FILE
895    cd ${EXE_DIR}
896    set_namelist namelist_cfg cn_exp \"SAS\"
897    set_namelist namelist_cfg nn_it000 1
898    set_namelist namelist_cfg nn_itend 100
899    set_namelist namelist_cfg nn_stock 50
900    set_namelist namelist_cfg ln_ctl .false.
901    set_namelist namelist_cfg ln_clobber .true.
902    set_namelist namelist_cfg nn_fwb 0
903    set_namelist namelist_cfg jpni 8
904    set_namelist namelist_cfg jpnj 4
905    set_namelist namelist_cfg jpnij 32
906    if [ ${USING_MPMD} == "yes" ] ; then
907       set_xio_using_server iodef.xml true
908    else
909       set_xio_using_server iodef.xml false
910    fi
911    cd ${SETTE_DIR}
912    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
913
914    cd ${SETTE_DIR}
915    export TEST_NAME="SHORT"
916    . ./prepare_exe_dir.sh
917    cd ${EXE_DIR}
918    set_namelist namelist_cfg cn_exp \"SAS\"
919    set_namelist namelist_cfg nn_it000 51
920    set_namelist namelist_cfg nn_itend 100
921    set_namelist namelist_cfg ln_ctl .false.
922    set_namelist namelist_cfg ln_clobber .true.
923    set_namelist namelist_cfg nn_fwb 0
924    set_namelist namelist_cfg jpni 8
925    set_namelist namelist_cfg jpnj 4
926    set_namelist namelist_cfg jpnij 32
927    set_namelist namelist_cfg nn_rstctl 2
928    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000050_restart\"
929    for (( i=1; i<=$NPROC; i++)) ; do
930        L_NPROC=$(( $i - 1 ))
931        L_NPROC=`printf "%04d\n" ${L_NPROC}`
932        ln -sf ../LONG/SAS_00000050_restart_${L_NPROC}.nc .
933    done
934    if [ ${USING_MPMD} == "yes" ] ; then
935       set_xio_using_server iodef.xml true
936    else
937       set_xio_using_server iodef.xml false
938    fi
939    cd ${SETTE_DIR}
940    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
941    cd ${SETTE_DIR}
942    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
943fi
944
945if [ ${config} -eq 12 ] ;  then
946## Reproducibility tests for ORCA2_SAS_LIM
947    export TEST_NAME="REPRO_8_4"
948    cd ${CONFIG_DIR}
949    . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
950    cd ${SETTE_DIR}
951    . ./param.cfg
952    . ./all_functions.sh
953    . ./prepare_exe_dir.sh
954    JOB_FILE=${EXE_DIR}/run_job.sh
955    NPROC=32
956    \rm ${JOB_FILE}
957    cd ${EXE_DIR}
958    set_namelist namelist_cfg cn_exp \"SAS\"
959    set_namelist namelist_cfg nn_it000 51
960    set_namelist namelist_cfg nn_itend 100
961    set_namelist namelist_cfg ln_ctl .false.
962    set_namelist namelist_cfg ln_clobber .true.
963    set_namelist namelist_cfg nn_fwb 0
964    set_namelist namelist_cfg jpni 8
965    set_namelist namelist_cfg jpnj 4
966    set_namelist namelist_cfg jpnij 32
967    if [ ${USING_MPMD} == "yes" ] ; then
968       set_xio_using_server iodef.xml true
969    else
970       set_xio_using_server iodef.xml false
971    fi
972    cd ${SETTE_DIR}
973    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}  ${NUM_XIOSERVERS}
974    cd ${SETTE_DIR}
975    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
976    cd ${SETTE_DIR}
977    export TEST_NAME="REPRO_4_8"
978    . ./prepare_exe_dir.sh
979    cd ${EXE_DIR}
980    set_namelist namelist_cfg cn_exp \"SAS\"
981    set_namelist namelist_cfg nn_it000 51
982    set_namelist namelist_cfg nn_itend 100
983    set_namelist namelist_cfg ln_ctl .false.
984    set_namelist namelist_cfg ln_clobber .true.
985    set_namelist namelist_cfg nn_fwb 0
986    set_namelist namelist_cfg jpni 4
987    set_namelist namelist_cfg jpnj 8
988    set_namelist namelist_cfg jpnij 32
989    if [ ${USING_MPMD} == "yes" ] ; then
990       set_xio_using_server iodef.xml true
991    else
992       set_xio_using_server iodef.xml false
993    fi
994    cd ${SETTE_DIR}
995    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
996    cd ${SETTE_DIR}
997    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
998fi
999# TESTS FOR ISOMIP CONFIGURATION
1000if [ ${config} -eq 13 ] ;  then
1001    ## Restartability tests for ISOMIP
1002    export TEST_NAME="LONG"
1003    cd ${CONFIG_DIR}
1004    . ./makenemo -m ${CMP_NAM} -n ISOMIP_LONG -u ISOMIP -j 8 del_key ${DEL_KEYS}
1005    cd ${SETTE_DIR}
1006    . ./param.cfg
1007    . ./all_functions.sh
1008    . ./prepare_exe_dir.sh
1009    JOB_FILE=${EXE_DIR}/run_job.sh
1010    NPROC=4
1011    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1012    cd ${EXE_DIR}
1013    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
1014    set_namelist namelist_cfg nn_it000 1
1015    set_namelist namelist_cfg nn_itend 96
1016    set_namelist namelist_cfg nn_stock 48
1017    set_namelist namelist_cfg ln_clobber .true.
1018    set_namelist namelist_cfg nn_fwb 0
1019    set_namelist namelist_cfg nn_solv 2
1020    set_namelist namelist_cfg jpni 2
1021    set_namelist namelist_cfg jpnj 2
1022    set_namelist namelist_cfg jpnij 4
1023    if [ ${USING_MPMD} == "yes" ] ; then
1024       set_xio_using_server iodef.xml true
1025    else
1026       set_xio_using_server iodef.xml false
1027    fi
1028    cd ${SETTE_DIR}
1029    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1030
1031    cd ${SETTE_DIR}
1032    export TEST_NAME="SHORT"
1033    . ./prepare_exe_dir.sh
1034    cd ${EXE_DIR}
1035    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
1036    set_namelist namelist_cfg nn_it000 49
1037    set_namelist namelist_cfg nn_itend 96
1038    set_namelist namelist_cfg nn_stock 48
1039    set_namelist namelist_cfg ln_rstart .true.
1040    set_namelist namelist_cfg nn_rstctl 2
1041    set_namelist namelist_cfg ln_clobber .true.
1042    set_namelist namelist_cfg nn_fwb 0
1043    set_namelist namelist_cfg nn_solv 2
1044    set_namelist namelist_cfg jpni 2
1045    set_namelist namelist_cfg jpnj 2
1046    set_namelist namelist_cfg jpnij 4
1047    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
1048    if [ ${USING_MPMD} == "yes" ] ; then
1049       set_xio_using_server iodef.xml true
1050    else
1051       set_xio_using_server iodef.xml false
1052    fi
1053    for (( i=1; i<=$NPROC; i++)) ; do
1054        L_NPROC=$(( $i - 1 ))
1055        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1056        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
1057    done
1058    if [ ${USING_MPMD} == "yes" ] ; then
1059       set_xio_using_server iodef.xml true
1060    else
1061       set_xio_using_server iodef.xml false
1062    fi
1063    cd ${SETTE_DIR}
1064    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1065    cd ${SETTE_DIR}
1066    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1067fi
1068if [ ${config} -eq 14 ] ;  then
1069    ## Reproducibility tests for ISOMIP
1070    export TEST_NAME="REPRO_1_4"
1071    cd ${CONFIG_DIR}
1072    . ./makenemo -m ${CMP_NAM} -n ISOMIP_4 -u ISOMIP -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
1073    cd ${SETTE_DIR}
1074    . ./param.cfg
1075    . ./all_functions.sh
1076    . ./prepare_exe_dir.sh
1077    JOB_FILE=${EXE_DIR}/run_job.sh
1078    NPROC=4
1079    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1080    cd ${EXE_DIR}
1081    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
1082    set_namelist namelist_cfg nn_it000 1
1083    set_namelist namelist_cfg nn_itend 48
1084    set_namelist namelist_cfg nn_fwb 0
1085    set_namelist namelist_cfg nn_bench 0
1086    set_namelist namelist_cfg ln_ctl .false.
1087    set_namelist namelist_cfg ln_clobber .true.
1088    set_namelist namelist_cfg nn_solv 2
1089    set_namelist namelist_cfg jpni 1
1090    set_namelist namelist_cfg jpnj 4
1091    set_namelist namelist_cfg jpnij 4
1092    if [ ${USING_MPMD} == "yes" ] ; then
1093       set_xio_using_server iodef.xml true
1094    else
1095       set_xio_using_server iodef.xml false
1096    fi
1097    cd ${SETTE_DIR}
1098    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1099    cd ${SETTE_DIR}
1100    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1101
1102    cd ${SETTE_DIR}
1103    export TEST_NAME="REPRO_2_2"
1104    . ./prepare_exe_dir.sh
1105    JOB_FILE=${EXE_DIR}/run_job.sh
1106    NPROC=4
1107    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1108    cd ${EXE_DIR}
1109    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
1110    set_namelist namelist_cfg nn_it000 1
1111    set_namelist namelist_cfg nn_itend 48
1112    set_namelist namelist_cfg nn_fwb 0
1113    set_namelist namelist_cfg ln_ctl .false.
1114    set_namelist namelist_cfg ln_clobber .true.
1115    set_namelist namelist_cfg nn_solv 2
1116    set_namelist namelist_cfg jpni 2
1117    set_namelist namelist_cfg jpnj 2
1118    set_namelist namelist_cfg jpnij 4
1119    if [ ${USING_MPMD} == "yes" ] ; then
1120       set_xio_using_server iodef.xml true
1121    else
1122       set_xio_using_server iodef.xml false
1123    fi
1124    cd ${SETTE_DIR}
1125    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1126    cd ${SETTE_DIR}
1127    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1128
1129fi
1130
1131## Test assimilation interface code, OBS and ASM for reproducibility
1132## Restartability not tested (ASM code not restartable while increments are being applied)
1133if [ ${config} -eq 15 ] ; then
1134   ## Reproducibility tests for ORCA2_LIM_OBS
1135    export TEST_NAME="REPRO_4_4"
1136    cd ${CONFIG_DIR}
1137    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM_OBS -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_diaobs key_asminc" del_key ${DEL_KEYS}
1138    cd ${SETTE_DIR}
1139    . ./param.cfg
1140    . ./all_functions.sh
1141    . ./prepare_exe_dir.sh
1142    JOB_FILE=${EXE_DIR}/run_job.sh
1143    NPROC=16
1144    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1145    cd ${EXE_DIR}
1146    set_namelist namelist_cfg nn_it000 1
1147    set_namelist namelist_cfg nn_itend 75
1148    set_namelist namelist_cfg nn_fwb 0
1149    set_namelist namelist_cfg ln_ctl .false.
1150    set_namelist namelist_cfg ln_clobber .true.
1151    set_namelist namelist_cfg jpni 4
1152    set_namelist namelist_cfg jpnj 4
1153    set_namelist namelist_cfg jpnij 16
1154    set_namelist namelist_cfg nn_solv 2   
1155    set_namelist namelist_cfg ln_t3d .true.
1156    set_namelist namelist_cfg ln_s3d .true.
1157    set_namelist namelist_cfg ln_profb .true.
1158    set_namelist namelist_cfg ln_sst .true.
1159    set_namelist namelist_cfg ln_sstfb .true.
1160    set_namelist namelist_cfg ln_sla .true.
1161    set_namelist namelist_cfg ln_slafb .true.
1162    set_namelist namelist_cfg ln_seaice .false.
1163    set_namelist namelist_cfg ln_bkgwri .true.
1164    set_namelist namelist_cfg ln_trainc .true.
1165    set_namelist namelist_cfg ln_dyninc .true.
1166    set_namelist namelist_cfg ln_sshinc .true.
1167    set_namelist namelist_cfg ln_asmiau .true.
1168    if [ ${USING_MPMD} == "yes" ] ; then
1169       set_xio_using_server iodef.xml true
1170    else
1171       set_xio_using_server iodef.xml false
1172    fi
1173    cd ${SETTE_DIR}
1174    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1175    cd ${SETTE_DIR}
1176    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1177
1178   cd ${SETTE_DIR}
1179    export TEST_NAME="REPRO_2_8"
1180    . ./prepare_exe_dir.sh
1181    JOB_FILE=${EXE_DIR}/run_job.sh
1182    NPROC=16
1183    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1184    cd ${EXE_DIR}
1185    set_namelist namelist_cfg nn_it000 1
1186    set_namelist namelist_cfg nn_itend 75
1187    set_namelist namelist_cfg nn_fwb 0
1188    set_namelist namelist_cfg ln_ctl .false.
1189    set_namelist namelist_cfg ln_clobber .true.
1190    set_namelist namelist_cfg jpni 2
1191    set_namelist namelist_cfg jpnj 8
1192    set_namelist namelist_cfg jpnij 16
1193    set_namelist namelist_cfg nn_solv 2
1194    set_namelist namelist_cfg ln_t3d .true.
1195    set_namelist namelist_cfg ln_s3d .true.
1196    set_namelist namelist_cfg ln_profb .true.
1197    set_namelist namelist_cfg ln_sst .true.
1198    set_namelist namelist_cfg ln_sstfb .true.
1199    set_namelist namelist_cfg ln_sla .true.
1200    set_namelist namelist_cfg ln_slafb .true.
1201    set_namelist namelist_cfg ln_seaice .false.
1202    set_namelist namelist_cfg ln_bkgwri .true.
1203    set_namelist namelist_cfg ln_trainc .true.
1204    set_namelist namelist_cfg ln_dyninc .true.
1205    set_namelist namelist_cfg ln_sshinc .true.
1206    set_namelist namelist_cfg ln_asmiau .true.
1207    if [ ${USING_MPMD} == "yes" ] ; then
1208       set_xio_using_server iodef.xml true
1209    else
1210       set_xio_using_server iodef.xml false
1211    fi
1212    cd ${SETTE_DIR}
1213    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1214    cd ${SETTE_DIR}
1215    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1216fi
1217# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
1218if [ ${config} -eq 16 ] ;  then
1219    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
1220    export TEST_NAME="SHORT"
1221    cd ${CONFIG_DIR}
1222    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1223    cd ${SETTE_DIR}
1224    . ./param.cfg
1225    . ./all_functions.sh
1226    . ./prepare_exe_dir.sh
1227    JOB_FILE=${EXE_DIR}/run_job.sh
1228    NPROC=2
1229    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1230    cd ${EXE_DIR}
1231    set_namelist namelist_cfg nn_it000 1
1232    set_namelist namelist_cfg nn_itend 75
1233    set_namelist namelist_cfg ln_ctl .false.
1234    set_namelist namelist_cfg ln_clobber .true.
1235    set_namelist namelist_cfg nn_fwb 0
1236    set_namelist namelist_cfg jpni 1
1237    set_namelist namelist_cfg jpnj 2
1238    set_namelist namelist_cfg jpnij 2
1239    set_namelist 1_namelist_cfg nn_it000 1
1240    set_namelist 1_namelist_cfg nn_itend 150
1241    set_namelist 1_namelist_cfg ln_ctl .false.
1242    set_namelist 1_namelist_cfg ln_clobber .true.
1243    if [ ${USING_MPMD} == "yes" ] ; then
1244       set_xio_using_server iodef.xml true
1245    else
1246       set_xio_using_server iodef.xml false
1247    fi
1248    cd ${SETTE_DIR}
1249    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1250    cd ${SETTE_DIR}
1251    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1252fi
1253
1254done
Note: See TracBrowser for help on using the repository browser.