Download Planet Simulator User's Guide

Transcript
32
3.2
CHAPTER 3. RUNNING PUMA
Batch Mode
For long integrations, it is more useful to run puma in batch mode, i.e. start puma
by calling a script that manages the model run. The following script does just
that. Since it is quite long, it is here split to parts with explanations inbetween.
#!/usr/bin/ksh
#
stime=‘date‘
#=========================
# This script runs the atmospheric model PUMA on a linux machine
#
EXP=example
# EXPERIMENT IDENTIFIER
EXPDIR=/castor/home/user/${EXP}
# EXPERIMENT DIRECTORY
MODEL=${EXPDIR}/puma.x
# THE MODEL EXECUTABLE
SCHAUER=1
# TRANSFER OUTPUT TO SCHAUER (1=YES)
SCHAUERDIR=/pf/u/user_account/puma/${EXP} # U-TREE DIRECTORY (FOR OUTPUT)
DATADIR=${EXPDIR}/data
# OUTPUT DIRECTORY
SSTFILE=${EXPDIR}/surface_parameter
# INITIAL DATAFILE (PUMA)
SURFFILE=${EXPDIR}/surface_parameter
# INITIAL DATAFILE (PUMA)
OCEANFILE=${EXPDIR}/ocean_parameter
# INITIAL DATAFILE (OCEANMOD)
LASTYEAR=50
# LAST YEAR TO BE SIMULATED
FTPINT=12
# MONTHS PER TAR-FILE
TMPDIR=${MFHOME}/tmpdir/run$$
#
mkdir -p ${TMPDIR}
cd $TMPDIR
set -ex
mkdir -p ${EXPDIR}
mkdir -p ${DATADIR}
#
OUTYEAR=1
OUTDAY=30
OUTMON=2
OUTFTP=2
TARFILE=${EXP}TAR_0101
#
cp $MODEL $EXPDIR/model.x
#
This first block of the script defines the basic settings, i.e. the directories used,
the length of the integration etc. If SCHAUER is set to 1, all puma output is transferred to the specified directory on the schauer, thus avoiding the users directory