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

Last change on this file since 2754 was 2754, checked in by flavoni, 10 years ago

small changes for SETTE tests, see ticket #752

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 12.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# principal script is sette.sh, that calls
38#
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#
49
50#
51#   Input files storing (INPUT_DIR)
52#
53#   Temporary directory (if needed) (TMPDIR)
54#
55#   Validation directory (NEMO_VALIDATION_DIR)
56#
57#   (note: this file is the same for all configrations to be tested with sette)
58#
59#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
60#
61#  set_namelist : function declared in all_functions that set namelist parameters for tests
62#
63#  fcm_job.sh
64#
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)
72#
73#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
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#
79#  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory
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#
90# EXAMPLES
91# ========
92#
93# ::
94#
95#  $ ./sette.sh
96#
97#
98# TODO
99# ====
100#
101# option debug
102#
103# EVOLUTIONS
104# ==========
105#
106# $Id$
107#
108#   * creation
109#
110#-
111#
112#-
113# Compiler among those in NEMOGCM/ARCH
114COMPILER=gfortran_linux
115
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
122
123CMP_NAM=${1:-$COMPILER}
124## NBTEST=8
125## echo "TOTAL NUMBER OF TEST" ${NBTEST}
126## for (( config=2; config<=${NBTEST}; config++ ))
127
128for config in 1 2 3 4 5 6 7 8
129do
130
131if [ ${config} -eq 1 ] ;  then
132    # Restartability tests for GYRE_LOBSTER
133    cd ${SETTE_DIR}
134    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc"
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
142    set_namelist namelist ln_clobber .true.
143    set_namelist namelist_top ln_trcrad .false.
144    cd ${SETTE_DIR}
145    . ./fcm_job.sh input_GYRE.cfg 1 LONG
146   
147    cd ${SETTE_DIR}
148    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
149    set_namelist namelist nn_it000 61
150    set_namelist namelist nn_itend 120
151    set_namelist namelist nn_stock 60
152    set_namelist namelist ln_rstart .true.
153    set_namelist namelist nn_rstctl 2
154    set_namelist namelist ln_clobber .true.
155    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart.nc\"
156    set_namelist namelist_top ln_trcrad .false.
157    set_namelist namelist_top ln_rsttr .true.
158    set_namelist namelist_top nn_rsttr 2
159    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
160    cd ${SETTE_DIR}
161    . ./fcm_job.sh input_GYRE.cfg 1 SHORT
162fi
163
164if [ ${config} -eq 2 ] ;  then
165# Restartability tests for ORCA2_LIM_PISCES
166    cd ${SETTE_DIR}
167    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
168    cd ${SETTE_DIR}
169    . param.cfg
170    . all_functions.sh
171    set_namelist namelist cn_exp \"O2LP_LONG\"
172    set_namelist namelist nn_it000 1
173    set_namelist namelist nn_itend 150
174    set_namelist namelist nn_stock 75
175    set_namelist namelist ln_clobber .true.
176    set_namelist namelist_top ln_trcrad .false.
177    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
178    # if not you need input files, and for tests is not necessary
179    set_namelist namelist_pisces ln_pisdmp .false.
180    set_namelist namelist_pisces ln_dustfer .false.
181    set_namelist namelist_pisces ln_river .false.
182    set_namelist namelist_pisces ln_ndepo .false.
183    set_namelist namelist_pisces ln_sedinput .false.
184    cd ${SETTE_DIR}
185    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 LONG
186   
187    cd ${SETTE_DIR}
188    set_namelist namelist cn_exp \"O2LP_SHORT\"
189    set_namelist namelist nn_it000 76
190    set_namelist namelist nn_itend 150
191    set_namelist namelist nn_stock 75
192    set_namelist namelist ln_rstart .true.
193    set_namelist namelist nn_rstctl 2
194    set_namelist namelist ln_clobber .true.
195    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart.nc\"
196    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice.nc\"
197    set_namelist namelist_top ln_trcrad .false.
198    set_namelist namelist_top ln_rsttr .true.
199    set_namelist namelist_top nn_rsttr 2
200    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
201    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput
202    # if not you need input files, and for tests is not necessary
203    set_namelist namelist_pisces ln_pisdmp .false.
204    set_namelist namelist_pisces ln_dustfer .false.
205    set_namelist namelist_pisces ln_river .false.
206    set_namelist namelist_pisces ln_ndepo .false.
207    set_namelist namelist_pisces ln_sedinput .false.
208    cd ${SETTE_DIR}
209    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 SHORT
210fi
211
212if [ ${config} -eq 3 ] ;  then
213    ## Restartability tests for POMME
214    cd ${SETTE_DIR}
215    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME
216    cd ${SETTE_DIR}
217    . param.cfg
218    . all_functions.sh
219    set_namelist namelist cn_exp \"POMME_LONG\"
220    set_namelist namelist nn_it000 1
221    set_namelist namelist nn_itend 600
222    set_namelist namelist ln_clobber .true.
223    cd ${SETTE_DIR}
224    . ./fcm_job.sh input_POMME.cfg 1 LONG
225   
226    cd ${SETTE_DIR}
227    set_namelist namelist cn_exp \"POMME_SHORT\"
228    set_namelist namelist nn_it000 301
229    set_namelist namelist nn_itend 600
230    set_namelist namelist nn_stock 300
231    set_namelist namelist ln_rstart .true.
232    set_namelist namelist nn_rstctl 2
233    set_namelist namelist ln_clobber .true.
234    set_namelist namelist cn_ocerst_in \"POMME_LONG_00000075_restart.nc\"
235    mv ${OUTPUT_DIR}/restart.obc.output ${OUTPUT_DIR}/restart.obc
236    cd ${SETTE_DIR}
237    . ./fcm_job.sh input_POMME.cfg 1 SHORT
238fi
239
240if [ ${config} -eq 4 ] ;  then
241    ## Reproducilibity tests for GYRE_LOBSTER
242    cd ${SETTE_DIR}
243    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_diatrc"
244    cd ${SETTE_DIR}
245    . param.cfg
246    . all_functions.sh
247    set_namelist namelist cn_exp \"GYRELOB_14\"
248    set_namelist namelist nn_it000 1
249    set_namelist namelist nn_itend 75
250    set_namelist namelist nn_fwb 0
251    set_namelist namelist nn_bench 0
252    set_namelist namelist ln_ctl .false.
253    set_namelist namelist ln_clobber .true.
254    set_namelist namelist jpni 1
255    set_namelist namelist jpnj 4
256    set_namelist namelist jpnij 4
257    cd ${SETTE_DIR}
258    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_1_4
259   
260    cd ${SETTE_DIR}
261    set_namelist namelist cn_exp \"GYRELOB_22\"
262    set_namelist namelist nn_it000 1
263    set_namelist namelist nn_itend 75
264    set_namelist namelist nn_fwb 0
265    set_namelist namelist ln_ctl .false.
266    set_namelist namelist ln_clobber .true.
267    set_namelist namelist jpni 2
268    set_namelist namelist jpnj 2
269    set_namelist namelist jpnij 4
270    cd ${SETTE_DIR}
271    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_2_2
272fi
273
274if [ ${config} -eq 5 ] ;  then
275    ## Repropducilibity tests for ORCA2_LIM_PISCES
276    cd ${SETTE_DIR}
277    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_dtatrc key_diatrc" 
278    cd ${SETTE_DIR}
279    . param.cfg
280    . all_functions.sh
281    set_namelist namelist nn_it000 1
282    set_namelist namelist nn_itend 75
283    set_namelist namelist nn_fwb 0
284    set_namelist namelist ln_ctl .false.
285    set_namelist namelist ln_clobber .true.
286    set_namelist namelist jpni 4
287    set_namelist namelist jpnj 4
288    set_namelist namelist jpnij 16
289    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
290    # if not you need input files, and for tests is not necessary
291    set_namelist namelist_pisces ln_pisdmp .false.
292    set_namelist namelist_pisces ln_dustfer .false.
293    set_namelist namelist_pisces ln_river .false.
294    set_namelist namelist_pisces ln_ndepo .false.
295    set_namelist namelist_pisces ln_sedinput .false.
296    cd ${SETTE_DIR}
297    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_4_4
298   
299    cd ${SETTE_DIR}
300    set_namelist namelist nn_it000 1
301    set_namelist namelist nn_itend 75
302    set_namelist namelist nn_fwb 0
303    set_namelist namelist ln_ctl .false.
304    set_namelist namelist ln_clobber .true.
305    set_namelist namelist jpni 2
306    set_namelist namelist jpnj 8
307    set_namelist namelist jpnij 16
308    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
309    # if not you need input files, and for tests is not necessary
310    set_namelist namelist_pisces ln_pisdmp .false.
311    set_namelist namelist_pisces ln_dustfer .false.
312    set_namelist namelist_pisces ln_river .false.
313    set_namelist namelist_pisces ln_ndepo .false.
314    set_namelist namelist_pisces ln_sedinput .false.
315    cd ${SETTE_DIR}
316    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_2_8
317fi
318
319if [ ${config} -eq 6 ] ;  then
320    ## Reproductibility tests for POMME
321    cd ${SETTE_DIR}
322    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_4 -r POMME add_key "key_mpp_mpi key_mpp_rep"
323    cd ${SETTE_DIR}
324    . param.cfg
325    . all_functions.sh
326    set_namelist namelist nn_it000 1
327    set_namelist namelist nn_itend 300
328    set_namelist namelist nn_fwb 0
329    set_namelist namelist ln_ctl .false.
330    set_namelist namelist ln_clobber .true.
331    set_namelist namelist jpni 1
332    set_namelist namelist jpnj 4
333    set_namelist namelist jpnij 4
334    cd ${SETTE_DIR}
335    . ./fcm_job.sh input_POMME.cfg 4 REPRO_1_4
336   
337    cd ${SETTE_DIR}
338    set_namelist namelist nn_it000 1
339    set_namelist namelist nn_itend 300
340    set_namelist namelist nn_fwb 0
341    set_namelist namelist ln_ctl .false.
342    set_namelist namelist ln_clobber .true.
343    set_namelist namelist jpni 2
344    set_namelist namelist jpnj 2
345    set_namelist namelist jpnij 4
346    cd ${SETTE_DIR}
347    . ./fcm_job.sh input_POMME.cfg 4 REPRO_2_2
348fi
349
350if [ ${config} -eq 7 ] ;  then
351    ## ORCA2_LIM with Agulhas AGRIF zoom
352    cd ${SETTE_DIR}
353    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM add_key "key_agrif" del_key "key_vectopt_loop key_zdftmx" 
354    cd ${SETTE_DIR}
355    . param.cfg
356    . all_functions.sh
357    set_namelist namelist nn_it000 1
358    set_namelist namelist nn_itend 75
359    set_namelist namelist ln_ctl .false.
360    set_namelist namelist ln_clobber .true.
361    set_namelist 1_namelist nn_it000 1
362    set_namelist 1_namelist nn_itend 150
363    set_namelist 1_namelist ln_ctl .false.
364    set_namelist 1_namelist ln_clobber .true.
365    cd ${SETTE_DIR}
366    . ./fcm_job.sh input_ORCA2_LIM.cfg 1 SHORT
367fi
368
369if [ ${config} -eq 8 ] ;  then
370    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
371    cd ${SETTE_DIR}
372    . ../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_zdftmx" 
373    cd ${SETTE_DIR}
374    . param.cfg
375    . all_functions.sh
376    set_namelist namelist nn_it000 1
377    set_namelist namelist nn_itend 75
378    set_namelist namelist ln_ctl .false.
379    set_namelist namelist ln_clobber .true.
380    set_namelist namelist jpni 1
381    set_namelist namelist jpnj 2
382    set_namelist namelist jpnij 2
383    set_namelist 1_namelist nn_it000 1
384    set_namelist 1_namelist nn_itend 150
385    set_namelist 1_namelist ln_ctl .false.
386    set_namelist 1_namelist ln_clobber .true.
387    cd ${SETTE_DIR}
388    . ./fcm_job.sh input_ORCA2_LIM.cfg 2 SHORT
389fi
390
391done
Note: See TracBrowser for help on using the repository browser.