gridmarthe.get_dims_from_attrs
- gridmarthe.get_dims_from_attrs(ds)[source]
Get Marthe grid dimensions from Dataset attributes
Grid(s) dimensions are stored as a string attribute in dataset read by
load_marthe_grid(). This function allow user to retrieve these informations in a more pythonnic way, by getting a list of dimensions.- Parameters:
ds (xr.Dataset) – Input dataset, read by
load_marthe_grid()- Returns:
list – A list of dimensions for each grid (main and nested). List will contains [[main grid: x, y, nlayer], [nest1 x, y, nlayer], …].