COSIMA / cosima-cookbook

Framework for indexing and querying ocean-sea ice model output.
https://cosima-recipes.readthedocs.io/en/latest/
Apache License 2.0
58 stars 25 forks source link

New functionality to get unmasked grids #312

Open navidcy opened 2 years ago

navidcy commented 2 years ago

At the moment to use the unmasked grids we need to know where they are saved and then do something like

geolon_t = xr.open_dataset('/g/data/ik11/grids/ocean_grid_025.nc').geolon_t

(see, e.g., https://cosima-recipes.readthedocs.io/en/latest/tutorials/Making_Maps_with_Cartopy.html#fixing-the-tripole)

I propose a functionality within the cosima-cookbook which would be something like:

grid = cc.get_unmasked_grid(experiment)

The function, cc.get_unmasked_grid would have the path the grid is hardcoded in and could be updated when that path changes. This way the weight of knowing where the grids are is taken off from the shoulders of the users and goes to the shoulders of the cookbook developers.

cc: @AndyHoggANU, @aidanheerdegen, @angus-g, @micaeljtoliveira, @aekiss