salem.DataArrayAccessor.interpz

DataArrayAccessor.interpz(zcoord, levels, dim_name='', fill_value=nan, use_multiprocessing=True)[source]

Interpolates the array along the vertical dimension

Parameters:
zcoord: DataArray

the z coordinates of the variable. Must be of same dimensions

levels: 1dArray

the levels at which to interpolate

dim_name: str

the name of the new dimension

fill_valuenp.nan or ‘extrapolate’, optional

how to handle levels below the topography. Default is to mark them as invalid, but you might want the have them extrapolated.

use_multiprocessing: bool

set to false if, for some reason, you don’t want to use mp

Returns:
a new DataArray with the interpolated data