...
template_swan_input_file | (required) | Pathname of template swan input file to use to create swan input file. This should be either an absolute path or a path relative to the workDir specified in the netcdf run file. |
---|---|---|
swan_input_file | (required) | Pathname of swan input file to create. This should be either an absolute path or a path relative to the workDir specified in the netcdf run file. |
input_wind_file_to_convert | (optional) | Convert wind (with u, v component) in regular grid from NetCDF to SWAN ascii format. The path to the wind NetCDF file should be specified in the value section. The conversion is done without grid rotation, thus the orientation of the grid in ascii is identical to that in NetCDF. In SWAN .swn file, one should specify how this wind grid should be read by adjusting 'idla' (e.g. idla=3, read the grid starting from the low-left corner). 'windy.ser' is required in SWAN .swn file. Conversion examples are attached. windy.ser; windyfield_18071203.wnd; SWAN_wind.nc; template.swn |
input_curvilinear_grid_file_to_convert_waterlevel | (optional) | Covert waterlevel in curvelinear grid from NetCDF to SWAN ascii format (NOHEAD version). The path to the waterlevel NetCDF file should be specified in the value section. The conversion is done with grid rotation, taking the low-left corner to the top-left. In SWAN .swn file, one should specify how this water level grid should be read by adjusting 'idla' (e.g. idla=3, read the grid starting from the low-left corner). SWAN_overall_wlev.dep; SWAN_overall_wlev.nc |
input_curvilinear_grid_file_to_convert_currents | (optional) | Covert currents (with u. v component) in curvelinear grid from NetCDF to SWAN ascii format (NOHEAD version). The ascii file is organised by timestamp (i.e. 1st timestep u, v; 2nd timestep u, v, etc). The path to the currents NetCDF file should be specified in the value section. The conversion is done with grid rotation, taking the low-left corner to the top-left. In SWAN .swn file, one should specify how this currents grid should be read by adjusting 'idla' (e.g. idla=3, read the grid starting from the low-left corner). SWAN_overall_cur.dep; SWAN_overall_cur.nc |
input_spectra_file_to_convert | (optional) | Adapter can only import data on WGS84 coordinates. Pathname of netcdf file with input spectra data that should be converted from Cartesian to WGS84. This should be either an absolute path or a path relative to the workDir specified in the netcdf run file. |
stationary_times_file | (optional) | Pathname of a netcdf file that contains a parameter with times to use for the $STATIONARY_TIMES$ tag. This should be either an absolute path or a path relative to the workDir specified in the netcdf run file. This property must be present if the $STATIONARY_TIMES$ tag is used in the template swan input file. |
stationary_times_parameter | (optional) | Variable name of a parameter in stationary_times_file with data, e.g. wind_speed. The times that correspond to the data for this parameter are used for the $STATIONARY_TIMES$ tag. This property must be present if the $STATIONARY_TIMES$ tag is used in the template swan input file. |
input_state_file_format | (optional) | Deprecated, do not use. Format of the input state file (hotfile). Can be e.g. "NETCDF" (NetCDF format), "FREE" (Ascii format) or "UNFORMATTED" (binary format). If not specified, then NETCDF is used by default. |
netcdf_files_convert_coordinates_attribute | (optional) | Property to be used when the input data for SWAN is defined on a Cartesian grid. Property replaces coordinate attributes in netcdf file from "lat lon" to "x y". Configure as "value" a list of filenames to be converted, separated a ; symbol. List of filenames should be in the input dir (next to the work dir). For these set of files, new files will be created "<name>_adapted.nc" where the coordinate attributes "lat lon" are replaced by "x y". |
output_ascii_grid_file_to_convert | (optional) | Convert output map file from ascii (HEADER, Layout 1) to NetCDF. The path to the map ascii file should be specified in the value section. Examples are attached. |
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 swan_pre_adapter_log.txt in the workDir specified in the netcdf run file.
- This program uses the information in the specified netcdf run file as input and uses this information to do the following actions:
- Convert input spectra time series (optional):
The netcdf file specified in the property "input_spectra_file_to_convert" will be converted to a file in SWAN ascii format with the same path and name but different extension (.BND). For example the original file input/spectra.nc is converted to input/spectra.BND. If the property "input_spectra_file_to_convert" is not specified, then this step does nothing. Create swan input file:
The template SWAN input file specified in the property "template_swan_input_file" will be copied to the file specified in the property "swan_input_file". In the copy the following tags will be replaced with the corresponding values:$TSTART$
Start time of the model run.
$TSTOP$
End time of the model run.
$HOTSTART$
Either "INITIAL HOTSTART 'pathname of input state file' NETCDF" if the input state file is not empty (warm state start) or empty string if the input state file is an empty dummy file of 0 bytes length (cold state start) or empty string if there is no input state file at all (cold state start). If the property "input_state_file_format" is specified, the the value of the property "input_state_file_format" is used instead of "NETCDF" in the line above.
$STATIONARY_TIMES$
Multiple lines with time stamps for a stationary model run:
COMPUTE STATIONARY <first time stamp for stationary model run>
COMPUTE STATIONARY <second time stamp for stationary model run>
...
COMPUTE STATIONARY <last time stamp for stationary model run>
- Convert input spectra time series (optional):
...
output_netcdf_spectra_file_to_convert | (optional) | Path to netcdf spectra file to convert. A copy of the file will be created with <name>_adapted.nc which adds "lat" "lon" coordinate variables (according to the CF conventions) and multiplies the density variable with the scale_denstity variable. |
---|---|---|
output_ascii_grid_file_to_convert | (optional) | Convert output map file from ascii (HEADER, Layout 1) to NetCDF. The path to the map ascii file should be specified in the value section. Examples are attached. |
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 swan_post_adapter_log.txt in the workDir specified in the netcdf run file.
- This program uses the information in the specified netcdf run file as input and uses this information to do the following actions:
- Convert output scalar time series:
All .TAB files in the workDir specified in the netcdf run file will be converted to files in netcdf format with the same path and name but different extension (.nc). For this conversion the mapping between coordinates and locationIds from the corresponding .PNT files is used. This program assumes that for a given .TAB file the corresponding .PNT file has the same path and name as the .TAB file, only a different extension. This program assumes that the locations in the .TAB file and in the corresponding .PNT file are in the same order. This program assumes that the last part between double quotes on a given line in a .PNT file is the locationId. This program assumes that the coordinates in a given .TAB file are in degrees in the WGS 1984 coordinate system. If no .TAB files are present in the specified workDir, then this step does nothing.
- Convert output scalar time series:
...