Home_intro

intro story DELWAQ

DELWAQ

DELWAQ is the engine of the D-Water Quality and D-Ecology programmes of the Delft3D suite. It is based on a rich library from which relevant substances and processes can be selected to quickly put water and sediment quality models together.

The processes library covers many aspects of water quality and ecology, from basic tracers, dissolved oxygen, nutrients, organic matter, inorganic suspended matter, heavy metals, bacteria and organic micro-pollutants, to complex algae and macrophyte dynamics. High performance solvers enable the simulation of long periods, often required to capture the full cycles of the processes being modelled.

The finite volume approach underlying DELWAQ allows it to be coupled to both the structured grid hydrodynamics of the current Delft3D-FLOW engine and the upcoming D-Flow Flexible Mesh engine (1D-2D-3D) of the Delft3D Flexible Mesh Suite (or even other models such as TELEMAC).

'DELWAQ in open source' is our invitation to all leading experts to collaborate in further development and research in the field of water quality, ecology and morphology using Delft3D. Feel free to post your DELWAQ related questions or comments in this dedicated forum space. If you are new to DELWAQ, the tutorial (in the user manual) is a good place to start. A list of DELWAQ related publications is available here.

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ

Cohesive sediments & muddy systems

 


Message Boards

Delft 2 NetCDF

HT
Hemerson Tonin, modified 9 Years ago.

Delft 2 NetCDF

Youngling Posts: 12 Join Date: 3/29/11 Recent Posts
Hi,

Some of you have a code to convert the outputs of Delft in NetCDF ?

Thanks in advanced,

Hemerson
U
Gerben de Boer, modified 9 Years ago.

RE: Delft 2 NetCDF (Answer)

There are 2 options. Note: the netcdf files from both methods differ, although both are CF compliant.

1) OpenEarthTools has two matlab functions that can do the job: vs_trim2nc() for the map results and vs_trih2nc() for the history file. Please request a password at www.OpenEarth.eu to access these open source functions (or click OET logo at oss.deltares.nl).

FYI: the netcdf history file generated by vs_trih2nc is identical to the one written by the computational core of delft3d-fm (flexible mesh) that is currently in development (www.deltares.nl/xmlpages/TXP/files?p_file_id=14154). The OpenEarthTool delft3dfm.analyseHis is available for this netCDF format file for automatic validation against waterlevels on an OPeNDAP timeseries database (e.g. http://opendap.deltares.nl/thredds/catalog/opendap/rijkswaterstaat/waterbase/sea_surface_height/catalog.html).

The two functions vs_trim2nc and vs_trih2nc are wrappers for lower level functions from:
(i) the NEFIS delft3d output format library (vs_*). These are shipped with delft3d:
>> addpath('C:\Delft3D\w32\matlab\')
(ii) the open source netcdf library snctools (http://mexcdf.sourceforge.net/) that is shipped as part of OpenearthTools distribution. snctools works for all matlab releases since R14, even through Matlab did not introduce native netcdf support until R2008b.

2) you can also request a windows exectuble (written c/fortran) from delft3d support that can rewrite a delft3d nefis file as a netcdf file.
U
Gerben de Boer, modified 8 Years ago.

RE: Delft 2 NetCDF

vs_trim2nc has been updated to generate a CF compliant netCDF version of the trim file:
https://svn.oss.deltares.nl/repos/openearthtools/trunk/matlab/applications/delft3d/vs_trim2nc.m

The resulting netcdf file is de facto identical to the one generated with the fortran exectuble that is provided at request from delft3d support.

vs_trim2nc is part of OpenEarthTools. The most-op-to-date vs_* matlab libraries required for trim2nc are now linked into OpenEarthTools.
This means that all required libraries are available when making an svn checkout of the OpenEarthTools Matlab root:
https://svn.oss.deltares.nl/repos/openearthtools/trunk/

An unit test cq. example is availble in the test folder of OpenEarth:
https://svn.oss.deltares.nl/repos/openearthtools/test/matlab/applications/delft3d/trim-2x3.cdl
U
Gerben de Boer, modified 8 Years ago.

RE: Delft 2 NetCDF

Please note, the Matlab tool vs_trim2nc.m does not yet work for bed sediments and sediment transports.
It does work for both sigma-layers and z-layers.
HT
Hemerson Tonin, modified 8 Years ago.

RE: Delft 2 NetCDF

Youngling Posts: 12 Join Date: 3/29/11 Recent Posts
the vs_trim2nc script is working for both vertical coordinate system (sigma and Z) as well as for both spatial horizontal coordinate system (UTM and geographical).
U
Gerben de Boer, modified 7 Years ago.

RE: Delft 2 NetCDF

vs_trih2nc for the NEFIS history file has been updated last week, and delivers now fully QuickPlot compliant netCDF-CF files, incl. now drop-down menu for the observation points (*.obs) or cross sections (*.crs) .
BA
Bilal Ahmed, modified 3 Years ago.

RE: Delft 2 NetCDF

Youngling Posts: 7 Join Date: 2/27/15 Recent Posts
I have tried the vs_trim2nc() script with a simple and straightforward conversion from a trim*.dat file to a NetCDF file (i.e. without giving any other argument), but it fails.
Below is exact command message and error as displayed.


>> vs_trim2nc('E:\Hohai\Delft3DWD\delft3d-course\introduction_hydrodynamics\exercises\05_curvedbend\practice1\trim-cb2a.dat')
Undefined function or variable 'filenameext'.

Error in vs_trim2nc (line 121)
   OPT.title          = ['NetCDF created from NEFIS-file ',filenameext(vsfile)];

>>


Furthermore, I get the same error when I try to get a trih to NetCDF conversion using vs_trih2nc().
Please note that below is my system properties (if that matters)
  • Windows 10 (64bit)
  • Matlab 2015b
  • Delft3D 4.01.01.rc.03


I greatly appreciate any help or suggestion regarding this or any other workaround to get a NetCDF file to be visualized in Para View or VisIt.

Thank you in advance.
MD
Mohammad Daliri, modified 1 Month ago.

RE: Delft 2 NetCDF

Youngling Posts: 17 Join Date: 5/2/18 Recent Posts
Hi;
Does anybody have any idea how to fix this error when using vs_trim2nc?
with this :
vs_trim2nc('my trim.dat', 'epsg', 28992)
I get this:
> No EPSG code specified for CARTESIAN grid, your grid is not CF compliant:
> (latitude,longitude) cannot be calculated from (x,y)!

any help is greatly appreciated