wrf.decorators.extract_and_transpose

wrf.decorators.extract_and_transpose(do_transpose=True, outviews='outview')

A decorator to extract the data array from a xarray.DataArray

This decorator also transposes the view of the data to Fortran contiguous if do_transpose is True.

Parameters:
  • do_transpose – Set to False to only extract the variable. When True, the extracted array will also be transposed to a Fortran view if it is not already Fortran contiguous.
  • outviews (str or a sequence) – A single key or sequence of keys that indicate the wrapped function’s keyword argument to use as the output variable(s) in the wrapped function.
Returns:

A numpy array. If do_transpose is True, the numpy array will also be a Fortran contiguous view.

Return type:

numpy.ndarray