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 branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/SETTE – NEMO

source: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/SETTE/sette.sh @ 3534

Last change on this file since 3534 was 3534, checked in by flavoni, 11 years ago

update SETTE, add restart removed for error, see ticket: #941

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 24.6 KB
Line 
1#!/bin/bash
2#############################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
5#
6# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
7# ----------------------------------------------------------------------
8# NEMO/SETTE , NEMO Consortium (2010)
9# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
10# ----------------------------------------------------------------------
11#
12#############################################################
13#set -x
14set -o posix
15#set -u
16#set -e
17#+
18#
19# ================
20# sette.sh
21# ================
22#
23# ----------------------------------------------
24# Set of tests for NEMO
25# ----------------------------------------------
26#
27# SYNOPSIS
28# ========
29#
30# ::
31#
32#  $ ./sette.sh
33#
34# DESCRIPTION
35# ===========
36#
37# Variables to be checked by user:
38#
39# COMPILER : name of compiler as defined in NEMOGCM/ARCH directory
40#
41# BATCH_COMMAND :  name of the command for batch submission
42#
43# INTERACT_FLAG :  flag to run in interactive mode "yes"
44#                       to run in batch mode "no"
45#
46# MPIRUN_FLAG   :  flag to run in parallel (MPI) "yes"
47#                       to run in sequential mode (NB_PROC = 1) "no"
48#
49# Principal script is sette.sh, that calls
50#
51#  makenemo
52#
53#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00)
54#
55#  param.cfg : sets and loads following directories:
56#
57#   FORCING_DIR : is the directory for forcing files (tarfile)
58#
59#   INPUT_DIR : is the directory for input files storing
60#
61#   TMPDIR : is the temporary directory (if needed)
62#
63#   NEMO_VALIDATION_DIR : is the validation directory
64#
65#   (NOTE: this file is the same for all configrations to be tested with sette)
66#
67#
68#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
69#
70#   set_namelist : function declared in all_functions that set namelist parameters for tests
71#
72#   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test.
73#
74#   Tree of VALIDATION is:
75#
76#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
77#
78#
79#  prepare_exe_dir.sh : defines and creates directory where the test is executed
80#
81#       execution directory takes name of TEST_NAME defined in every test in sette.sh
82#
83#       ( each test in executed in its own directory )
84#
85#
86#  prepare_job.sh
87#
88#  to generate the script run_job.sh
89#
90#  fcm_job.sh
91#
92#   run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") see sette.sh and BATCH_TEMPLATE directory
93#
94#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
95#
96#  NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory
97#
98#  NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00
99#
100#  in ${SETTE_DIR} is created output.sette with the echo of executed commands
101#
102#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
103#
104#  if you run: ./sette.sh 2>&1 | tee out.sette
105#
106#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
107#
108#
109# EXAMPLES
110# ========
111#
112# ::
113#
114#  $ ./sette.sh
115#
116#
117# TODO
118# ====
119#
120# option debug
121#
122# EVOLUTIONS
123# ==========
124#
125# $Id : $
126#
127#   * creation
128#
129#-
130#
131#-
132# Compiler among those in NEMOGCM/ARCH
133COMPILER=PW6_VARGAS
134export BATCH_COMMAND_PAR="llsubmit"
135export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
136export INTERACT_FLAG="no"
137export MPIRUN_FLAG="yes"
138
139
140# Directory to run the tests
141SETTE_DIR=$(cd $(dirname "$0"); pwd)
142MAIN_DIR=${SETTE_DIR%/SETTE}
143CONFIG_DIR=${MAIN_DIR}/CONFIG
144TOOLS_DIR=${MAIN_DIR}/TOOLS
145COMPIL_DIR=${TOOLS_DIR}/COMPILE
146
147CMP_NAM=${1:-$COMPILER}
148# Copy job_batch_COMPILER file for specific compiler into job_batch_template
149cd ${SETTE_DIR}
150cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
151
152for config in 1 2 3 4 5 6 7 8 9
153do
154
155# TESTS FOR GYRE CONFIGURATION
156if [ ${config} -eq 1 ] ;  then
157    ## Restartability tests for GYRE
158    export TEST_NAME="LONG"
159    cd ${SETTE_DIR}
160    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 add_key "key_mpp_mpi" 
161    cd ${SETTE_DIR}
162    . param.cfg
163    . all_functions.sh
164    . prepare_exe_dir.sh
165    JOB_FILE=${EXE_DIR}/run_job.sh
166    NPROC=4
167    \rm ${JOB_FILE}
168    cd ${EXE_DIR}
169    set_namelist namelist cn_exp \"GYRE_LONG\"
170    set_namelist namelist nn_it000 1
171    set_namelist namelist nn_itend 120
172    set_namelist namelist nn_stock 60
173    set_namelist namelist ln_clobber .true.
174    set_namelist namelist nn_solv 2
175    set_namelist namelist jpni 2
176    set_namelist namelist jpnj 2
177    set_namelist namelist jpnij 4
178    cd ${SETTE_DIR}
179    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
180    cd ${SETTE_DIR}
181    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
182
183    cd ${SETTE_DIR}
184    export TEST_NAME="SHORT"
185    . prepare_exe_dir.sh
186    cd ${EXE_DIR}
187    set_namelist namelist cn_exp \"GYRE_SHORT\"
188    set_namelist namelist nn_it000 61
189    set_namelist namelist nn_itend 120
190    set_namelist namelist nn_stock 60
191    set_namelist namelist ln_rstart .true.
192    set_namelist namelist nn_rstctl 2
193    set_namelist namelist ln_clobber .true.
194    set_namelist namelist nn_solv 2
195    set_namelist namelist jpni 2
196    set_namelist namelist jpnj 2
197    set_namelist namelist jpnij 4
198    cp ..\/LONG\/GYRE_LONG_00000060_restart*.nc .
199    set_namelist namelist cn_ocerst_in \"GYRE_LONG_00000060_restart\"
200    cd ${SETTE_DIR}
201    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
202    cd ${SETTE_DIR}
203    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
204fi
205
206if [ ${config} -eq 2 ] ;  then
207    ## Reproducibility tests for GYRE
208    export TEST_NAME="REPRO_1_4"
209    cd ${SETTE_DIR}
210    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_mpi key_mpp_rep"
211    cd ${SETTE_DIR}
212    . param.cfg
213    . all_functions.sh
214    . prepare_exe_dir.sh
215    JOB_FILE=${EXE_DIR}/run_job.sh
216    NPROC=4
217    \rm ${JOB_FILE}
218    cd ${EXE_DIR}
219    set_namelist namelist cn_exp \"GYRE_14\"
220    set_namelist namelist nn_it000 1
221    set_namelist namelist nn_itend 60
222    set_namelist namelist nn_fwb 0
223    set_namelist namelist nn_bench 0
224    set_namelist namelist ln_ctl .false.
225    set_namelist namelist ln_clobber .true.
226    set_namelist namelist nn_solv 2
227    set_namelist namelist jpni 1
228    set_namelist namelist jpnj 4
229    set_namelist namelist jpnij 4
230    cd ${SETTE_DIR}
231    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
232    cd ${SETTE_DIR}
233    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
234
235    cd ${SETTE_DIR}
236    export TEST_NAME="REPRO_2_2"
237    . prepare_exe_dir.sh
238    JOB_FILE=${EXE_DIR}/run_job.sh
239    NPROC=4
240    \rm $JOB_FILE
241    cd ${EXE_DIR}
242    set_namelist namelist cn_exp \"GYRE_22\"
243    set_namelist namelist nn_it000 1
244    set_namelist namelist nn_itend 60
245    set_namelist namelist nn_fwb 0
246    set_namelist namelist ln_ctl .false.
247    set_namelist namelist ln_clobber .true.
248    set_namelist namelist nn_solv 2
249    set_namelist namelist jpni 2
250    set_namelist namelist jpnj 2
251    set_namelist namelist jpnij 4
252    cd ${SETTE_DIR}
253    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
254    cd ${SETTE_DIR}
255    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
256
257fi
258
259# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
260if [ ${config} -eq 3 ] ;  then
261    ## Restartability tests for ORCA2_LIM_PISCES
262    export TEST_NAME="LONG"
263    cd ${SETTE_DIR}
264    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi"
265    cd ${SETTE_DIR}
266    . param.cfg
267    . all_functions.sh
268    . prepare_exe_dir.sh
269    JOB_FILE=${EXE_DIR}/run_job.sh
270    NPROC=4
271    \rm ${JOB_FILE}
272    cd ${EXE_DIR}
273    set_namelist namelist cn_exp \"O2LP_LONG\"
274    set_namelist namelist nn_it000 1
275    set_namelist namelist nn_itend 150
276    set_namelist namelist nn_stock 75
277    set_namelist namelist ln_clobber .true.
278    set_namelist namelist jpni 2
279    set_namelist namelist jpnj 2
280    set_namelist namelist jpnij 4
281    set_namelist namelist nn_solv 2
282    set_namelist namelist_top ln_trcdta .false.
283    set_namelist namelist_top ln_diatrc .false.
284    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
285    # if not you need input files, and for tests is not necessary
286    set_namelist namelist_pisces ln_presatm .false.
287    set_namelist namelist_pisces ln_varpar .false.
288    set_namelist namelist_pisces ln_dust .false.
289    set_namelist namelist_pisces ln_solub .false.
290    set_namelist namelist_pisces ln_river .false.
291    set_namelist namelist_pisces ln_ndepo .false.
292    set_namelist namelist_pisces ln_ironsed .false.
293    set_namelist namelist_pisces ln_hydrofe .false.
294    cd ${SETTE_DIR}
295    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
296    cd ${SETTE_DIR}
297    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
298   
299    cd ${SETTE_DIR}
300    export TEST_NAME="SHORT"
301    . prepare_exe_dir.sh
302    cd ${EXE_DIR}
303    set_namelist namelist cn_exp \"O2LP_SHORT\"
304    set_namelist namelist nn_it000 76
305    set_namelist namelist nn_itend 150
306    set_namelist namelist nn_stock 75
307    set_namelist namelist ln_rstart .true.
308    set_namelist namelist nn_rstctl 2
309    set_namelist namelist ln_clobber .true.
310    set_namelist namelist jpni 2
311    set_namelist namelist jpnj 2
312    set_namelist namelist jpnij 4
313    set_namelist namelist nn_solv 2
314    set_namelist namelist_top ln_diatrc .false.
315    set_namelist namelist_top ln_rsttr .true.
316    set_namelist namelist_top nn_rsttr 2
317    cp ../LONG/O2LP_LONG_00000075_restart*nc .
318    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
319    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
320    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
321    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
322    # if not you need input files, and for tests is not necessary
323    set_namelist namelist_pisces ln_presatm .false.
324    set_namelist namelist_pisces ln_varpar .false.
325    set_namelist namelist_pisces ln_dust .false.
326    set_namelist namelist_pisces ln_solub .false.
327    set_namelist namelist_pisces ln_river .false.
328    set_namelist namelist_pisces ln_ndepo .false.
329    set_namelist namelist_pisces ln_ironsed .false.
330    set_namelist namelist_pisces ln_hydrofe .false.
331    # put ln_pisdmp to false : no restoring to global mean value
332    set_namelist namelist_pisces ln_pisdmp .false.
333    cd ${SETTE_DIR}
334    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
335    cd ${SETTE_DIR}
336    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
337fi
338
339if [ ${config} -eq 4 ] ;  then
340    ## Reproducibility tests for ORCA2_LIM_PISCES
341    export TEST_NAME="REPRO_4_4"
342    cd ${SETTE_DIR}
343    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
344    cd ${SETTE_DIR}
345    . param.cfg
346    . all_functions.sh
347    . prepare_exe_dir.sh
348    JOB_FILE=${EXE_DIR}/run_job.sh
349    NPROC=16
350    \rm $JOB_FILE
351    cd ${EXE_DIR}
352    set_namelist namelist nn_it000 1
353    set_namelist namelist nn_itend 75
354    set_namelist namelist nn_fwb 0
355    set_namelist namelist ln_ctl .false.
356    set_namelist namelist ln_clobber .true.
357    set_namelist namelist jpni 4
358    set_namelist namelist jpnj 4
359    set_namelist namelist jpnij 16
360    set_namelist namelist nn_solv 2
361    set_namelist namelist_top ln_trcdta .false.
362    set_namelist namelist_top ln_diatrc .false.
363    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
364    # if not you need input files, and for tests is not necessary
365    set_namelist namelist_pisces ln_presatm .false.
366    set_namelist namelist_pisces ln_varpar .false.
367    set_namelist namelist_pisces ln_dust .false.
368    set_namelist namelist_pisces ln_solub .false.
369    set_namelist namelist_pisces ln_river .false.
370    set_namelist namelist_pisces ln_ndepo .false.
371    set_namelist namelist_pisces ln_ironsed .false.
372    set_namelist namelist_pisces ln_hydrofe .false.
373    # put ln_pisdmp to false : no restoring to global mean value
374    set_namelist namelist_pisces ln_pisdmp .false.
375    cd ${SETTE_DIR}
376    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
377    cd ${SETTE_DIR}
378    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
379
380    cd ${SETTE_DIR}
381    export TEST_NAME="REPRO_2_8"
382    . prepare_exe_dir.sh
383    JOB_FILE=${EXE_DIR}/run_job.sh
384    NPROC=16
385    \rm $JOB_FILE
386    cd ${EXE_DIR}
387    set_namelist namelist nn_it000 1
388    set_namelist namelist nn_itend 75
389    set_namelist namelist nn_fwb 0
390    set_namelist namelist ln_clobber .true.
391    set_namelist namelist jpni 2
392    set_namelist namelist jpnj 8
393    set_namelist namelist jpnij 16
394    set_namelist namelist nn_solv 2
395    set_namelist namelist_top ln_trcdta .false.
396    set_namelist namelist_top ln_diatrc .false.
397    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
398    # if not you need input files, and for tests is not necessary
399    set_namelist namelist_pisces ln_presatm .false.
400    set_namelist namelist_pisces ln_varpar .false.
401    set_namelist namelist_pisces ln_dust .false.
402    set_namelist namelist_pisces ln_solub .false.
403    set_namelist namelist_pisces ln_river .false.
404    set_namelist namelist_pisces ln_ndepo .false.
405    set_namelist namelist_pisces ln_ironsed .false.
406    set_namelist namelist_pisces ln_hydrofe .false.
407    # put ln_pisdmp to false : no restoring to global mean value
408    set_namelist namelist_pisces ln_pisdmp .false.
409    cd ${SETTE_DIR}
410    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
411    cd ${SETTE_DIR}
412    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
413fi
414
415# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
416if [ ${config} -eq 5 ] ;  then
417    ## Restartability tests for ORCA2_OFF_PISCES
418    export TEST_NAME="LONG"
419    cd ${SETTE_DIR}
420    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" 
421    cd ${SETTE_DIR}
422    . param.cfg
423    . all_functions.sh
424    . prepare_exe_dir.sh
425    JOB_FILE=${EXE_DIR}/run_job.sh
426    NPROC=4
427    \rm $JOB_FILE
428    cd ${EXE_DIR}
429    set_namelist namelist cn_exp \"OFFP_LONG\"
430    set_namelist namelist nn_it000 1
431    set_namelist namelist nn_itend 40
432    set_namelist namelist nn_stock 20
433    set_namelist namelist ln_clobber .true.
434    set_namelist namelist jpni 2
435    set_namelist namelist jpnj 2
436    set_namelist namelist jpnij 4
437    set_namelist namelist_top ln_trcdta .false.
438    set_namelist namelist_top ln_diatrc .false.
439    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
440    # if not you need input files, and for tests is not necessary
441    set_namelist namelist_pisces ln_presatm .false.
442    set_namelist namelist_pisces ln_varpar .false.
443    set_namelist namelist_pisces ln_dust .false.
444    set_namelist namelist_pisces ln_solub .false.
445    set_namelist namelist_pisces ln_river .false.
446    set_namelist namelist_pisces ln_ndepo .false.
447    set_namelist namelist_pisces ln_ironsed .false.
448    set_namelist namelist_pisces ln_hydrofe .false.
449    # put ln_pisdmp to false : no restoring to global mean value
450    set_namelist namelist_pisces ln_pisdmp .false.
451
452    cd ${SETTE_DIR}
453    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
454##    cd ${SETTE_DIR}
455##   . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
456   
457    cd ${SETTE_DIR}
458    export TEST_NAME="SHORT"
459    . prepare_exe_dir.sh
460    cd ${EXE_DIR}
461    set_namelist namelist cn_exp \"OFFP_SHORT\"
462    set_namelist namelist nn_it000 21
463    set_namelist namelist nn_itend 40
464    set_namelist namelist nn_stock 20
465    set_namelist namelist ln_clobber .true.
466    set_namelist namelist jpni 2
467    set_namelist namelist jpnj 2
468    set_namelist namelist jpnij 4
469    cp ../LONG/OFFP_LONG_00000020_restart*nc .
470    set_namelist namelist_top ln_diatrc .false.
471    set_namelist namelist_top ln_rsttr .true.
472    set_namelist namelist_top nn_rsttr 2
473    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
474    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
475    # if not you need input files, and for tests is not necessary
476    set_namelist namelist_pisces ln_presatm .false.
477    set_namelist namelist_pisces ln_varpar .false.
478    set_namelist namelist_pisces ln_dust .false.
479    set_namelist namelist_pisces ln_solub .false.
480    set_namelist namelist_pisces ln_river .false.
481    set_namelist namelist_pisces ln_ndepo .false.
482    set_namelist namelist_pisces ln_ironsed .false.
483    set_namelist namelist_pisces ln_hydrofe .false.
484    # put ln_pisdmp to false : no restoring to global mean value
485    set_namelist namelist_pisces ln_pisdmp .false.
486    cd ${SETTE_DIR}
487    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
488    cd ${SETTE_DIR}
489    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
490fi
491
492if [ ${config} -eq 6 ] ;  then
493    ## Reproducibility tests for ORCA2_OFF_PISCES
494    export TEST_NAME="REPRO_4_4"
495    cd ${SETTE_DIR}
496    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
497    cd ${SETTE_DIR}
498    . param.cfg
499    . all_functions.sh
500    . prepare_exe_dir.sh
501    JOB_FILE=${EXE_DIR}/run_job.sh
502    NPROC=16
503    \rm $JOB_FILE
504    cd ${EXE_DIR}
505    set_namelist namelist nn_it000 1
506    set_namelist namelist nn_itend 40
507    set_namelist namelist ln_ctl .false.
508    set_namelist namelist ln_clobber .true.
509    set_namelist namelist jpni 4
510    set_namelist namelist jpnj 4
511    set_namelist namelist jpnij 16
512    set_namelist namelist_top ln_trcdta .false.
513    set_namelist namelist_top ln_diatrc .false.
514    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
515    # if not you need input files, and for tests is not necessary
516    set_namelist namelist_pisces ln_presatm .false.
517    set_namelist namelist_pisces ln_varpar .false.
518    set_namelist namelist_pisces ln_dust .false.
519    set_namelist namelist_pisces ln_solub .false.
520    set_namelist namelist_pisces ln_river .false.
521    set_namelist namelist_pisces ln_ndepo .false.
522    set_namelist namelist_pisces ln_ironsed .false.
523    set_namelist namelist_pisces ln_hydrofe .false.
524    # put ln_pisdmp to false : no restoring to global mean value
525    set_namelist namelist_pisces ln_pisdmp .false.
526    cd ${SETTE_DIR}
527    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
528    cd ${SETTE_DIR}
529    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
530
531    cd ${SETTE_DIR}
532    export TEST_NAME="REPRO_2_8"
533    . prepare_exe_dir.sh
534    JOB_FILE=${EXE_DIR}/run_job.sh
535    NPROC=16
536    \rm $JOB_FILE
537    cd ${EXE_DIR}
538    set_namelist namelist nn_it000 1
539    set_namelist namelist nn_itend 40
540    set_namelist namelist ln_ctl .false.
541    set_namelist namelist ln_clobber .true.
542    set_namelist namelist jpni 2
543    set_namelist namelist jpnj 8
544    set_namelist namelist jpnij 16
545    set_namelist namelist_top ln_trcdta .false.
546    set_namelist namelist_top ln_diatrc .false.
547    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
548    # if not you need input files, and for tests is not necessary
549    set_namelist namelist_pisces ln_presatm .false.
550    set_namelist namelist_pisces ln_varpar .false.
551    set_namelist namelist_pisces ln_dust .false.
552    set_namelist namelist_pisces ln_solub .false.
553    set_namelist namelist_pisces ln_river .false.
554    set_namelist namelist_pisces ln_ndepo .false.
555    set_namelist namelist_pisces ln_ironsed .false.
556    set_namelist namelist_pisces ln_hydrofe .false.
557    # put ln_pisdmp to false : no restoring to global mean value
558    set_namelist namelist_pisces ln_pisdmp .false.
559    cd ${SETTE_DIR}
560    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
561    cd ${SETTE_DIR}
562    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
563fi
564
565# TESTS FOR AMM12 CONFIGURATION
566if [ ${config} -eq 7 ] ;  then
567    ## Restartability tests for AMM12
568    export TEST_NAME="LONG"
569    cd ${SETTE_DIR}
570    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12
571    cd ${SETTE_DIR}
572    . param.cfg
573    . all_functions.sh
574    . prepare_exe_dir.sh
575    JOB_FILE=${EXE_DIR}/run_job.sh
576    NPROC=32
577    \rm $JOB_FILE
578    cd ${EXE_DIR}
579    set_namelist namelist nn_it000 1
580    set_namelist namelist nn_itend 12
581    set_namelist namelist nn_stock 6
582    set_namelist namelist nn_fwb 0
583    set_namelist namelist ln_ctl .false.
584    set_namelist namelist ln_clobber .true.
585    set_namelist namelist nn_dyn2d 2
586    set_namelist namelist nn_tra_dta 0
587    set_namelist namelist jpni 8
588    set_namelist namelist jpnj 4
589    set_namelist namelist jpnij 32
590    cd ${SETTE_DIR}
591    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
592##   cd ${SETTE_DIR}
593##    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
594
595    cd ${SETTE_DIR}
596    export TEST_NAME="SHORT"
597    . prepare_exe_dir.sh
598    JOB_FILE=${EXE_DIR}/run_job.sh
599    NPROC=32
600    \rm $JOB_FILE
601    cd ${EXE_DIR}
602    set_namelist namelist nn_it000 7
603    set_namelist namelist nn_itend 12
604    set_namelist namelist nn_fwb 0
605    set_namelist namelist ln_ctl .false.
606    set_namelist namelist ln_clobber .true.
607    set_namelist namelist nn_dyn2d 2
608    set_namelist namelist nn_tra_dta 0
609    set_namelist namelist jpni 8
610    set_namelist namelist jpnj 4
611    set_namelist namelist jpnij 32
612    set_namelist namelist ln_rstart .true.
613    set_namelist namelist nn_rstctl 2
614    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
615    cp ../LONG/AMM12_00000006_restart*.nc .
616    cd ${SETTE_DIR}
617    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
618    cd ${SETTE_DIR}
619    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
620fi
621
622if [ ${config} -eq 8 ] ;  then
623    ## Reproducibility tests for AMM12
624    export TEST_NAME="REPO_8_4"
625    cd ${SETTE_DIR}
626    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
627    cd ${SETTE_DIR}
628    . param.cfg
629    . all_functions.sh
630    . prepare_exe_dir.sh
631    JOB_FILE=${EXE_DIR}/run_job.sh
632    NPROC=32
633    \rm ${JOB_FILE}
634    cd ${EXE_DIR}
635    set_namelist namelist nn_it000 1
636    set_namelist namelist nn_itend 12
637    set_namelist namelist nn_stock 6
638    set_namelist namelist nn_fwb 0
639    set_namelist namelist ln_ctl .false.
640    set_namelist namelist ln_clobber .true.
641    set_namelist namelist nn_dyn2d 2
642    set_namelist namelist nn_tra_dta 0
643    set_namelist namelist jpni 8
644    set_namelist namelist jpnj 4
645    set_namelist namelist jpnij 32
646    cd ${SETTE_DIR}
647    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
648    cd ${SETTE_DIR}
649    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
650
651    cd ${SETTE_DIR}
652    export TEST_NAME="REPO_4_8"
653    . prepare_exe_dir.sh
654    cd ${EXE_DIR}
655    set_namelist namelist nn_it000 1
656    set_namelist namelist nn_itend 576
657    set_namelist namelist nn_fwb 0
658    set_namelist namelist ln_ctl .false.
659    set_namelist namelist ln_clobber .true.
660    set_namelist namelist nn_dyn2d 2
661    set_namelist namelist nn_tra_dta 0
662    set_namelist namelist ln_clobber .true.
663    set_namelist namelist jpni 4
664    set_namelist namelist jpnj 8
665    set_namelist namelist jpnij 32
666    set_namelist namelist ln_rstart .true.
667    set_namelist namelist nn_rstctl 2
668    set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\"
669    cd ${SETTE_DIR}
670    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
671    cd ${SETTE_DIR}
672    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
673fi
674
675# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
676if [ ${config} -eq 9 ] ;  then
677    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
678    export TEST_NAME="SHORT"
679    cd ${SETTE_DIR}
680    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_mpi key_mpp_rep key_agrif" del_key "key_zdftmx"
681    cd ${SETTE_DIR}
682    . param.cfg
683    . all_functions.sh
684    . prepare_exe_dir.sh
685    JOB_FILE=${EXE_DIR}/run_job.sh
686    NPROC=2
687    \rm ${JOB_FILE}
688    cd ${EXE_DIR}
689    set_namelist namelist nn_it000 1
690    set_namelist namelist nn_itend 75
691    set_namelist namelist ln_ctl .false.
692    set_namelist namelist ln_clobber .true.
693    set_namelist namelist jpni 1
694    set_namelist namelist jpnj 2
695    set_namelist namelist jpnij 2
696    set_namelist 1_namelist nn_it000 1
697    set_namelist 1_namelist nn_itend 150
698    set_namelist 1_namelist ln_ctl .false.
699    set_namelist 1_namelist ln_clobber .true.
700    cd ${SETTE_DIR}
701    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
702    cd ${SETTE_DIR}
703    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
704fi
705
706done
Note: See TracBrowser for help on using the repository browser.