mpas_tools.ocean.viz.transect.plot_feature_transects

mpas_tools.ocean.viz.transect.plot_feature_transects(fc, ds, ds_mesh=None, ds_vert_coord=None, variable_list=None, cmap=None, flip=False, write_netcdf=False, method='flat', add_z=False)[source]

Plot images of the given variables on the given transects. One image named <transect_name>_<variable_name>.png will be produced in the current directory for each transect and variable

Parameters:
  • fc (geometric_features.FeatureCollection) – The transects to plot

  • ds (xarray.Dataset) – The MPAS-Ocean dataset to plot. It must contain layerThickness, which is a time-evolving (dynamic) field and so is no longer read from the mesh dataset.

  • ds_mesh (xarray.Dataset, optional) – The MPAS-Ocean horizontal mesh to use for plotting, the same as ds by default

  • ds_vert_coord (xarray.Dataset, optional) – A dataset with the vertical coordinate variables minLevelCell, maxLevelCell and bottomDepth. The same as ds_mesh by default, but in Omega these are stored separately from the horizontal mesh.

  • variable_list (list of str, optional) – The variables to plot

  • cmap (str, optional) – The name of a colormap to use

  • flip (book, optional) – Whether to flip the x axes of all transect plot

  • write_netcdf (bool, optional) – Whether to write a NetCDF file for the transect in addition to the image

  • method ({'flat', 'bilinear'}, optional) – The type of interpolation to use in plots. flat means constant values over each MPAS cell. bilinear means smooth interpolation between horizontally between cell centers and vertical between the middle of layers.

  • add_z (bool, optional) – Whether to add zMid and zInterface to the mesh dataset