-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ADCIRC file [UGRID] #155
Comments
@marceloandrioni hi. it looks like the elements variable is missing |
Hello @PeterPetrik, I tried adding a _FillValue to the element variable but the same error (Invalid Data Source) happened. Here is an example of the direct output of ADCIRC. Note: this file is actually converted by a ADCIRC auxiliary script (https://adcirc.org/home/related-software/adcirc-utility-programs/) from the raw ascii output. Here some other example hosted on a THREDDS by NOAA (but I think this one had some changes from the original format also). |
could you please cut some timesteps from the direct output so it has < 4 MB ? I will have the fix ready today |
obviously the original file is not-ugrid/cf conforming: |
@marceloandrioni if you know how to build you qgis with MDAL (you need to specify cmake's flag WITH_INTERNAL_MDAL=off and set your MDAL_PREFIX for custom mdal build), the fix from #156 should allow you to open your modified files |
Hello @PeterPetrik, thank you for the lightning-fast response. Sorry for the delay on my part, but I was at a meeting without my computer. Here are two small files with just two timesteps. One is the original netcdf output from ADCIRC (adcirc_original_2times.nc) and the other the modified version (adcirc_modified_2times.nc). I completely agree with you that writing a parser to deal with the original output of ADCIRC that doesn't follow the UGRID/CF conventions doesn't make sense. Just to leave a register for someone else dealing with this problem, here is the python script I made that puts ADCIRC results in CF/UGRID format. To answer your last question, unfortnely I never built qgis from source, I just use the last version from the repos. So I think I will have to wait for the next release to acctualy use the improved version. Thank you very much. |
Hi @PeterPetrik, I'm an ADCIRC user and in the dev group for ADCIRC. A colleague pointed me to MDAL/QGIS, which is very cool. I know very little about GIS but was able to easily get an ADCIRC output netCDF file into QGIS (3.12.2). This is a great resource for connecting ADCIRC (and other grid models) to the GIS community. I'm curious about the issues people have noted re: CF-UGRID compliance. Older ADCIRC files may not be, but more recent files definitely should be. ADCIRC optionally outputs variables in netCDF format with CF-UGRID metadata. I'd be very happy to help sort out any compliance issues if that would be useful. Cheers, |
Hi @BrianOBlanton, I was the one that reported the problems loading ADCIRC files into QGIS/MDAL. The ADCIRC runs were not done by me, so I am not sure about the version used. When you say recent files should be ok, do you know in which version of ADCIRC the changes in the NetCDF/UGRID attributes were made? The output files I have (from a daily operational run) are the fort.63.nc (zeta) and fort.64.nc (uv), with the following attributes:
and
When loading the files in QGIS/MDAL I got an error: Following the UGRID Convetions, I wrote a simple python script (this one is an improved v2) to join the zeta and uv files into one output file while fixing some attributes:
With this post-processing and the changes done by @PeterPetrik, the file then could be loaded in QGIS 3.12.2 just fine: Actually, I should have closed this Issue when QGIS 3.12 was released. Closing it now. Thank you very much @PeterPetrik. |
Hello, I am trying to load ADCIRC hydrodynamic model results in QGIS using "Add Mesh Layer" but it's not working.
After some small tweaks to make the files more UGRID (unstructured grid) compatible I was able to load them using EDAL and ncWMS as show in the image below, so I am quite sure the files are OK.
The files used in the test are here: ugrids.zip
Thank you.
The text was updated successfully, but these errors were encountered: