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 branches/2012/dev_UKMO_2012/NEMOGCM/SETTE – NEMO

source: branches/2012/dev_UKMO_2012/NEMOGCM/SETTE/sette_beginner.sh @ 3603

Last change on this file since 3603 was 3603, checked in by rfurner, 11 years ago

Changes from trunk, revision 3452 to 3555 merged in

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