Commit 83da67de authored by Pierre Cazenave's avatar Pierre Cazenave

Merge branch 'master' of gitlab.ecosystem-modelling.pml.ac.uk:pica/fvcom-examples

parents b1732fc4 d870b9ea
......@@ -21,6 +21,7 @@ data
*/run/logs
matlab/mat
shp
*/run/launch
# Run files
FVCOM.*.HP.*
#!/bin/bash
#PBS -l select=4:ncpus=8:mpiprocs=8
#PBS -l place=scatter
#PBS -N FVCOM.32.HP
echo "=== begin of FVCOM section"
date
cat $PBS_NODEFILE
NNODES=`cat $PBS_NODEFILE | uniq | wc -l`
NTASKS=`cat $PBS_NODEFILE | wc -l`
echo $PBS_NODEFILE $NTASKS $NNODES > $HOME/run.log
cp $PBS_NODEFILE $HOME
CFILE=/tmp/mpd2.console_bench_$PBS_JOBID
source /opt/intel/fce/10.1.012/bin/ifortvars.sh
source /opt/intel/cce/10.1.012/bin/iccvars.sh
source /opt/mpi/mpibull2-1.3.5-4.t/share/setenv_mpibull2.sh
source /opt/intel/idbe/10.1.012/bin/idbvars.sh
export IDB_HOME=/opt/intel/idbe/10.1.012/bin/
mpibull2-devices -d=ibmr_gen2
export NUM_RDMA_BUFFER=0
export MPIBULL2_USE_POSTAL=0
ulimit -Ss unlimited
PF=`date +%y%m%d-%H%M%S`
RUNDIR=/home_nfs/pica/models/FVCOM/fvcom-examples/Estuary/run
EXE=${RUNDIR}/fvcom
CASENAME=tst
#WDIR=${DATA}-${PF}-${NTASKS}
WDIR=`pwd`
cd $RUNDIR
pwd
echo "working directory : $WDIR"
driver=`mpibull2-devices -c | grep "driver" | cut -d":" -f2 | sed "s, ,,"`
if [ "x$driver" != "xibmr_gen2" ]
then
echo "driver = |${driver}|"
echo "Cannot set comm driver to ibmr_gen2!"
exit
fi
export LD_PRELOAD=/home_nfs/bench/libaffinity/arch/mpibull2-1.3.5/lib/libmpiaffinity.so
export LD_LIBRARY_PATH=/home_nfs/pica/src/UK-FVCOM/FVCOM/PML/src/FVCOM_source/libs/install/lib/:$LD_LIBRARY_PATH
if [ "8" == "8" ]
then
export MPI_SETAFFINITY=rank
else
export MPI_SETAFFINITY=topo:scatter,L2
fi
export MKL_SERIAL=yes
export OMP_NUM_THREADS=1
# following two lines needed for core dumping
export decfort_dump_flag=y
ulimit -c unlimited
export F_UFMTENDIAN=77,78
touch logs/info
date >> logs/info
env >> logs/info
ulimit -a >> logs/info
cat $PBS_NODEFILE >> logs/info
mpibull2-devices -c > logs/mpi.device
echo "$NNODES $NTASKS"
echo "running fvcom ..."
pwd
LF=logs/$CASENAME.$NNODES.$NTASKS.log
time mpirun -np $NTASKS $EXE --casename $CASENAME --dbg=0 | tee $LF
for node in `cat $PBS_NODEFILE | uniq ` ; do ssh $node "rm -f $CFILE" ; done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -13,10 +13,11 @@
! !
&NML_CASE
CASE_TITLE = 'IDEAL ESTUARY CASE'
TIMEZONE = 'none',
TIMEZONE = 'UTC',
DATE_FORMAT = 'YMD'
START_DATE = 'seconds=0.0'
END_DATE = 'days=3.0'
DATE_REFERENCE = 'default',
START_DATE = '2013-04-01 00:00:00'
END_DATE = '2013-04-30 00:00:00'
/
&NML_STARTUP
STARTUP_TYPE = 'coldstart' ,
......@@ -26,10 +27,12 @@
STARTUP_TS_TYPE = 'constant' ,
STARTUP_T_VALS = 15.0 ,
STARTUP_S_VALS = 35.0 ,
STARTUP_U_VALS = 0.0,
STARTUP_V_VALS = 0.0,
STARTUP_DMAX = -10.00000
/
&NML_IO
INPUT_DIR = '../tstinp' ,
INPUT_DIR = './tstinp' ,
OUTPUT_DIR = './output' ,
IREPORT = 40,
VISIT_ALL_VARS = F,
......@@ -45,16 +48,17 @@
/
&NML_RESTART
RST_ON = F,
RST_FIRST_OUT = 'cycle = 0' ,
RST_OUT_INTERVAL = 'cycle = 200' ,
RST_FIRST_OUT = '2013-04-01 00:00:00' ,
RST_OUT_INTERVAL = 'seconds=3600' ,
RST_OUTPUT_STACK = 0
/
&NML_NETCDF
NC_ON = T,
NC_FIRST_OUT = 'seconds=0.0',
NC_FIRST_OUT = '2013-04-01 00:00:00',
NC_OUT_INTERVAL = 'seconds=3600.' ,
NC_OUTPUT_STACK = 0,
NC_GRID_METRICS = F,
NC_GRID_METRICS = T,
NC_FILE_DATE = T,
NC_VELOCITY = T,
NC_SALT_TEMP = T,
NC_TURBULENCE = T,
......@@ -89,16 +93,16 @@
NCAV_VORTICITY = F
/
&NML_SURFACE_FORCING
wIND_ON = F,
WIND_TYPE = 'stress' ,
WIND_FILE = 'wrf_for.nc' ,
wIND_ON = T,
WIND_TYPE = 'speed' ,
WIND_FILE = 'tst_wnd.nc' ,
WIND_KIND = 'variable' ,
WIND_X = 0.0000000E+00,
WIND_Y = 0.0000000E+00,
HEATING_ON = F,
HEATING_TYPE = 'flux' ,
HEATING_KIND = 'variable' ,
HEATING_FILE = 'wrf_for.nc' ,
HEATING_FILE = 'tst_wnd.nc' ,
HEATING_LONGWAVE_LENGTHSCALE = 6.3 ,
HEATING_LONGWAVE_PERCTAGE = 0.78000000 ,
HEATING_SHORTWAVE_LENGTHSCALE = 1.4000000 ,
......@@ -109,16 +113,15 @@
PRECIPITATION_FILE = 'wrf_for.nc' ,
PRECIPITATION_PRC = 0.0000000E+00,
PRECIPITATION_EVP = 0.0000000E+00,
AIRPRESSURE_ON = F,
AIRPRESSURE_KIND = 'none' ,
AIRPRESSURE_FILE = 'none' ,
AIRPRESSURE_ON = T,
AIRPRESSURE_KIND = 'variable' ,
AIRPRESSURE_FILE = 'tst_wnd.nc' ,
AIRPRESSURE_VALUE = 0.0000000E+00
/
&NML_HEATING_CALCULATED
HEATING_CALCULATE_ON = F,
HEATING_CALCULATE_ON = T,
HEATING_CALCULATE_TYPE = 'flux',
HEATING_CALCULATE_FILE = irish_sea_v20_wnd.nc,
HEATING_CALCULATE_FILE = tst_wnd.nc,
HEATING_CALCULATE_KIND = variable,
ZUU = 10.0,
ZTT = 1.5,
......@@ -160,7 +163,7 @@
ADCOR_ON = F
/
&NML_RIVER_TYPE
RIVER_NUMBER = 3,
RIVER_NUMBER = 0,
RIVER_TS_SETTING = 'specified'
RIVER_INFLOW_LOCATION = 'edge'
RIVER_INFO_FILE = 'RIVERS_NAMELIST.nml'
......
This diff is collapsed.
......@@ -2,15 +2,60 @@
# Script to generate a .pbs file and launch the job.
if [ $# -ne 2 ]; then
echo "Usage: $(basename $0) NPROCS TEMPLATE"
exit 1
fi
MODELS=(models/*.nml) # model namelists
TPN=8
PROCS=$1
NODES=$(($PROCS/$TPN))
TEMPLATE=$2
TEMPLATE=../../$2
for ((m=0; m<${#MODELS[@]}; m++)); do
# Create a run directory for this model.
SUFFIX=$(echo ${MODELS[m]} | cut -f2- -d_ | sed 's/_run.nml//g')
PBS=estuary.p$PROCS.n$NODES.$SUFFIX.pbs
# The launch directory should have only symlinks in it.
if [ ! -d ./launch/$SUFFIX ]; then
mkdir -p ./launch/$SUFFIX
else
mv ./launch/$SUFFIX/FVCOM.* logs
fi
find ./launch/$SUFFIX/ -type l -delete
# Make the relevant output directory
if [ ! -d ./output/$SUFFIX ]; then
mkdir -p ./output/$SUFFIX
fi
cd ./launch/$SUFFIX
# Prep the launch directory.
ln -s ../../${MODELS[m]} tst_run.nml
ln -s ../../../tstinp
ln -s ../../output/$SUFFIX output
ln -s ../../logs
ln -s ../../fvcom
# Fix the PBS file.
sed "s,__NODES__,$NODES,g;s,__TPN__,$TPN,g;s,__POPMOD__,HP,g;s,__TASKS__,$PROCS,g" $TEMPLATE > $PBS
sed -i 's,^RUNDIR=/home_nfs/pica/models/FVCOM/fvcom-examples/Estuary/run,RUNDIR=/home_nfs/pica/models/FVCOM/fvcom-examples/Estuary/run/launch/'${SUFFIX}',g' $PBS
#sed -i 's/^CASENAME=tst/CASENAME=tst_'${SUFFIX}'/g' $PBS
# GO! GO! GO!
qsub -qworkq $PBS
rm $PBS
PBS=estuary.p$PROCS.n$NODES.pbs
sed "s,__NODES__,$NODES,g;s,__TPN__,$TPN,g;s,__POPMOD__,HP,g;s,__TASKS__,$PROCS,g" $TEMPLATE > $PBS
cd ~-
mv FVCOM.* logs
qsub -qworkq $PBS
done
......@@ -3,7 +3,8 @@
# Convert the input to lat/long (assuming the proj line in the nml is
# right...).
awk '{if (NF == 4 && NR > 3) print , }' tst_grd.dat | \
echo "lonDD,latDD" > grid.csv
awk '{if (NF == 4 && NR > 3) print $2,$3 }' tst_grd.dat | \
invproj -f %.6f \
+proj=tmerc \
+datum=NAD83 \
......@@ -11,5 +12,6 @@ awk '{if (NF == 4 && NR > 3) print , }' tst_grd.dat | \
+lat_0=42d50 \
+k=.9999666666666667 \
+x_0=900000 \
+y_0=0 \
> grid.csv
+y_0=0 |
tr " " "," \
>> grid.csv
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment