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_beginner.sh in trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette_beginner.sh @ 3388

Last change on this file since 3388 was 3336, checked in by clevy, 12 years ago

SETTE bugfixes see ticket #941

  • Property svn:executable set to *
File size: 2.5 KB
RevLine 
[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#############################################################
[3336]13#set -vx
[2656]14set -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
[3294]40COMPILER=PW6_VARGAS
[3336]41export BATCH_COMMAND_PAR="llsubmit"
42export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
43# export MPI_INTERACT="no"
[2754]44
45# Directory to run the tests
[2716]46SETTE_DIR=$(cd $(dirname "$0"); pwd)
[2754]47MAIN_DIR=${SETTE_DIR%/SETTE}
48CONFIG_DIR=${MAIN_DIR}/CONFIG
49TOOLS_DIR=${MAIN_DIR}/TOOLS
50COMPIL_DIR=${TOOLS_DIR}/COMPILE
51
52CMP_NAM=${1:-$COMPILER}
[3294]53# Copy job_batch_COMPILER file for specific compiler into job_batch_template
54cd ${SETTE_DIR}
55cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
[2754]56
[2656]57# Run for GYRE CONFIG
[2657]58# small test to start
[2716]59# compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file :
[3336]60export TEST_NAME="TEST02"
[2656]61cd ${SETTE_DIR}
[2754]62. ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE
[2656]63cd ${SETTE_DIR}
64. param.cfg
65. all_functions.sh
[3294]66# creation of execution directory
67. prepare_exe_dir.sh
[3336]68JOB_FILE=${EXE_DIR}/run_job.sh
[3294]69cd ${EXE_DIR}
[2657]70# setting namelist parameters
71# experience name
[2656]72set_namelist namelist cn_exp \"GYRE_SHORT\"
[2657]73# first time step
[2656]74set_namelist namelist nn_it000 1
[2657]75# last time step
[2656]76set_namelist namelist nn_itend 120
[2657]77# frequency of creation of a restart file
[2656]78set_namelist namelist nn_stock 60
[3336]79
[2656]80cd ${SETTE_DIR}
[3336]81# . ./prepare_job.sh input_file_config_name NB_PROCS TEST_NAME MPI_FLAG JOB_FILE
82. ./prepare_job.sh input_GYRE.cfg 1 SHORT no $JOB_FILE
[2657]83# run job, with 1 processor, test named SHORT (= 60 time steps)
[3336]84#. ./fcm_job.sh NB_PROCS JOB_FILE INTERACT_FLAG MPI_FLAG
85    cd ${SETTE_DIR}   
86. ./fcm_job.sh 1 $JOB_FILE no no
87
Note: See TracBrowser for help on using the repository browser.