wrf.destagger¶
-
wrf.
destagger
(var, stagger_dim, meta=False)¶ Return the variable on the unstaggered grid.
This function destaggers the variable by taking the average of the values located on either side of the grid box.
Parameters: - var (
xarray.DataArray
ornumpy.ndarray
) – A variable on a staggered grid. - stagger_dim (
int
) – The dimension index to destagger. Negative values can be used to choose dimensions referenced from the right hand side (-1 is the rightmost dimension). - meta (
bool
, optional) – Set to False to disable metadata and returnnumpy.ndarray
instead ofxarray.DataArray
. Default is False.
Returns: The destaggered variable. If xarray is enabled and the meta parameter is True, then the result will be a
xarray.DataArray
object. Otherwise, the result will be anumpy.ndarray
object with no metadata.Return type: - var (