-
Notifications
You must be signed in to change notification settings - Fork 542
FAQs page
This page is a collection of frequently asked questions from WW3 users and developers.
1 - How to cite WAVEWATCH III®
2 - How to debug error messages
3 - How to add a new switch to the makefile
4 - How to install netcdf
5 - How to install Metis/Parmetis
6 - How to compile with PDLIB
7 - For MACOSX with gfortran
8 - How to compile WW3 using NOAA hpc-stack
9 - Executing heavy serial jobs
10 - CFL condition
11 - ww3_grib compilation
The WAVEWATCH III® Development Group (WW3DG), 2019: User manual and system documentation of WAVEWATCH III® version 6.07. Tech. Note 333, NOAA/NWS/NCEP/MMAB, College Park, MD, USA, 326 pp. + Appendices.
BibTex Format:
@article{wavewatch6.07, title="{User Manual and System Documentation of WAVEWATCH III version 6.07, The {WAVEWATCH III} Development Group}", author={WW3DG}, journal={Tech. Note 326 pp. + Appendices, NOAA/NWS/NCEP/MMAB}, year={2019}}
A common question is: I got the following error
forrtl: severe (174): SIGSEGV, segmentation fault occurred Image PC Routine Line Source ww3_shel 00000000006C1E45 Unknown Unknown Unknown ww3_shel 00000000006BFC07 Unknown Unknown Unknown ww3_shel 0000000000661A64 Unknown Unknown Unknown ww3_shel 0000000000661876 Unknown Unknown Unknown ww3_shel 00000000005F1976 Unknown Unknown Unknown ww3_shel 00000000005F7440 Unknown Unknown Unknown libpthread.so.0 00002AAAABC71850 Unknown Unknown Unknown ww3_shel 00000000004F042D Unknown Unknown Unknown ww3_shel 00000000004E91D3 Unknown Unknown Unknown ww3_shel 00000000004936C3 Unknown Unknown Unknown ww3_shel 0000000000415929 Unknown Unknown Unknown ww3_shel 0000000000404E5E Unknown Unknown Unknown libc.so.6 00002AAAAC117C36 Unknown Unknown Unknown ww3_shel 0000000000404D69 Unknown Unknown Unknown
what do I do?
First, add traceback flags in the comp. (This will either be comp. or in cmplr.env depending on which you are using). Then you should get a line number of the program so that you can then traceback the error to.
Linking error when compiling (most likely this is more of a development group FAQ than users group):
Here gx_outp was not compiling and giving the following error:
The error was: ad3 : processing w3triamd ad3 : processing w3iopomd ad3 : processing w3flx2md ad3 : processing wmmdatmd ad3 : processing w3sic3md ad3 : processing gx_outp Linking gx_outp *** error in linking *** gx_outp.o: In function `gxoutp_IP_gxexpo_': gx_outp.F90:(.text+0x390a): undefined reference to `w3flx2md_mp_w3flx2_'
If you look in the makefile for the line of what all in linked and is set as a dependency, look at:
$(aPe)/gx_outp : $(aPo)/w3odatmd.o $(aPe)/gx_outp : $(aPo)/wmmdatmd.o $(aPe)/gx_outp : $(aPo)/w3parall.o $(aPe)/gx_outp : $(aPo)/w3triamd.o $(aPe)/gx_outp : $(aPo)/w3flx2md.o $(aPe)/gx_outp : $(aPo)/w3sic3md.o $(aPe)/gx_outp : $(aPo)/w3iogrmd.o $(aPe)/gx_outp : $(aPo)/w3iopomd.o $(aPe)/gx_outp : $(aPo)/gx_outp.o @$(aPb)/link gx_outp w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd wmmdatmd w3parall w3triamd w3flx2md w3sic3md w3iogrmd w3iopomd constants w3servmd w3timemd w3arrymd w3dispmd w3gsrumd
in the original makefile the w3flx2md was not included, but needed to be there.
To fix this, go into make_makefile and search for w3flx2md you will find:
FLX2) str_st1='OK' ; str_st2='OK' ; str_st3='no' ; str_st6='OK' flx='w3flx2md' flxx=$NULL ;;
So you need to add the variable flx into the make_makefile for the appropriate program:
gx_outp) IDstring='GrADS input file generation for point output' core= data="$memcode w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd" prop= source="$pdlibcode $pdlibyow $db $bt $setupcode wmmdatmd w3parall w3triamd $ln $flx $stx $nlx $btx $tr $bs $xx $is $ic" IO='w3iogrmd w3iopomd' aux='constants w3servmd w3timemd w3arrymd w3dispmd w3gsrumd' ;;
The main key here is find a switch that would behave similar to yours, and then follow the patterns. The two files you need to update are make_makefile.sh and w3_new.
- Add your case to the list in section 2.b, then copy a similar situation:
#sort:mach: #sort:dstress: dstress) TY='upto1' ID='Diagnostic stress comp' TS='FLD' OK='FLD0 FLD1 FLD2' ;;
So in the above the case is "dstress". TY can be "one" (that means 1 switch is required), 'upto1' (up to one switch), or 'upto2' (up to two switches can be used). The OK variable lists the possible switch options.
- Then add your case in the section of code, that for dstress for example is:
dstress) dstress=$sw ;;
- Then add the modules/files for your switches (if needed) in the section like below:
case $dstress in FLD0) ds=$NULL dsx=$NULL ;; FLD1) ds=$NULL dsx='w3fld1md' ;; FLD2) ds=$NULL dsx='w3fld1md w3fld2md' ;; esac
If you have a case like an 'upto1' your block of code will look more like:
is=$NULL case $s_is in IS1) is='w3sis1md' ;; IS2) is='w3sis2md' ;; esac
- In the last step, you defined which files/modules you need to be compiled. So in the first one 'dsx' and in the second one 'is'. You now need to add this variable where needed in section 2c, such as:
case $prog in ww3_grid) IDstring='Grid preprocessor' core= data='w3wdatmd w3gdatmd w3adatmd w3idatmd w3odatmd' prop= source="w3triamd $stx $nlx $btx $is" IO='w3iogrmd' aux='constants w3servmd w3arrymd w3dispmd w3gsrumd w3timemd' ;;
- In section 3b, you need to add the file and module file. So first add the module in:
for mod in W3INITMD W3WAVEMD W3WDASMD W3UPDTMD W3FLDSMD W3CSPCMD \ W3GDATMD W3WDATMD W3ADATMD W3ODATMD W3IDATMD \ W3FLD1MD W3FLD2MD \ W3IOGRMD W3IOGOMD W3IOPOMD W3IOTRMD W3IORSMD W3IOBCMD \ W3IOSFMD W3PARTMD W3BULLMD \ ....
and then add in the list, such as:
'W3FLD1MD' ) modtest=w3fld1md.o ;;
- Update w3_new with the new switch case. Again, copy a template from the switch before adding to the list any routine that has the new switch.
The following scripts provide guidelines to install netcdf4 properly for use with WAVEWATCH III® with given FORTRAN compilers:
- GNU netcdf installer (Download only)
- Intel netcdf installer (Download only)
Download the Metis and Parmetis from the link
for Metis
module purge
load compiler and mpi libraries
module load intel impi
setenv CFLAGS -fPIC
make config cc=mpiicc CXX=mpiicc prefix=</path/to/your/parmetis> | & tee config.out-rr
make install | & tee make-install.out-rr
It adds libmetis.a under > /path/to/your/parmetis/lib/
libmetis.a
For Parmetis
module purge
module load intel impi
setenv CFLAGS -fPIC
make config cc=mpiicc cxx=mpiicc prefix=/path/to/your/parmetis/ | & tee config.out-rr
make install | & tee make-install.out-rr
It adds libparmetis.a under /path/to/your/parmetis/lib/
libparmetis.a
set the path to metis/parmetis
setenv METIS_PATH /path/to/your/parmetis
- Compile metis and parmetis libraries following link.
- Set the path to METIS_PATH in the environment.
- Compile all the required serial executable without PDLIB in the switch:
cd WW3/model/bin
./w3_make ww3_grid ww3_prnc ww3_bounc
... - Add PDLIB to the switch and compile ww3_shel and ww3_multi
./w3_make ww3_shel ww3_multi
Compile gfortran
brew install gcc
brew install gnu-getopt
clone WW3
git clone -b develop https://github.com/NOAA-EMC/WW3.git WW3
cd WW3/model
Set environmetal variables (model/bin/wwatch3.env
)
./bin/w3_setup ./
WW3 Compilation
cd bin
ln -s comp.Gnu comp
ln -s link.Gnu link
cp switch<user_defined> switch
./w3_make
Official installations of hpc-stack can be found on NOAA HPC platforms.
hpc-stack uses a hierarchical module structure that starts with a generic hpc metamodule that then reveal specific compilers, MPI builds, and libraries link to github page.
Load stack
Hera
module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/modulefiles/stack
orion
module use /apps/contrib/NCEP/libs/modulefiles/stack
Load Modules
Check the available hpc-modules
module -r spider '.*hpc.*'
Module load hpc
module load hpc-intel hpc-impi netcdf bacio w3nco g2 jasper png zlib
Set environmental variables
setenv PNG_LIB $PNG_ROOT/lib64/libpng.a
setenv Z_LIB $ZLIB_ROOT/lib/libz.a
setenv JASPER_LIB $JASPER_ROOT/lib64/libjasper.a
setenv WWATCH3_NETCDF NC4
setenv NETCDF_CONFIG $NETCDF/bin/nc-config
clone WW3
git clone -b develop https://github.com/NOAA-EMC/WW3.git WW3
cd WW3/model
Set WW3 environmetal variables (model/bin/wwatch3.env
)
./bin/w3_setup ./ -c intel
WW3 Compilation
cd bin
cp switch<user_defined> switch
./w3_make
or ./w3_automake
Users might need to allocate a larger memory if a segmentation fault
occurs at model definition preparation step (ww3_grid) due to a large grid, preprocessing of field inputs (i.e. ww3_prnc), or postprocessing of model outputs (i.e. ww3_ounf/outf) due to a heavy out_grd.ww3.
In this case, it is recommended to use compute nodes instead of login nodes on HPC environments for serial executables.
There are 4 timesteps for WW3 with explicit scheme:
1- Global time step (Should be a multiple of spatial time step).
2- Spatial time step (Should satisfy CFL).
3- Spectral time step (Should be a multiple of spatial time step).
4- Minimum source term time step.
The maximum allowable time step for spatial propagation is given by:
Δt=123766 * Δx * cosd(max(latitude))*f
where Δx
is the resolution in degrees,cosd(max(latitude))
is the cosine of the maximum latitude in degrees
and f
is the first frequency from ww3_grid.inp(nml).
The spatial time step should be chosen as an integer close to this number (no fraction of seconds).
In order to compile ww3_grib, the following modules are required:
netcdf, bacio, w3nco, g2, jasper, png, zlib, hdf5, w3nco
and
setenv PNG_LIB $PNG_ROOT/lib64/libpng.a
setenv Z_LIB $ZLIB_ROOT/lib/libz.a
setenv JASPER_LIB $JASPER_ROOT/lib64/libjasper.a
setenv WWATCH3_NETCDF NC4
setenv NETCDF_CONFIG $NETCDF/bin/nc-config
Quick Links