-
Notifications
You must be signed in to change notification settings - Fork 11
prep.slurm
This requires the wrf_ecmwf_metgrid_templates.
#!/bin/bash --login#SBATCH --nodes=8 #SBATCH --ntasks-per-node=20 #SBATCH --threads-per-core=1 #SBATCH --job-name=prep_wrf #SBATCH --partition=all #SBATCH --time=48:00:00 ##SBATCH --mail-type=ALL #SBATCH --mail-user=pica
set -eu
np=$SLURM_NTASKS #np=${np:-$(nproc)} if [ -z $np ]; then np=1 fi
module load intel || true module load intel-mpi || true module load hdf5-intelmpi || true module load netcdf-intelmpi || true
export WORKDIR=$(readlink -f $(pwd))
export OMP_NUM_THREADS=1
export I_MPI_PIN_PROCS=0-19 export I_MPI_EXTRA_FILESYSTEM=on export I_MPI_EXTRA_FILESYSTEM_LIST=gpfs export I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so
cd $WORKDIR
namelist=templates/namelist.wps years=(2011) grids=(grids/geo_em.d??.nc)
for year in ${years[@]}; do if [ ! -d ./$year ]; then mkdir ./$year fi
(
cd $year
# Link to the model grids.
for grid in ${grids[@]}; do
if [ ! -h $(basename $grid) ]; then
ln -s ../$grid
fi
done
# Do not clobber old namelists.
if [ -f namelist.wps ]; then
mv namelist.wps namelist.wps.$$
fi
cp ../$namelist namelist.wps
sed -i 's/2002-'/$year-'/g' namelist.wps
sed -i 's/2003-'/$(($year + 1))-'/g' namelist.wps
echo "about to launch srun..."
srun -K -n $np ../bin/metgrid.exe
# Tidy up
rm namelist.wps
for grid in ${grids[@]}; do
rm $(basename $grid)
done
)
done
For questions regarding FVCOM, to contribute to the wiki please subscribe to the mailing list uk-fvcom mailing list If you would like to cite FVCOM, please refer to its main publication and/or URLs.
Background
=== FVCOM Wiki ===
User guide
-
Additional information of less frequent usage in no particular order