gridmarthe.plot_nested_grid
- gridmarthe.plot_nested_grid(ds, ax=None, varname=None, itime=None, layer=None, **kwargs)[source]
Usefull function to plot nested grids, keeping heterogeneous resolution
- Parameters:
- dsxarray.Dataset
the dataset must be a 2D array, with dims = x, y, for plotting a mesh field. In other words, you may need to sel z and time before plot, and you need to apply
gridmarthe.assign_coords(). If not, assigning coords will be automatic and you may need to use itime and layer argument to select which 2D array to plot.- axmatplotlib axe, optional.
if provided, data are plotted on this axis, otherwise fig, ax instances will be created.
- varnamestr, optional
the variable to plot in dataset. Default is None, which means the first non coordinates variable found in dataset.
- itimeint, optional
the time index to plot. Default is None (not used). Only required if ‘time’ is a dimension of ds input.
- layerint, optional
the Z dimension to plot. Default is None (not used). Only required if ‘z’ is not selected before calling this function.
- **kwargs
any keywords argument from xr.Dataset.plot.pcolormesh
- Returns:
- ax: matplotlib axis.