Wave model : WW3¶
General presentation¶
The WAVEWATCH III modelling framework was originally developped by Hendrik Tolman. WAVEWATCH III (R) is a registered trade mark of the National Weather Service (NOAA/NWS). Others have joined the development team, this is the case of SHOM and now Ifremer (with particular emphasis on the parameterization of physical processes and wave-current interactions), and the Technical University of Darmstadt (numerical schemes on triangle-based meshes).
The purpose of these pages is to summarize the main instructions, but it is not a WW3 documentation. The reader must visit the WAVEWATCH III official website ww3ncep to use WW3 properly. The general documentation is available under ww3ncepdoc and IFREMER ww3ifremer pages might also be usefull.
Downloading (IFREMER version)¶
svn export --username $extranet_login https://forge.ifremer.fr/svn/ww3/trunk/model
Compilation¶
Please follow the general instructions under ww3wikiinstall
Summary in 3 steps :
Environment
use the libraries you prefer, for instance:
module purge ; module load mpt/2.06 intel-comp/12.1.5 or module purge ; module load intel-comp/12.1.5 intel-mpi/4.0.0.028
in .cshrc file, add the following lines:
setenv WWATCH3_NETCDF NC4 setenv WWATCH3_ENV /path/WW3/trunk/model/wwatch3.env
and:
setenv NETCDF_CONFIG /export/home13/previmer/op/bin/netcdf4.1.2_mpt/bin/nc-config setenv NETCDF_CONFIG /appli/netCDF/netcdf4.1.2_mpt/bin/nc-config #setenv NETCDF_CONFIG /appli/netCDF/netcdf-4.2.1__intel-12.1.5_mpt-2.06/bin/nc-config setenv OASISDIR /home3/caparmor/marsdev/OASIS/oasis3-mct/compile_oa3-mct_mpt2.06 setenv OASISDIR /home10/caparmor/previmer/users/devww3/OASIS/work_oasis3-mct-mpt2.06-comp-12.1.5 with mpt/2.06 intel-comp/12.1.5 modules
or:
#setenv NETCDF_CONFIG /export/home13/previmer/op/bin/netcdf4.1.2_par/bin/nc-config setenv NETCDF_CONFIG /appli/netCDF/netcdf4.1.2_par/bin/nc-config; #setenv OASISDIR /home3/caparmor/marsdev/OASIS/oasis3-mct/compile_oa3-mct_mpi4.0/ setenv OASISDIR /home10/caparmor/previmer/users/devww3/OASIS/work_oasis3-mct-mpi-4.0.0.028-comp-12.1.5 with intel-comp/12.1.5 intel-mpi/4.0.0.028 modules
create under path/WW3/trunk/model the wwatch3.env file like:
# # Environment variables for wavewatch III # --------------------------------------- # WWATCH3_LPR printer WWATCH3_F77 ifort WWATCH3_CC icc WWATCH3_DIR /home3/caparmor/marsdev/WW3/trunk/model WWATCH3_TMP /home3/caparmor/marsdev/WW3/trunk/model/tmp WWATCH3_SOURCE yes WWATCH3_LIST yes
Pre-compilation under bin directory
complete clean-up :
w3_clean -c
partial clean-up:: w3_clean -c???? Not ready yet
set the environment up:
create a file switch_CONF w3_setup .. -c mpt -s CONF -q [Update settings ? [y/n] n] or w3_setup .. -c Intel_Altix -s CONF -q
remark : to compile with debugging options :
w3_setup -c mpt_debug -s CONF
optional : remove ‘*’.o :
w3_new
optional : remove tmp directory :
w3_clean
some switches (same as CPP key in fortran):
+====================+==================================+ | SWITCH | purpose | +====================+==================================+ | SHRD | sequential run | +--------------------+----------------------------------+ | DIST MPI | parallel run (MPI) | +--------------------+----------------------------------+ | NOPA | no PALM (program / subroutine) | +====================+==================================+
Compilation under bin directory
compile the executable you need:
w3_make ww3_grid ww3_strt ww3_prep ww3_shel ww3_ounf ww3_prnc ww3_bounc ww3_ounp ww3_prtide or w3_make
Create the input files of ww3_shel (main program)¶
Initialize the *.inp files and run each pre-processing program. For instance :
- For the grid, create mask.ww3,mod_def.ww3 input files :
ww3_grid > out_ww3_grid
which reads ww3_grid.inp file- Create the starting file restart.ww3 :
mpirun -np 1 ww3_strt > out_ww3_strt
which reads ww3_strt.inp file- For the forcings, create level.ww3, current.ww3 input files
- ascii::
cp ww3_prep_niv.inp ww3_prep.inp
ww3_prep > out_ww3_prep_niv
cp ww3_prep_cur.inp ww3_prep.inp
ww3_prep > out_ww3_prep_cur
- netCDF::
cp ww3_prnc_niv.inp ww3_prnc.inp
ww3_prnc > out_ww3_prnc_niv
cp ww3_prnc_cur.inp ww3_prnc.inp
ww3_prnc > out_ww3_prnc_cur
Run¶
qsub job_for_qsub.sh
with job_for_qsub.sh like :
#!/bin/csh
#PBS -q parallel8
#PBS -l select=1:ncpus=8:mpiprocs=8
# cd to the directory you submitted your job
cd $PBS_O_WORKDIR
# get the path for mpirun
source /usr/share/modules/init/csh
module purge
module load intel-comp/12.1.5
module load mpt/2.06
date
mpiexec_mpt -np 8 ww3_shel > & output.mpi
date
Get a netCDF file¶
ww3_ounf > out_ww3_ounf
Note
- Do not forget to remove out_grd.ww3 file before launching your run. Otherwise, the new results are added to the previous out_grd.ww3 file. Which is perfect when using a restart file and for long term runs !
- if you cannot execute ww3_ounf program : unload gcc or libz modules