geocat.f2py.moc_globe_atl_wrapper

Module Contents

Functions

_moc_loops(lat_aux_grid, a_wvel, a_bolus, a_submeso, ...)

moc_globe_atl(→ supported_types)

Facilitates calculating the meridional overturning circulation for the

Attributes

supported_types

geocat.f2py.moc_globe_atl_wrapper.supported_types
geocat.f2py.moc_globe_atl_wrapper._moc_loops(lat_aux_grid, a_wvel, a_bolus, a_submeso, t_lat, rmlak, msg_py)
geocat.f2py.moc_globe_atl_wrapper.moc_globe_atl(lat_aux_grid: supported_types, a_wvel: supported_types, a_bolus: supported_types, a_submeso: supported_types, t_lat: supported_types, rmlak: supported_types, msg: numpy.number = None, meta: bool = False) supported_types

Facilitates calculating the meridional overturning circulation for the globe and Atlantic.

Parameters
  • lat_aux_grid (xarray.DataArray, numpy.ndarray) – Latitude grid for transport diagnostics.

  • a_wvel (xarray.DataArray, numpy.ndarray) – Area weighted Eulerian-mean vertical velocity [TAREA x WVEL].

  • a_bolus (xarray.DataArray, numpy.ndarray) – Area weighted Eddy-induced (bolus) vertical velocity [TAREA x WISOP].

  • a_submeso (xarray.DataArray, numpy.ndarray) – Area weighted submeso vertical velocity [TAREA x WSUBM].

  • tlat (xarray.DataArray, numpy.ndarray) – Array of t-grid latitudes.

  • rmlak (xarray.DataArray, numpy.ndarray) – Basin index number: [0]=Globe, [1]=Atlantic

  • msg (numpy.number) – A numpy scalar value that represent a missing value. This argument allows a user to use a missing value scheme other than NaN or masked arrays, similar to what NCL allows.

  • meta (bool) – If set to True and the input array is an Xarray, the metadata from the input array will be copied to the output array; default is False. Warning: this option is not currently supported.

Returns

fo – A multi-dimensional array of size [moc_comp] x [n_transport_reg] x [kdepth] x [nyaux] where:

  • moc_comp refers to the three components returned

  • n_transport_reg refers to the Globe and Atlantic

  • kdepth is the the number of vertical levels of the work arrays

  • nyaux is the size of the lat_aux_grid

Return type

xarray.DataArray, numpy.ndarray

Examples

# Input data can be read from a data set as follows:
import xarray as xr

ds = xr.open_dataset("input.nc")

lat_aux_grid = ds.lat_aux_grid
a_wvel = ds.a_wvel
a_bolus = ds.a_bolus
a_submeso = ds.a_submeso
tlat = ds.tlat
rmlak = ds.rmlak

# (1) Calling with xArray inputs and default arguments (Missing value = np.nan, NO meta information)
out_arr = moc_globe_atl(lat_aux_grid, a_wvel, a_bolus, a_submeso, tlat, rmlak)

# (2) Calling with Numpy inputs and default arguments (Missing value = np.nan, NO meta information)
out_arr = moc_globe_atl(lat_aux_grid.values, a_wvel.values, a_bolus.values, a_submeso.values,
                        tlat.values, rmlak.values)

# (3) Calling with xArray inputs and user-defined arguments (Missing value = np.nan, NO meta information)
out_arr = moc_globe_atl(lat_aux_grid, a_wvel, a_bolus, a_submeso, tlat, rmlak, msg=-99.0, meta=True)

# (4) Calling with Numpy inputs and user-defined arguments (Missing value = np.nan, NO meta information)
out_arr = moc_globe_atl(lat_aux_grid.values, a_wvel.values, a_bolus.values, a_submeso.values,
                        tlat.values, rmlak.values, msg=-99.0, meta=True)