xoa.thermdyn.get_temp

Contents

xoa.thermdyn.get_temp#

xoa.thermdyn.get_temp(ds, variant=None, errors='warn')[source]#

Search for a temperature variable in a dataset

Parameters:
  • ds (xarray.Dataset)

  • variant ({None, 'temp', 'insitu', 'ctemp', 'conservative', 'atemp', 'absolute', 'ptemp', 'potential'}) –

    Restrict checking to a given variant(s)

    • None: No restriction

    • 'temp'|'insitu': In situ

    • 'ctemp'|'conservative': Conservative temperature

    • 'atemp'|'absolute': Absolute temperature

    • 'ptemp'|'potential': Potential temperature

  • errors (str) – Error handling: "ignore", "warn" or "raise".

Returns:

xarray.DataArray, None – The temperature array, or None if not found. If several arrays match and errors is "warn", the first one is returned.

See also

is_temp, get_sal, get_dens