[2656] | 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 |
---|
| 14 | set -o posix |
---|
| 15 | #set -u |
---|
| 16 | #set -e |
---|
| 17 | #+ |
---|
| 18 | # |
---|
[2665] | 19 | # =================== |
---|
| 20 | # sette_beginner.sh |
---|
| 21 | # =================== |
---|
[2656] | 22 | # |
---|
| 23 | # ---------------------------------------------- |
---|
[2665] | 24 | # Set of tests for NEMO for beginners |
---|
[2656] | 25 | # ---------------------------------------------- |
---|
| 26 | # |
---|
| 27 | # SYNOPSIS |
---|
| 28 | # ======== |
---|
| 29 | # |
---|
| 30 | # :: |
---|
| 31 | # |
---|
[2665] | 32 | # $ ./sette_beginner.sh |
---|
[2656] | 33 | # |
---|
| 34 | # DESCRIPTION |
---|
| 35 | # =========== |
---|
[2665] | 36 | # First simple example of how to use SETTE: create GYRE_SHORT configuration, compile it with 1 proc, and test it for a SHORT test: 5days |
---|
| 37 | #- |
---|
| 38 | # |
---|
[2754] | 39 | # Compiler among those in NEMOGCM/ARCH |
---|
[3021] | 40 | COMPILER=PW6_VARGAS |
---|
| 41 | export BATCH_COMMAND=llsubmit |
---|
| 42 | export MPI_INTERACT="no" |
---|
[2754] | 43 | |
---|
| 44 | # Directory to run the tests |
---|
[2716] | 45 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
---|
[2754] | 46 | MAIN_DIR=${SETTE_DIR%/SETTE} |
---|
| 47 | CONFIG_DIR=${MAIN_DIR}/CONFIG |
---|
| 48 | TOOLS_DIR=${MAIN_DIR}/TOOLS |
---|
| 49 | COMPIL_DIR=${TOOLS_DIR}/COMPILE |
---|
| 50 | |
---|
| 51 | CMP_NAM=${1:-$COMPILER} |
---|
[3021] | 52 | # Copy job_batch_COMPILER file for specific compiler into job_batch_template |
---|
| 53 | cd ${SETTE_DIR} |
---|
| 54 | cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit |
---|
[2754] | 55 | |
---|
[2656] | 56 | # Run for GYRE CONFIG |
---|
[2657] | 57 | # small test to start |
---|
[2716] | 58 | # compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file : |
---|
[3021] | 59 | export TEST_NAME="TEST01" |
---|
[2656] | 60 | cd ${SETTE_DIR} |
---|
[2754] | 61 | . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE |
---|
[2656] | 62 | cd ${SETTE_DIR} |
---|
| 63 | . param.cfg |
---|
| 64 | . all_functions.sh |
---|
[3021] | 65 | # creation of execution directory |
---|
| 66 | . prepare_exe_dir.sh |
---|
| 67 | cd ${EXE_DIR} |
---|
[2657] | 68 | # setting namelist parameters |
---|
| 69 | # experience name |
---|
[2656] | 70 | set_namelist namelist cn_exp \"GYRE_SHORT\" |
---|
[2657] | 71 | # first time step |
---|
[2656] | 72 | set_namelist namelist nn_it000 1 |
---|
[2657] | 73 | # last time step |
---|
[2656] | 74 | set_namelist namelist nn_itend 120 |
---|
[2657] | 75 | # frequency of creation of a restart file |
---|
[2656] | 76 | set_namelist namelist nn_stock 60 |
---|
| 77 | cd ${SETTE_DIR} |
---|
[2657] | 78 | # run job, with 1 processor, test named SHORT (= 60 time steps) |
---|
[3021] | 79 | . ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME} |
---|