wrf.decorators.convert_units

wrf.decorators.convert_units(unit_type, alg_unit)

A decorator that converts the units from the wrapped function’s output.

The desired units are determined from the wrapped function’s arguments.

Parameters:
  • unit_type (str) – The unit type. Choices are: ‘wind’, ‘pressure’, ‘temp’, or ‘height’.
  • alg_unit (str) – The units returned by the wrapped function, which is usually the units returned by the Fortran routine.
Returns:

The wrapped function’s output in the desired units.

Return type:

numpy.ndarray