The vapor_wrf module#

The vapor_wrf module comes with functions that are useful for WRF-ARW output. For example, the following can be used to calculate relative humidity once the appropriate variables have been selected and a new relativeHumidity variable has been defined in the gui. See below for all available functions.

from vapor_wrf import *
relativeHumidity = RH(P, PB, T, QVAPOR)

vapor_wrf module includes following WRF-based utilities: ETH - equivalent potential temperature RH - relative humidity SHEAR - horizontal wind shear SLP - sea-level pressure (2D) TD - dewpoint temperature TK - temperature in degrees Kelvin.

vapor_wrf.ETH(P, PB, T, QVAPOR)#

Program to calculate equivalent potential temperature using WRF variables P, PB, T, QVAPOR. Calling sequence: WRF_ETH = ETH(P,PB,T,QVAPOR) Result WRF_ETH is a 3D variable on same grid as P,PB,T,QVAPOR.

vapor_wrf.RH(P, PB, T, QVAPOR)#

Calculation of relative humidity. Calling sequence WRF_RH = RH(P,PB,T,QVAPOR), where P,PB,T,QVAPOR are standard WRF 3D variables, result WRF_RH is 3D variable on same grid as inputs.

vapor_wrf.SHEAR(U, V, P, PB, level1=200.0, level2=850.0)#

Program calculates horizontal wind shear Calling sequence: SHR = SHEAR(U,V,P,PB,level1,level2) where U and V are 3D wind velocity components, and result SHR is 3D wind shear. Shear is defined as the RMS difference between the horizontal velocity interpolated to the specified pressure levels, level1 and level2 (in millibars) which default to 200 and 850.


Calculation of Sea-level pressure. Calling sequence: WRF_SLP = SLP(P,PB,T,QVAPOR,ELEVATION) where P,PB,T,QVAPOR are WRF 3D variables and ELEVATION is the VAPOR variable indicating the elevation in meters above sea level. Result is a 2D variable with same horizonal extents as input variables.

vapor_wrf.TD(P, PB, QVAPOR)#

Calculation of dewpoint temperature based on WRF variables. Calling sequence: WRFTD = TD(P,PB,QVAPOR) where P,PB,QVAPOR are WRF 3D variables, and result WRFTD is a 3D variable on the same grid.

vapor_wrf.TK(P, PB, T)#

Calculation of temperature in degrees kelvin using WRF variables. Calling sequence: TMP = TK(P,PB,T) Where P,PB,T are WRF 3D variables, result TMP is a 3D variable indicating the temperature in degrees Kelvin.