Open wk1984 opened 5 years ago
When using a file that doesn't comply with the UGrid or SGrid standards, being more explicit and more specific is always more helpful.
Do you really want the entire Dataset? or do you just want one Variable, or even just the Grid? The more specific, the easier it is to produce what you want.
grd = Grid_S.from_netCDF('filename', grid_topology={'node_lon': 'XLONG', 'node_lat': 'XLAT'})
var = Variable.from_netCDF('filename', grid=grd, varname='INSERT_NAME')
Alternatively, you could try this and see if it's enough:
ds = Dataset(grid_topology={'node_lon': 'XLONG', 'node_lat': 'XLAT'})
I have a sample NC file with the following data structure:
When I use
gridded.Dataset
to load this file, it shows an error message:ValueError: Can not figure out what type of grid this is. Try specifying the grid_topology attributes or specifying the grid type
This is a curvilinear grid structure and irregular lat-lon names.
How can I load this kind of data file? and how to extract pixels by using lat-lon?
Thanks for your help!
test.nc.zip