[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 |
---|
| 14 | set -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 | # |
---|
| 49 | # Forcing files storing (FORCING_DIR) |
---|
| 50 | # |
---|
| 51 | # Input files storing (INPUT_DIR) |
---|
| 52 | # |
---|
| 53 | # Temporary directory (if needed) (TMPDIR) |
---|
| 54 | # |
---|
| 55 | # Output files storing (OUTPUT_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 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 (ocean.output, solver.stat, grid_files, restart, ice_evolu, ftrace.out) |
---|
| 66 | # |
---|
| 67 | # (note this job needs to have an input_CONFIG.cfg in which found tar input file) |
---|
| 68 | # |
---|
| 69 | # (note other files can be saved adding at the end of fcm_job list of saved files) |
---|
| 70 | # |
---|
| 71 | # NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory |
---|
| 72 | # |
---|
| 73 | # at the end the directory ${CONFIG_NAME}/EXP00/VALIDATION is created |
---|
| 74 | # |
---|
| 75 | # and output files, solver.stat, ocean.output are put in ${CONFIG_NAME}/EXP00/VALIDATION directory |
---|
| 76 | # |
---|
| 77 | # and restart files and changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory |
---|
| 78 | # |
---|
| 79 | # in ${SETTE_DIR} is created output.sette with the echo of commands run |
---|
| 80 | # |
---|
| 81 | # if sette.sh is stopped in output.sette there is written the last command executed by sette.sh |
---|
| 82 | # |
---|
| 83 | # if you run: ./sette.sh 2>&1 | tee out.sette |
---|
| 84 | # |
---|
| 85 | # in ${SETTE_DIR} out.sette is redirected standard error & standard output |
---|
| 86 | # |
---|
| 87 | # |
---|
[2500] | 88 | # EXAMPLES |
---|
| 89 | # ======== |
---|
| 90 | # |
---|
| 91 | # :: |
---|
| 92 | # |
---|
| 93 | # $ ./sette.sh |
---|
| 94 | # |
---|
| 95 | # |
---|
[2354] | 96 | # TODO |
---|
| 97 | # ==== |
---|
| 98 | # |
---|
| 99 | # option debug |
---|
| 100 | # |
---|
| 101 | # EVOLUTIONS |
---|
| 102 | # ========== |
---|
| 103 | # |
---|
[2500] | 104 | # $Id$ |
---|
[2354] | 105 | # |
---|
| 106 | # * creation |
---|
[2500] | 107 | # |
---|
[2354] | 108 | #- |
---|
| 109 | # |
---|
[2500] | 110 | SETTE_DIR=/PATH/OF/SETTE |
---|
[2494] | 111 | |
---|
[2354] | 112 | cd ${SETTE_DIR} |
---|
| 113 | . ../CONFIG/makenemo -m ifort_linux -n GYRE_1_1 -r GYRE |
---|
| 114 | cd ${SETTE_DIR} |
---|
| 115 | . param.cfg |
---|
[2359] | 116 | . all_functions.sh |
---|
[2494] | 117 | set_namelist namelist nn_it000 1 |
---|
| 118 | set_namelist namelist nn_itend 75 |
---|
[2354] | 119 | cd ${SETTE_DIR} |
---|
| 120 | . ./fcm_job.sh input_GYRE.cfg 1 |
---|
| 121 | |
---|
| 122 | cd ${SETTE_DIR} |
---|
[2539] | 123 | . ../CONFIG/makenemo -n ORCA2_LIM_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_nproci=1 key_nprocj=2" |
---|
[2354] | 124 | cd ${SETTE_DIR} |
---|
| 125 | . param.cfg |
---|
[2359] | 126 | . all_functions.sh |
---|
[2494] | 127 | set_namelist namelist nn_it000 1 |
---|
| 128 | set_namelist namelist nn_itend 75 |
---|
[2354] | 129 | cd ${SETTE_DIR} |
---|
| 130 | . ./fcm_job.sh input_ORCA2_LIM.cfg 2 |
---|
| 131 | |
---|