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.
Changeset 2500 – NEMO

Changeset 2500


Ignore:
Timestamp:
2010-12-21T16:58:15+01:00 (14 years ago)
Author:
flavoni
Message:

changed comments in SETTE scripts, to have doc with sphinx, see ticket #752

Location:
branches/nemo_v3_3_beta/NEMOGCM/SETTE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/SETTE/all_functions.sh

    r2494 r2500  
    3232# =========== 
    3333# 
    34 # 
    35 # Simple job for SET TESTS for NEMO (SETTE) 
    36  
    3734# function superegrep 
    3835# input variable value 
    39  
     36# 
    4037# function set_namelist 
    4138# input namelist_name variable value 
    4239# output namelist 
     40# 
     41# EXAMPLES 
     42# ======== 
     43# 
     44# :: 
     45# 
     46#  $ ./set_namelist.sh namelist          nn_itend        75 
     47#  $ ./set_namelist.sh namelist_ice_lim2 cn_icerst_in  \"00101231_restart_icemod\" 
     48# 
     49# 
     50# TODO 
     51# ==== 
     52# 
     53# option debug 
     54# 
     55# 
     56# EVOLUTIONS 
     57# ========== 
     58# 
     59# $Id$ 
     60# 
     61#   * creation 
     62 
    4363 
    4464# function to find namelists parameters 
     
    5272# function to set namelists parameters 
    5373set_namelist () { 
    54      VAR_NAME=$( supergrep $1 ${INPUT_DIR}/namelist ) 
    55      sed -e "s/${VAR_NAME}/$1=$2/"  ${INPUT_DIR}/namelist > ${INPUT_DIR}/namelist.tmp 
    56      mv ${INPUT_DIR}/namelist.tmp ${INPUT_DIR}/namelist 
     74     VAR_NAME=$( supergrep $2 ${INPUT_DIR}/$1 ) 
     75     sed -e "s/${VAR_NAME}/$2=$3/"  ${INPUT_DIR}/$1 > ${INPUT_DIR}/$1.tmp 
     76     mv ${INPUT_DIR}/$1.tmp ${INPUT_DIR}/$1 
    5777} 
  • branches/nemo_v3_3_beta/NEMOGCM/SETTE/sette.sh

    r2495 r2500  
     1#!/bin/sh 
     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#set -x 
     9set -o posix 
     10#set -u 
     11#set -e 
     12#+ 
     13# 
     14# ================ 
     15# sette.sh 
     16# ================ 
     17# 
     18# ---------------------------------------------- 
     19# Set of tests for NEMO 
     20# ---------------------------------------------- 
     21# 
     22# SYNOPSIS 
     23# ======== 
     24# 
     25# :: 
     26# 
     27#  $ ./sette.sh 
     28# 
     29# DESCRIPTION 
     30# =========== 
     31# 
     32# 
     33# EXAMPLES 
     34# ======== 
     35# 
     36# :: 
     37# 
     38#  $ ./sette.sh  
    139# 
    240# 
     
    644# option debug 
    745# 
    8 # 
    946# EVOLUTIONS 
    1047# ========== 
    1148# 
    12 # $Id: sette.sh 2158 2010-10-28 12:30:03Z sflod $ 
     49# $Id$ 
    1350# 
    1451#   * creation 
     52# 
    1553#- 
    1654# 
    17 # This is the principal script of SETTE  
    18 # here are described some examples to run nemo 
    19 # this script creates MY_CONFIG directory and in this one there is VALIDATION directory 
    20 # in which are stored output files 
    21 # at this point of developpement there is no automatic diff of solver.stat files 
    22 # user have to set duration of the run with set_namelist function 
    23 # and if he wants to do a restart (again with set_namelist function) 
    24 # and then he has to compare by hand output solver.stat 
    25 # 
    26 # USER MODIFICATIONS 
    27 # in sette.sh script : 
    28 #     SETTE_DIR : base directory for SETTE 
    29 #     makenemo -m : machine (compilator); see ./makenemo -m help  
    30 #         -n : config name (in examples config_name_nproci_nprocj), see ./makenemo -n help  
    31 #         -r : reference configuration (if you don't give it you have to choise directories to install) 
    32 #         add_key : to add list of keys (for example to test reproductibility: add_key mpp_rep) 
    33 #         del_key : to del list of keys 
    34 #     and for more details and options of makenemo see ./makenemo -h 
    35 #     set_namelist : to set namelist values  
    36                         (example : to set 75 time steps for one test : namelist nn_itend 75) 
    37                         (        : to change cn_icerst_in name : namelist_ice cn_icerst_in  \"test_00101231_restart_icemod.nc\") 
    38                         (        : to activate control print : namelist ln_ctl \".false.\" ) 
    39 #     fcm_job.sh needs input: input_CONFIG_NAME and TOTAL NUMBER OF PROCS used 
    40 # 
    41 SETTE_DIR=PATH OF SETTE 
     55SETTE_DIR=/PATH/OF/SETTE 
    4256 
    43 echo "starting first test" 
    44 sleep 3 
    45  
    46 # first example: create test for GYRE with nproci=1, nprocj=1, run for 75 time steps 
    4757cd ${SETTE_DIR} 
    4858. ../CONFIG/makenemo -m ifort_linux -n GYRE_1_1 -r GYRE 
     
    5464cd ${SETTE_DIR} 
    5565. ./fcm_job.sh input_GYRE.cfg 1 
    56 echo "finished first test" 
    57 echo "###################" 
    58 sleep 3 
    5966 
    60 echo "starting second test" 
    61 sleep 3 
    62  
    63 # second example: create test for ORCA2_LIM with nproci=1, nprocj=2, run for 75 time steps 
    6467cd ${SETTE_DIR} 
    6568. ../CONFIG/makenemo -n ORCA2_LIM_1_2 add_key "key_mpp_mpi key_nproci=1 key_nprocj=2" 
     
    7174cd ${SETTE_DIR} 
    7275. ./fcm_job.sh input_ORCA2_LIM.cfg 2 
    73 echo "finished second test" 
    74 sleep 3 
    7576 
Note: See TracChangeset for help on using the changeset viewer.