RE: DELWAQ Conversion NEFIS to NetCDF - Forum - Delft3D-Old
Message Boards
RE: DELWAQ Conversion NEFIS to NetCDF
DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 6/2/14 Recent PostsAt the moment I’m trying to convert NEFIS files to NetCDF. For this task I’m using the Matlab script vs_trim2nc.m, which is available in OpenEarthTools. But I think this script is only meant for files created by Delft3D-FLOW. Is there a possibility to convert NEFIS files created by Delft3D-WAQ to NetCDF format?
Thanks for the help
Stephanie
RE: DELWAQ Conversion NEFIS to NetCDF (Answer)
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent PostsA short-term solution could be to use a small auxiliary program that converts the (binary) map files to NetCDF-files. The problem, however, is that Delft3D-WAQ has no explicit knowledge of the grid layout, merely of the connectivity between the grid cells. This makes it necessary to provide the grid layout separately, so if you want to use these NetCDF files in a graphical presentation, that may not be enough.
Can you explain what you want to do that requires NetCDF files?
RE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 6/2/14 Recent PostsThanks for your quick reply. I have to convert the NEFIS files into NetCDF format, because one of my project partners needs them for further processing in a GIS.
Regards
Stephanie
RE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent PostsRE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 6/2/14 Recent PostsThanks a lot for your help!
RE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent PostsAttachments:
RE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 6/2/14 Recent Poststhanks a lot for the program, though I wasn't able to run it yet. I wasn't sure about the format of the INI-file. Do you have by any chance an example of the INI-file I could adept?
Regards
Stephanie
RE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent PostsRE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent Posts[General]
report-file = example.out
map-file = example.map
grid-indices-file = com-xxx.lga
grid-coordinates-file = com-xxx.cco
_FillValue_cco = 999.999
netcdf-file = example.nc
delwaq_layer = 1
delwaq_name = Continuity
standard_name = Continuity
long_name = Continuity as a check of the volume balance
t_unit = seconds since 2014-02-01 00:00:00
unit = g/m3
Conventions = none in particular
title = Just an example
institution = Deltares
source = sample computation
references = none
coordinate_system = xy
_FillValue = -999.0
Several of these lines are not essential to the working of the program, they are mainly there for conforming to the convention.
Regards,
Arjen
RE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 6/2/14 Recent PostsRE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 7/7/15 Recent PostsHi, I am running my Delwaq simulations in Linux and since my NEFIS file (ada) is too big to bring it into my computer to use quickplot in Windows for the post-processing, I was wondering the possibility in converting those NEFIS files into netcdf files, in Linux. Then I can write python scripts for reading those netcdf files and do all the post-processing in Linux.
Can you please let me know which tools/procedures exist at the moment to convert Delwaq NEFIS files into netcdf files, in Linux?
Thank you.
Amelia
RE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 219 Join Date: 1/26/11 Recent PostsAs far as I know there are none. Your best option is to Delwaq create NetCDF files directly if you specify the UGRID keyword in the input. The keyword must be followed by the name of the geometry file - produced by recent versions of Delft3D-FLOW, check the file "xxxx_unstructed.hyd" for the name of that NetCDF file. The keyword should be inserted before the number of segments in the input file, like:
;###############################################################################
; Third input block
UGRID 'new_waqgeom.nc'
54600 ; number of segments ; From UI: Nr of segments (multiply
number-water-quality-segments-per-layer and
number-water-quality-layers from HYD)
2 ; Structure matrix
not used
The program I sent previously converts the binary map file. When I tried to assemble all the pieces, it turned out to be not quite standard-compliant, so that requires some work to run on Linux. At this moment I do not have the time to do that, I could do it some time next week.
An alternative that I can think of is using a command-line tool we have for examining NEFIS file. It is called "vs" - viewer-selector - but I do not whether it is incorporated in the ordinary distribution.
RE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 7/7/15 Recent PostsHi Arjen, thanks your your quick reply!
Because I have run Delft3d FLOW with 4 processors, I have 4 of those files, one for each processor, e.g. com-Long_run_discharge_60_year2012_adjusted_BC2-001_unstructured.hyd. When I open this file, I can see there the geometry file: waqgeom-file 'com-Long_run_discharge_60_year2012_adjusted_BC2-001_waqgeom.nc'. Then I have used ddcouple and have obtained 1 .hyd file only: com-Long_run_discharge_60_year2012_adjusted_BC2.hyd. However, this file does not mention the geometry. How can I provide the geometry nc file file in this case?
Many thanks,
Amelia
RE: DELWAQ Conversion NEFIS to NetCDF
Jedi Knight Posts: 128 Join Date: 1/21/13 Recent PostsHi Amelia,
The easiest way to realise that is to do a short FLOW run on a single domain/processor, which will create a single waqgeom for the full domain. When you have a recent enough ddcouple verison (1.02.00.45383 or higher), the numbering of the segments, and thus the grid definition should be the same.
greetings,
Michelle
RE: DELWAQ Conversion NEFIS to NetCDF
Youngling Posts: 13 Join Date: 7/7/15 Recent PostsHi Michelle,
I have followed your suggestions and have managed to create the nc file for the map.
Thank you very much!!
Regards,
Amelia