NOAA-ORR-ERD / gridded

A single API for accessing / working with gridded model results on multiple grid types
https://noaa-orr-erd.github.io/gridded/index.html
The Unlicense
64 stars 14 forks source link

specifying custom grid_topolgy varibles? #18

Closed ChrisBarker-NOAA closed 6 years ago

ChrisBarker-NOAA commented 6 years ago

The constructor for Dataset takes a grid_topology parameter:

class Dataset():
    def __init__(self, ncfile=None, grid=None, variables=None, grid_topology=None,):

but it doesn't appear to be used :-(

ChrisBarker-NOAA commented 6 years ago

OK, I see that load_from_varnames() is Not Implemented, so that explains it.

But maybe there should be something in the init.

-CHB

jay-hennen commented 6 years ago

The fact the grid_topology parameter is not used is an oversight and a bug. It should be passed into the Grid constructor on line 49: self.grid = Grid.from_netCDF(filename=self.filename, dataset=self.nc_dataset, grid_topology=grid_topology)

ChrisBarker-NOAA commented 6 years ago

yup -- I've done that now.

ChrisBarker-NOAA commented 6 years ago

looking more, I found that Grid.from_netCDF supports passing grid_topology through.

so I've added that code to Dataset.__init__

Whether it works or has been tested is another story...

-CHB