Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Table of Contents

Wavewatch 3 Model Adapter

...

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
  • For all files that are written by this adapter, if the file to be written already exists, then it will be overwritten.
  • This program assumes that the model always runs in time zone GMT.
  • This program writes log messages to a log file called preww3.log.
  • This program uses the information in the specified netcdf run file as input and uses this information to do the following actions:
    1. Copy template file ww3_shell.inp.template to create the shell input file ww3_shell.inp
    2. Copy template file gx_outf.inp.template to create the grid output post-processing file: gx_outf.inp
    3. Copy template file ww3_out.inp.template to create the point output post-processing file: ww3_out.inp
      In the input files the following tags will be replaced with the corresponding values:

      $STARTTIME$

      Start time of the model run.

      $ENDTIME$

      End time of the model run.

      $TIMESTEP$

      Time step of the model in seconds

      $NSTEP$

      Number of time steps to write as output calculated as a function of STARTTIME, ENDTIME, and TIMESTEP.

...

  • This program needs Java version 1.7 or higher.
  • This program needs the following Java libraries:
    • castor-0.9.5.jar
    • commons-httpclient-3.0.1.jar
    • Delft_FEWS.jar
    • Delft_FEWS_DataStore.jar
    • Delft_PI.jar
    • Delft_PI_castor.jar
    • Delft_Util.jar
    • fews-wavewatch-adapter.jar
    • grib-8.0
    • log4j-1.2.14.jar
    • netcdf-4.2.jar
    • slf4j-api-1.5.6.jar
    • slf4j-log4j12-1.5.6.jar
    • TimeSeriesImport.jar
    • xercesImpl.jar

...

WW3 post-adapter

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

...

Code Block
xml
xml
titlegeneral

<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>

...

Code Block
xml
xml
titlestartUpActivities

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

...

Code Block
xml
xml
titleexportActivities

<exportActivities>
			<exportStateActivity>
				<moduleInstanceId>$MODULE_INSTANCE_ID$</moduleInstanceId>
				<stateExportDir>%ROOT_DIR%/stateInput</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>

...

Code Block
xml
xml
titleexecuteActivities

<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>

...

Code Block
xml
xml
titleimportActivities

<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>

Attachments