roms_tools.InitialConditions.plot#
- InitialConditions.plot(var_name: str, s: int | None = None, eta: int | None = None, xi: int | None = None, depth_contours: bool = False, layer_contours: bool = False, ax: Axes | None = None, save_path: str | None = None) None#
Plot the initial conditions field for a given eta-, xi-, or s_rho- slice.
- Parameters:
var_name (str) –
The name of the initial conditions field to plot. Options include:
”temp”: Potential temperature.
”salt”: Salinity.
”zeta”: Free surface.
”u”: u-flux component.
”v”: v-flux component.
”w”: w-flux component.
”ubar”: Vertically integrated u-flux component.
”vbar”: Vertically integrated v-flux component.
”PO4”: Dissolved Inorganic Phosphate (mmol/m³).
”NO3”: Dissolved Inorganic Nitrate (mmol/m³).
”SiO3”: Dissolved Inorganic Silicate (mmol/m³).
”NH4”: Dissolved Ammonia (mmol/m³).
”Fe”: Dissolved Inorganic Iron (mmol/m³).
”Lig”: Iron Binding Ligand (mmol/m³).
”O2”: Dissolved Oxygen (mmol/m³).
”DIC”: Dissolved Inorganic Carbon (mmol/m³).
”DIC_ALT_CO2”: Dissolved Inorganic Carbon, Alternative CO2 (mmol/m³).
”ALK”: Alkalinity (meq/m³).
”ALK_ALT_CO2”: Alkalinity, Alternative CO2 (meq/m³).
”DOC”: Dissolved Organic Carbon (mmol/m³).
”DON”: Dissolved Organic Nitrogen (mmol/m³).
”DOP”: Dissolved Organic Phosphorus (mmol/m³).
”DOPr”: Refractory Dissolved Organic Phosphorus (mmol/m³).
”DONr”: Refractory Dissolved Organic Nitrogen (mmol/m³).
”DOCr”: Refractory Dissolved Organic Carbon (mmol/m³).
”zooC”: Zooplankton Carbon (mmol/m³).
”spChl”: Small Phytoplankton Chlorophyll (mg/m³).
”spC”: Small Phytoplankton Carbon (mmol/m³).
”spP”: Small Phytoplankton Phosphorous (mmol/m³).
”spFe”: Small Phytoplankton Iron (mmol/m³).
”spCaCO3”: Small Phytoplankton CaCO3 (mmol/m³).
”diatChl”: Diatom Chlorophyll (mg/m³).
”diatC”: Diatom Carbon (mmol/m³).
”diatP”: Diatom Phosphorus (mmol/m³).
”diatFe”: Diatom Iron (mmol/m³).
”diatSi”: Diatom Silicate (mmol/m³).
”diazChl”: Diazotroph Chlorophyll (mg/m³).
”diazC”: Diazotroph Carbon (mmol/m³).
”diazP”: Diazotroph Phosphorus (mmol/m³).
”diazFe”: Diazotroph Iron (mmol/m³).
s (int, optional) – The index of the vertical layer (s_rho) to plot. If not specified, the plot will represent a horizontal slice (eta- or xi- plane). Default is None.
eta (int, optional) – The eta-index to plot. Used for vertical sections or horizontal slices. Default is None.
xi (int, optional) – The xi-index to plot. Used for vertical sections or horizontal slices. Default is None.
depth_contours (bool, optional) – If True, depth contours will be overlaid on the plot, showing lines of constant depth. This is typically used for plots that show a single vertical layer. Default is False.
layer_contours (bool, optional) – If True, contour lines representing the boundaries between vertical layers will be added to the plot. This is particularly useful in vertical sections to visualize the layering of the water column. For clarity, the number of layer contours displayed is limited to a maximum of 10. Default is False.
ax (matplotlib.axes.Axes, optional) – The axes to plot on. If None, a new figure is created. Note that this argument is ignored for 2D horizontal plots. Default is None.
save_path (str, optional) – Path to save the generated plot. If None, the plot is shown interactively. Default is None.
- Returns:
None – This method does not return any value. It generates and displays a plot.
- Raises:
ValueError – If the specified var_name is not one of the valid options. If the field specified by var_name is 3D and none of s, eta, or xi are specified. If the field specified by var_name is 2D and both eta and xi are specified.