mpas_tools.ocean.compute_barotropic_streamfunction
- mpas_tools.ocean.compute_barotropic_streamfunction(ds_mesh, ds, logger=None, min_depth=None, max_depth=None, prefix='timeMonthly_avg_', time_index=None, include_bolus=False, include_submesoscale=False, quiet=False, nvertlevels_chunk=1)[source]
Compute barotropic streamfunction
- Parameters:
ds_mesh (xarray.Dataset) – A dataset containing MPAS mesh variables
ds (xarray.Dataset) – A dataset containing MPAS output variables
normalVelocity
andlayerThickness
(possibly with aprefix
)logger (logging.Logger, optional) – A logger for the output if not stdout
min_depth (float, optional) – The minimum depth (positive up) to compute BSF over
max_depth (float, optional) – The maximum depth (positive up) to compute BSF over
prefix (str, optional) – The prefix on the
normalVelocity
andlayerThickness
variablestime_index (int, optional) – The time at which to index
ds
(if it hasTime
as a dimension)include_bolus (bool, optional) – Whether to include the GM bolus velocity in the computation
include_submesoscale (bool, optional) – Whether to include the submesoscale velocity in the computation
quiet (bool, optional) – If True, suppress all logging output If False, log all output to the logger
nvertlevels_chunk (int, optional) – The number of vertical levels to chunk the dataset by. This is useful for large datasets to avoid memory issues. The default is 1, which means no chunking. Set this to
None
to disable chunking.
- Returns:
bsf_vertex (xarray.DataArray) – The barotropic streamfunction in Sv on vertices