polaris.ocean.vertical.diagnostics.location_for_field
- polaris.ocean.vertical.diagnostics.location_for_field(var, field_name=None)[source]
The variable location of
varto look up its vertical coordinateA field on
nVertLevelsP1is defined at layer interfaces — the top of each layer, plus one more for the bottom of the column. A field listed undervariables_at_layer_topsinvariables.yamlis defined at the top of each layer but written onnVertLevels. Everything else is a layer quantity, defined at layer midpoints.- Parameters:
var (xarray.DataArray) – The field to plot or analyze
field_name (str, optional) – The name of
varin its dataset, used to check whether it is a layer-top field
- Returns:
location ({‘cell-center’, ‘cell-interfaces’, ‘cell-top’}) – The variable location suitable for
vertical_coord_from_location()