Bug report #20730

Netcdf mesh aligned, or not?

Added by Richard Duivenvoorde almost 2 years ago.

Status:Open
Priority:Normal
Assignee:Peter Petrik
Category:Data Provider/MDAL
Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28550

Description

I created a small 7x3 cell netcdf with a python script: test.nc (attached)

Loaded in QGIS3 as gdal raster you see 7x3 cells
Loaded as netcdf in Geoserver and served as wms you see 7x3 cells
If you load this small set as Mesh in QGIS3 you see 6x2 cells.
In the attached 'mesh.png' those three layers are all visible.

Note that I'm no netcdf expert! So I'm 100% sure that this IS actually a problem.
I think all depends on the definition of a mesh: is it the middle point of grid cells or not?

When loaded in Panoply netcdf viewer: https://www.giss.nasa.gov/tools/panoply/
you also can see both situations see attached screenies:
panoply_interpolate.png zoomed in to test.png and checkbox 'interpolate' checked
panoplyNOinterpolate.png: checkbox 'interpolate' UNchecked.

So my feeling is that it depends on the interpretation of a mesh/grid and it's visualisation.

Maybe some netcdf guru's can have a say about this?

Peter Petrik asked me to create this issue to further investigate.

mesh.png (117 KB) Richard Duivenvoorde, 2018-12-05 11:48 AM

test.nc (18.1 KB) Richard Duivenvoorde, 2018-12-05 11:48 AM

panoplyNOinterpolate.png (31.3 KB) Richard Duivenvoorde, 2018-12-05 11:56 AM

panoply_interpolate.png (97.9 KB) Richard Duivenvoorde, 2018-12-05 11:56 AM

Also available in: Atom PDF