Wavewatch 3

WaveWatch3 is a full-spectral third-generation wind-wave model, developed at the Marine Modeling and Analysis Branch (MMAB) of the Environmental Modeling Center (EMC) of the National Centers for Environmental Prediction (NCEP). It is based on WAVEWATCH I and WAVEWATCH II as developed at Delft University of Technology, and NASA Goddard Space Flight Center, respectively. WAVEWATCH III differs from its predecessors in all major aspects; i.e., governing equations, program structure, numerical and physical approaches.

Running wavewatch3 models: http://polar.ncep.noaa.gov/waves/workshop/pdfs/wwws_2013_running.pdf

Wavewatch3 manual: http://polar.ncep.noaa.gov/mmab/papers/tn276/MMAB_276.pdf

Wavewatch 3 Model Adapter - summary

This page describes the WW3 module adapter, its functions, and provides an example for configuring a WW3 run in FEWS.

The pre-adapter creates the model specific output by replacing tags in template files:

Furthermore, it writes log messages to a log file called xbeach.log.

The post-adapter converts the 2D spectra model output from the model native format to NetCDf.

WW3 pre-adapter

Model pre-adapter for running a Wavewatch 3 model from Delft-FEWS.

Class name: nl.deltares.wavewatch.PreWWIIIAdapter

Properties

TIMESTEP

(required)

Time step (in seconds) of the WW3 model as defined in the model output file.  This field is required to calculate the number of time steps to be written to the output file as a function of the run time length.  Thus, the number of output time steps is equal to the number of model time steps.

Notes for users

Example template files: ww3_outp.inp.template; gx_outf.inp.template; ww3_shel.inp.template

System requirements

WW3 post-adapter

Model post-adapter for running a Wavewatch 3 model from Delft-FEWS.

Class name: nl.deltares.wavewatch.PostWWIIIAdapter

Notes for users
System requirements

Running a WaveWatch 3 model

WW3 makes use of auxiliary programs which are described in the WW3 manual: http://polar.ncep.noaa.gov/mmab/papers/tn276/MMAB_276.pdf

To run these programs, you need some model definition files as input. This is described at the same locations in the manual. With the Risc-Kit config we make use of the following files (see also Risc-kit\ModuleDataSetFilesUnzip\WaveWatchIII_global_nomads\model\)

(Some of these are template files in FEWS, because FEWS will edit the $TAGS$ before it passes the file to WW3)

Example Configuration generalAdapterRun

The following gives an example of how to set up the GeneralAdapterRun file for Wavewatch 3 in FEWS using the WW3 model pre and post-adapters.  The GeneralAdapterRun file follows the general structure as described here.

general

In this section general information regarding the module such as version number, file directories, missing values, and time zone information can be specified.

<general>
		<description>WaveWatch Model run</description>
		<piVersion>1.8</piVersion>
		<rootDir>%REGION_HOME%/Modules/WavewatchIII/$MODEL$/$METEO$_hindcast</rootDir>
		<workDir>%ROOT_DIR%/workDir</workDir>
		<exportDir>%ROOT_DIR%/input</exportDir>
		<exportDataSetDir>%ROOT_DIR%/</exportDataSetDir>
		<exportIdMap>IdExport_wavewatchIII</exportIdMap>
		<importDir>%ROOT_DIR%/output</importDir>
		<importIdMap>IdImport_wavewatchIII</importIdMap>
		<dumpFileDir>$GA_DUMPFILEDIR$</dumpFileDir>
		<dumpDir>%ROOT_DIR%/diagnostics/</dumpDir>
		<diagnosticFile>%ROOT_DIR%/diagnostics/diagnostics.xml</diagnosticFile>
		<missVal>NaN</missVal>
		<timeZone>
			<timeZoneName>GMT+0:00</timeZoneName>
		</timeZone>
</general>
startUpActivities

It may be useful to clear the model working directory of any previous runs before starting a new run.

