argopy.ArgoFloat.plot.map#
- ArgoFloat.plot.map(param: str, ds: str = 'prof', pres: float = 0.0, pres_axis: str = 'PRES', pres_bin_size: float = 100.0, select: str = 'middle', **kwargs) Any#
Plot a map of one dataset parameter, possibly sliced at a given pressure value.
This method creates a 2D geo-projection-based plot with the
argopy.plot.scatter_map()method.- Parameters:
param (str) – Name of the dataset parameter to map.
ds (str, default='prof') – Argo dataset name to load the parameter to plot. Must be valid key from
ArgoFloat.ls_dataset().pres (float, optional, default=0) –
If the parameter has a N_LEVELS dimension, this is the pressure value to slice the vertical dimension of the parameter to plot.
If pres=0, we plot parameter value at the shallowest pressure level.
If pres=-1, we plot parameter value at the deepest pressure level.
If pres is anything positive, we plot parameter value at the nearest pressure level (approximately, see below)
We use the
xarray.Dataset.argo.groupby_pressure_bins()method to select the parameter value the closest to the pressure target value.pres_axis (str, default='PRES') – If the parameter has N_LEVELS dimension, this is the pressure variable to use for slicing.
pres_bin_size (float, default=100.) – Pressure bin size deeper than the pres argument to consider in slicing the parameter to plot.
select (str, default='middle') – Pressure bin parameter value selection method. This is directly passed to
xarray.Dataset.argo.groupby_pressure_bins().
- Returns:
- Output from
argopy.plot.scatter_map, typically: patches: Dict with ax collections
- Output from
- Return type:
Notes
You can adjust the map aspect ratio with the
figsizeargument, e.g.: (18,18)You can also adjust space around the trajectory with the
paddingargument, e.g.: [1, 5]If a target pressure value is provided with the pres argument, we plot the parameter value at the ‘middle’ pressure axis value for a bin centered around the target. Bin size is controlled with the pres_bin_size argument.
Examples
from argopy import ArgoFloat af = ArgoFloat(wmo) af.plot.map('TEMP') # Plot pressure level closest to 0 by default af.plot.map('PSAL', pres=450.) af.plot.map('PROFILE_TEMP_QC') af.plot.map('DATA_MODE')