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

Last change on this file since 2732 was 2732, checked in by rblod, 13 years ago

Add a test with AGRIF in sette.sh, just because life is always much more funny when using AGRIF

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 13.4 KB
RevLine 
[2539]1#!/bin/bash
[2500]2#############################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
[2354]5#
[2500]6# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
[2546]7# ----------------------------------------------------------------------
8# NEMO/SETTE , NEMO Consortium (2010)
9# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
10# ----------------------------------------------------------------------
11#
[2500]12#############################################################
13#set -x
14set -o posix
15#set -u
16#set -e
17#+
[2354]18#
[2500]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#
[2545]37# principal script is sette.sh, that calls
[2500]38#
[2545]39#  makenemo
40#
41#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe
42#
43#   (and its link opa in ${CONFIG_NAME}/EXP00)
44#
45#  param.cfg : sets and loads following directories
46#
47#   Executing directory (EXE_DIR)
48#
[2675]49
[2545]50#
51#   Input files storing (INPUT_DIR)
52#
53#   Temporary directory (if needed) (TMPDIR)
[2665]54#
55#   Validation directory (NEMO_VALIDATION_DIR)
[2545]56#
57#   (note: this file is the same for all configrations to be tested with sette)
58#
[2665]59#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
[2545]60#
61#  set_namelist : function declared in all_functions that set namelist parameters for tests
62#
63#  fcm_job.sh
64#
[2665]65#   runs job and saves output files (grid_files, restarts, ice_evolu, ftrace.out)
66#
67#   and it creates tree of VALIDATION, in which there are restart files, solver.stat and ocean.output
68#
69#   Tree of VALIDATION is:
70#
71#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
[2545]72#
[2665]73#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
[2545]74#
75#   (note other files can be saved adding at the end of fcm_job list of saved files)
76#
77#  NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory
78#
[2665]79#  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory
[2545]80#
81#  in ${SETTE_DIR} is created output.sette with the echo of commands run
82#
83#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
84#
85#  if you run: ./sette.sh 2>&1 | tee out.sette
86#
87#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
88#
89#
[2500]90# EXAMPLES
91# ========
92#
93# ::
94#
95#  $ ./sette.sh
96#
97#
[2354]98# TODO
99# ====
100#
101# option debug
102#
103# EVOLUTIONS
104# ==========
105#
[2500]106# $Id$
[2354]107#
108#   * creation
[2500]109#
[2354]110#-
111#
[2716]112#-
113# Compiler among those in NEMOGCM/ARCH
[2725]114COMPILER=gfortran_linux
[2675]115
[2716]116# Directory to run the tests
117SETTE_DIR=$(cd $(dirname "$0"); pwd)
118MAIN_DIR=${SETTE_DIR%/SETTE}
119CONFIG_DIR=${MAIN_DIR}/CONFIG
120TOOLS_DIR=${MAIN_DIR}/TOOLS
121COMPIL_DIR=${TOOLS_DIR}/COMPILE
[2494]122
[2725]123CMP_NAM=${1:-$COMPILER}
[2675]124## NBTEST=6
125## echo "TOTAL NUMBER OF TEST" ${NBTEST}
126## for (( config=2; config<=${NBTEST}; config++ ))
[2354]127
[2732]128for config in 1 2 3 4 5 6 7
[2675]129do
[2354]130
[2675]131if [ ${config} -eq 1 ] ;  then
132    # Restartability tests for GYRE_LOBSTER
133    cd ${SETTE_DIR}
[2716]134    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc"
[2675]135    cd ${SETTE_DIR}
136    . param.cfg
137    . all_functions.sh
138    set_namelist namelist cn_exp \"GYRELOB_LONG\"
139    set_namelist namelist nn_it000 1
140    set_namelist namelist nn_itend 120
141    set_namelist namelist nn_stock 60
[2716]142    set_namelist namelist ln_clobber .true.
[2675]143    set_namelist namelist_top ln_trcrad .false.
144    cd ${SETTE_DIR}
145    . ./fcm_job.sh input_GYRE.cfg 1 LONG
146   
147    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
148    set_namelist namelist nn_it000 61
149    set_namelist namelist nn_itend 120
150    set_namelist namelist nn_stock 60
151    set_namelist namelist ln_rstart .true.
152    set_namelist namelist nn_rstctl 2
[2716]153    set_namelist namelist ln_clobber .true.
154    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart.nc\"
[2675]155    set_namelist namelist_top ln_trcrad .false.
156    set_namelist namelist_top ln_rsttr .true.
157    set_namelist namelist_top nn_rsttr 2
158    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
159    cd ${SETTE_DIR}
160    . ./fcm_job.sh input_GYRE.cfg 1 SHORT
161fi
162
163if [ ${config} -eq 2 ] ;  then
[2716]164# Restartability tests for ORCA2_LIM_PISCES
[2675]165    cd ${SETTE_DIR}
[2716]166    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
[2675]167    cd ${SETTE_DIR}
168    . param.cfg
169    . all_functions.sh
170    set_namelist namelist cn_exp \"O2LP_LONG\"
171    set_namelist namelist nn_it000 1
172    set_namelist namelist nn_itend 150
173    set_namelist namelist nn_stock 75
[2716]174    set_namelist namelist ln_clobber .true.
[2675]175    set_namelist namelist_top ln_trcrad .false.
176    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
177    # if not you need input files, and for tests is not necessary
178    set_namelist namelist_pisces ln_pisdmp .false.
179    set_namelist namelist_pisces ln_dustfer .false.
180    set_namelist namelist_pisces ln_river .false.
181    set_namelist namelist_pisces ln_ndepo .false.
182    set_namelist namelist_pisces ln_sedinput .false.
183    cd ${SETTE_DIR}
184    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 LONG
185   
[2725]186#    cd ${SETTE_DIR}
187#    . ../CONFIG/makenemo -n ORCA2LIMPIS_SHORT -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
[2675]188    cd ${SETTE_DIR}
189    . param.cfg
190    . all_functions.sh
191    set_namelist namelist cn_exp \"O2LP_SHORT\"
192    set_namelist namelist nn_it000 76
193    set_namelist namelist nn_itend 150
194    set_namelist namelist nn_stock 75
195    set_namelist namelist ln_rstart .true.
196    set_namelist namelist nn_rstctl 2
[2716]197    set_namelist namelist ln_clobber .true.
198    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart.nc\"
[2725]199    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice.nc\"
[2675]200    set_namelist namelist_top ln_trcrad .false.
201    set_namelist namelist_top ln_rsttr .true.
202    set_namelist namelist_top nn_rsttr 2
203    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
204    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput
205    # if not you need input files, and for tests is not necessary
206    set_namelist namelist_pisces ln_pisdmp .false.
207    set_namelist namelist_pisces ln_dustfer .false.
208    set_namelist namelist_pisces ln_river .false.
209    set_namelist namelist_pisces ln_ndepo .false.
210    set_namelist namelist_pisces ln_sedinput .false.
211    cd ${SETTE_DIR}
212    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 SHORT
213fi
214
215if [ ${config} -eq 3 ] ;  then
[2716]216    ## Restartability tests for POMME
[2675]217    cd ${SETTE_DIR}
[2725]218    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME
[2675]219    cd ${SETTE_DIR}
220    . param.cfg
221    . all_functions.sh
222    set_namelist namelist cn_exp \"POMME_LONG\"
223    set_namelist namelist nn_it000 1
224    set_namelist namelist nn_itend 600
[2716]225    set_namelist namelist ln_clobber .true.
[2675]226    cd ${SETTE_DIR}
227    . ./fcm_job.sh input_POMME.cfg 1 LONG
228   
229    cd ${SETTE_DIR}
230    set_namelist namelist cn_exp \"POMME_SHORT\"
231    set_namelist namelist nn_it000 301
232    set_namelist namelist nn_itend 600
233    set_namelist namelist nn_stock 300
234    set_namelist namelist ln_rstart .true.
235    set_namelist namelist nn_rstctl 2
[2716]236    set_namelist namelist ln_clobber .true.
237    set_namelist namelist cn_ocerst_in \"POMME_LONG_00000075_restart.nc\"
238    mv ${OUTPUT_DIR}/restart.obc.output ${OUTPUT_DIR}/restart.obc
[2675]239    cd ${SETTE_DIR}
240    . ./fcm_job.sh input_POMME.cfg 1 SHORT
241fi
242
243if [ ${config} -eq 4 ] ;  then
[2716]244    ## Reproducilibity tests for GYRE_LOBSTER
[2675]245    cd ${SETTE_DIR}
[2716]246    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_1_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_diatrc"
[2675]247    cd ${SETTE_DIR}
248    . param.cfg
249    . all_functions.sh
250    set_namelist namelist nn_it000 1
251    set_namelist namelist nn_itend 75
252    set_namelist namelist nn_fwb 0
253    set_namelist namelist nn_bench 0
254    set_namelist namelist ln_ctl .false.
[2716]255    set_namelist namelist ln_clobber .true.
256    set_namelist namelist jpni 1
257    set_namelist namelist jpnj 4
258    set_namelist namelist jpnij 4
[2675]259    cd ${SETTE_DIR}
260    . ./fcm_job.sh input_GYRE.cfg 4 SHORT
261   
262    cd ${SETTE_DIR}
[2716]263    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_2_2 -r GYRE_LOBSTER add_key "key_mpp_rep key_mpp_mpi" del_key "key_vectopt_loop key_diatrc"
[2675]264    cd ${SETTE_DIR}
265    . param.cfg
266    . all_functions.sh
267    set_namelist namelist nn_it000 1
268    set_namelist namelist nn_itend 75
269    set_namelist namelist nn_fwb 0
270    set_namelist namelist ln_ctl .false.
[2716]271    set_namelist namelist ln_clobber .true.
272    set_namelist namelist jpni 2
273    set_namelist namelist jpnj 2
274    set_namelist namelist jpnij 4
[2675]275    cd ${SETTE_DIR}
276    . ./fcm_job.sh input_GYRE.cfg 4 SHORT
277fi
278
279if [ ${config} -eq 5 ] ;  then
280    ## Repropducilibity tests for ORCA2_LIM_PISCES
281    cd ${SETTE_DIR}
[2725]282    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_4_4 -r ORCA2_LIM_PISCES add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_dtatrc key_diatrc" 
[2675]283    cd ${SETTE_DIR}
284    . param.cfg
285    . all_functions.sh
286    set_namelist namelist nn_it000 1
287    set_namelist namelist nn_itend 75
288    set_namelist namelist nn_fwb 0
289    set_namelist namelist ln_ctl .false.
[2716]290    set_namelist namelist ln_clobber .true.
291    set_namelist namelist jpni 4
292    set_namelist namelist jpnj 4
293    set_namelist namelist jpnij 16
[2675]294    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
295    # if not you need input files, and for tests is not necessary
296    set_namelist namelist_pisces ln_pisdmp .false.
297    set_namelist namelist_pisces ln_dustfer .false.
298    set_namelist namelist_pisces ln_river .false.
299    set_namelist namelist_pisces ln_ndepo .false.
300    set_namelist namelist_pisces ln_sedinput .false.
301    cd ${SETTE_DIR}
302    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 SHORT
[2716]303   
[2675]304    cd ${SETTE_DIR}
[2725]305    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_2_8 -r ORCA2_LIM_PISCES add_key "key_mpp_rep key_mpp_mpi" del_key "key_vectopt_loop key_dtatrc key_diatrc"
[2675]306    cd ${SETTE_DIR}
307    . param.cfg
308    . all_functions.sh
309    set_namelist namelist nn_it000 1
310    set_namelist namelist nn_itend 75
311    set_namelist namelist nn_fwb 0
312    set_namelist namelist ln_ctl .false.
[2716]313    set_namelist namelist ln_clobber .true.
314    set_namelist namelist jpni 2
315    set_namelist namelist jpnj 8
316    set_namelist namelist jpnij 16
[2675]317    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
318    # if not you need input files, and for tests is not necessary
319    set_namelist namelist_pisces ln_pisdmp .false.
320    set_namelist namelist_pisces ln_dustfer .false.
321    set_namelist namelist_pisces ln_river .false.
322    set_namelist namelist_pisces ln_ndepo .false.
323    set_namelist namelist_pisces ln_sedinput .false.
324    cd ${SETTE_DIR}
325    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 SHORT
326fi
327
328if [ ${config} -eq 6 ] ;  then
[2716]329    ## Reproductibility tests for POMME
[2675]330    cd ${SETTE_DIR}
[2725]331    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_1_4 -r POMME add_key "key_mpp_mpi key_mpp_rep"
[2675]332    cd ${SETTE_DIR}
333    . param.cfg
334    . all_functions.sh
335    set_namelist namelist nn_it000 1
336    set_namelist namelist nn_itend 300
337    set_namelist namelist nn_fwb 0
338    set_namelist namelist ln_ctl .false.
[2716]339    set_namelist namelist ln_clobber .true.
340    set_namelist namelist jpni 1
341    set_namelist namelist jpnj 4
342    set_namelist namelist jpnij 4
[2675]343    cd ${SETTE_DIR}
344    . ./fcm_job.sh input_POMME.cfg 4 SHORT
345   
346    cd ${SETTE_DIR}
[2725]347    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_2_2 -r POMME add_key "key_mpp_mpi key_mpp_rep"
[2675]348    cd ${SETTE_DIR}
349    . param.cfg
350    . all_functions.sh
351    set_namelist namelist nn_it000 1
352    set_namelist namelist nn_itend 300
353    set_namelist namelist nn_fwb 0
354    set_namelist namelist ln_ctl .false.
[2716]355    set_namelist namelist ln_clobber .true.
356    set_namelist namelist jpni 2
357    set_namelist namelist jpnj 2
358    set_namelist namelist jpnij 4
[2675]359    cd ${SETTE_DIR}
360    . ./fcm_job.sh input_POMME.cfg 4 SHORT
361fi
362
[2732]363if [ ${config} -eq 7 ] ;  then
364    ## ORCA2_LIM with Agulhas AGRIF zoom
365    cd ${SETTE_DIR}
366    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM add_key "key_agrif" del_key "key_vectopt_loop key_dtatrc key_diatrc key_zdftmx" 
367    cd ${SETTE_DIR}
368    . param.cfg
369    . all_functions.sh
370    set_namelist namelist nn_it000 1
371    set_namelist namelist nn_itend 75
372    set_namelist namelist ln_ctl .false.
373    set_namelist namelist ln_clobber .true.
374    set_namelist namelist jpni 1
375    set_namelist namelist jpnj 2
376    set_namelist namelist jpnij 2
377    set_namelist 1_namelist nn_it000 1
378    set_namelist 1_namelist nn_itend 150
379    set_namelist 1_namelist ln_ctl .false.
380    set_namelist 1_namelist ln_clobber .true.
381    cd ${SETTE_DIR}
382    . ./fcm_job.sh input_ORCA2_LIM.cfg 1 SHORT
383fi
384
385if [ ${config} -eq 8 ] ;  then
386    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
387    cd ${SETTE_DIR}
388    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_agrif" del_key "key_vectopt_loop key_dtatrc key_diatrc key_zdftmx" 
389    cd ${SETTE_DIR}
390    . param.cfg
391    . all_functions.sh
392    set_namelist namelist nn_it000 1
393    set_namelist namelist nn_itend 75
394    set_namelist namelist ln_ctl .false.
395    set_namelist namelist ln_clobber .true.
396    set_namelist namelist jpni 1
397    set_namelist namelist jpnj 2
398    set_namelist namelist jpnij 2
399    set_namelist 1_namelist nn_it000 1
400    set_namelist 1_namelist nn_itend 150
401    set_namelist 1_namelist ln_ctl .false.
402    set_namelist 1_namelist ln_clobber .true.
403    cd ${SETTE_DIR}
404    . ./fcm_job.sh input_ORCA2_LIM.cfg 2 SHORT
405fi
406
[2675]407done
Note: See TracBrowser for help on using the repository browser.