<startUpActivities>
	<purgeActivity>
		<filter>%ROOT_DIR%/workDir/*</filter>
	</purgeActivity>
</startUpActivities>
exportActivities

In this section the data to be exported from FEWS as input to the module is specified. Data to export to WW3 generally includes:

The run file contains information regarding the input file names, start and stop times, and time step. Additional properties can be passed using the run file as listed above under Properties. 

<exportActivities>
			<exportStateActivity>
				<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
				<stateExportDir>%ROOT_DIR%/workDir</stateExportDir>
				<stateSelection>
					<warmState>
						<stateSearchPeriod unit="hour" start="-72" end="-24"/>
					</warmState>
				</stateSelection>
			</exportStateActivity>
			<exportDataSetActivity>
				<moduleInstanceId>WavewatchIII_$MODEL$_$METEO$</moduleInstanceId>
			</exportDataSetActivity>
			<exportNetcdfActivity>
				<exportFile>$METEO$.nc</exportFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Import_$METEO$</moduleInstanceId>
						<valueType>grid</valueType>
						<parameterId>Wind.u.simulated</parameterId>
						<locationId>$METEO$</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="hour" multiplier="3"/>
						<relativeViewPeriod unit="day" start="-3" end="0"/>
						<readWriteMode>read only</readWriteMode>
					</timeSeriesSet>
					<timeSeriesSet>
						<moduleInstanceId>Import_$METEO$</moduleInstanceId>
						<valueType>grid</valueType>
						<parameterId>Wind.v.simulated</parameterId>
						<locationId>$METEO$</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="hour" multiplier="3"/>
						<relativeViewPeriod unit="day" start="-3" end="0"/>
						<readWriteMode>read only</readWriteMode>
					</timeSeriesSet>
				</timeSeriesSets>
			</exportNetcdfActivity>
			<exportNetcdfRunFileActivity>
				<exportFile>%ROOT_DIR%/runinfo.nc</exportFile>
				<properties>
					<string value="3600" key="TIMESTEP"/>
				</properties>
			</exportNetcdfRunFileActivity>
		</exportActivities>
executeActivites

WW3 makes use of auxiliary programs which are described in the WW3 manual: http://polar.ncep.noaa.gov/mmab/papers/tn276/MMAB_276.pdf
This section calls the WW3 pre and post-adapters as well as the WW3 executables. Note that the run file must be passed as an argument to the WW3 pre and post-adapters. Also note that several executable must be called in the order as described in the example.

 

<executeActivities>
	<executeActivity>
		<description>WavewatchIII pre-adapter</description>
		<command>
			<className>nl.deltares.wavewatch.PreWWIIIAdapter</className>
			<binDir>%ROOT_DIR%/../../../bin/WavewatchIII_adapter</binDir>
		</command>
		<arguments>
			<argument>%ROOT_DIR%/runinfo.nc</argument>
		</arguments>
		<timeOut>10800000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>ww3_grid</description>
		<command>
			<executable>%ROOT_DIR%/../../../bin/WavewatchIII/ww3_grid.exe</executable>
		</command>
		<timeOut>90000000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>ww3_prep</description>
		<command>
			<executable>%ROOT_DIR%/../../../bin/WavewatchIII/ww3_prep.exe</executable>
		</command>
		<timeOut>90000000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>ww3_shel</description>
		<command>
			<executable>%ROOT_DIR%/../../../bin/WavewatchIII/ww3_shel.exe</executable>
		</command>
		<timeOut>90000000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>Run WavewatchIII</description>
		<command>
			<executable>%ROOT_DIR%/../../../bin/WavewatchIII/gx_outf.exe</executable>
		</command>
		<timeOut>90000000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>Collect output WavewatchIII</description>
		<command>
			<executable>%ROOT_DIR%/../../../bin/WavewatchIII/ww3_outp.exe</executable>
		</command>
		<timeOut>90000000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
	<executeActivity>
		<description>WavewatchIII post-adapter</description>
		<command>
			<className>nl.deltares.wavewatch.PostWWIIIAdapter</className>
			<binDir>%ROOT_DIR%/../../../bin/WavewatchIII_adapter</binDir>
		</command>
		<arguments>
			<argument>%ROOT_DIR%/runinfo.nc</argument>
		</arguments>
		<timeOut>10800000</timeOut>
		<ignoreDiagnostics>true</ignoreDiagnostics>
	</executeActivity>
</executeActivities>
importActivities

In this section the data to be imported into FEWS as output from the module is specified. Data to import from WW3 generally includes:

<importActivities>
			<importStateActivity>
				<stateFile>
					<importFile>%ROOT_DIR%/workDir/restart1.ww3</importFile>
					<relativeExportFile>restart.ww3</relativeExportFile>
				</stateFile>
				<expiryTime unit="day" multiplier="3"/>
			</importStateActivity>
			<importNetcdfActivity>
				<importFile>ww3.nc</importFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>Wave.variancedensity2D.simulated</parameterId>
						<domainParameterId>f</domainParameterId>
						<domainParameterId>dir</domainParameterId>
						<locationSetId>wavewatchIII</locationSetId>
						<timeSeriesType>simulated historical</timeSeriesType>
						<timeStep unit="hour"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</timeSeriesSets>
				<maximumSnapDistance>100</maximumSnapDistance>
			</importNetcdfActivity>
		</importActivities>