VAPoR  0.1
Functions
vapor_wrf Namespace Reference

Functions

def CTT (P, PB, T, QCLOUD, QICE)
 
def CTHGT (P, PB, T, QCLOUD, QICE, ELEVATION)
 
def DBZ (P, PB, QRAIN, QGRAUP, QSNOW, T, QVAPOR, iliqskin=0, ivarint=0)
 
def DBZ_MAX (P, PB, QRAIN, QGRAUP, QSNOW, T, QVAPOR, iliqskin=0, ivarint=0)
 
def ETH (P, PB, T, QVAPOR)
 
def PV (T, P, PB, U, V, ELEV, F)
 
def RH (P, PB, T, QVAPOR)
 
def SHEAR (U, V, P, PB, level1=200., level2=850.)
 
def SLP (P, PB, T, QVAPOR, ELEVATION)
 
def TD (P, PB, QVAPOR)
 
def TK (P, PB, T)
 
def wrf_deriv_findiff (A, ELEV, dir)
 
def wrf_grad_findiff (A, ELEV)
 
def wrf_div_findiff (A, B, C, ELEV)
 
def wrf_curl_findiff (A, B, C, ELEV)
 

Detailed Description

vapor_wrf module includes following WRF-based utilities:
    CTT - cloud-top temperature (2D)
    DBZ - radar reflectivity
    DBZ_MAX - max radar reflectivity over vertical column
    ETH - equivalent potential temperature
    RH - relative humidity
    PV - potential vorticity
    SHEAR - horizontal wind shear
    SLP - sea-level pressure (2D)
    TD - dewpoint temperature
    TK - temperature in degrees Kelvin.
    CTHGT - cloud-top height
    wrf_deriv_findiff - 6th order finite-difference derivative  wrf_curl_findiff - finite-difference curl
    wrf_grad_findiff - finite-difference gradient
    wrf_div_findiff - finite-difference divergence

Function Documentation

◆ CTHGT()

def vapor_wrf.CTHGT (   P,
  PB,
  T,
  QCLOUD,
  QICE,
  ELEVATION 
)
Calculate cloud-top height using WRF variables.
Calling sequence: VAL=CTHGT(P,PB,T,QCLOUD,QICE,ELEVATION)
Where P,PB,T,QCLOUD,QICE are 3D WRF variables.
(Replace QICE by 0 if not in data)
Result VAL is a 2D variable.

Definition at line 64 of file vapor_wrf.py.

References vapor.VariableExists().

◆ CTT()

def vapor_wrf.CTT (   P,
  PB,
  T,
  QCLOUD,
  QICE 
)
Calculate cloud-top temperature using WRF variables.
Calling sequence: VAL=CTT(P,PB,T,QCLOUD,QICE)
Where P,PB,T,QCLOUD,QICE are 3D WRF variables.
(Replace QICE by 0 if not in data)
Result VAL is a 2D variable.

Definition at line 20 of file vapor_wrf.py.

References vapor.VariableExists().

◆ DBZ()

def vapor_wrf.DBZ (   P,
  PB,
  QRAIN,
  QGRAUP,
  QSNOW,
  T,
  QVAPOR,
  iliqskin = 0,
  ivarint = 0 
)
Calculates 3D radar reflectivity based on WRF variables.
Calling sequence: 
VAL = DBZ(P,PB,QRAIN,QGRAUP,QSNOW,T,QVAPOR,iliqskin=0,ivarint=0)
Where P,PB,QRAIN,QGRAUP,QSNOW,T,and QVAPOR are WRF 3D variables.
Optional arguments iliqskin and ivarint default to 0
if iliqskin=1, then frozen particles above freezing are
assumed to scatter as a liquid particle.  If ivarint = 1 then
intercept parameters are calculated based on Thompson, Rasmussen
and Manning, as described in 2004 Monthly Weather Review.
Result VAL is 3D variable on same grid as WRF variables.
If QGRAUP or QSNOW are not available then replace them by 0.

Definition at line 109 of file vapor_wrf.py.

References vapor.VariableExists().

Referenced by DBZ_MAX().

◆ DBZ_MAX()

def vapor_wrf.DBZ_MAX (   P,
  PB,
  QRAIN,
  QGRAUP,
  QSNOW,
  T,
  QVAPOR,
  iliqskin = 0,
  ivarint = 0 
)
Calculates 2D radar reflectivity based on WRF variables.
Calling sequence: VAL = DBZ_MAX(P,PB,QRAIN,QGRAUP,QSNOW,T,QVAPOR)
Where P,PB,QRAIN,QGRAUP,QSNOW,T,and QVAPOR are WRF 3D variables.
Optional arguments iliqskin and ivarint default to 0, as
described in help(DBZ)
Result VAL is 2D variable on 2D grid of WRF variables.
VAL is the maximum over a vertical column of DBZ.
If QGRAUP or QSNOW are not available then replace them by 0.

Definition at line 198 of file vapor_wrf.py.

References DBZ().

◆ ETH()

def 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.

Definition at line 212 of file vapor_wrf.py.

◆ PV()

def vapor_wrf.PV (   T,
  P,
  PB,
  U,
  V,
  ELEV,
  F 
)
Routine that calculates potential vorticity using WRF variables.
Calling sequence: WRF_PV = PV(T,P,PB,U,V,ELEV,F)
Where T,P,PB,U,V are WRF 3D variables, F is WRF 2D variable.
ELEV is the VAPOR ELEVATION variable (PH+PHB)/g
Result is 3D variable WRF_PV.

Definition at line 240 of file vapor_wrf.py.

References vapor_utils.deriv_var_findiff(), and wrf_deriv_findiff().

◆ RH()

def 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.

Definition at line 260 of file vapor_wrf.py.

◆ SHEAR()

def vapor_wrf.SHEAR (   U,
  V,
  P,
  PB,
  level1 = 200.,
  level2 = 850. 
)
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.

Definition at line 281 of file vapor_wrf.py.

References vapor_utils.interp3d().

◆ SLP()

def vapor_wrf.SLP (   P,
  PB,
  T,
  QVAPOR,
  ELEVATION 
)
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.

Definition at line 299 of file vapor_wrf.py.

◆ TD()

def 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.

Definition at line 353 of file vapor_wrf.py.

◆ TK()

def 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.

Definition at line 370 of file vapor_wrf.py.

◆ wrf_curl_findiff()

def vapor_wrf.wrf_curl_findiff (   A,
  B,
  C,
  ELEV 
)
Operator that calculates the curl of a vector field 
using 6th order finite differences, on a layered (e.g. WRF) grid.
Calling sequence:  curlfield = wrf_curl_findiff(A,B,C,ELEV)
Where:
A,B,C are three 3-dimensional float32 arrays that define a
vector field on a layered grid
ELEV is the ELEVATION variable for the layered grid.  
curlfield is a 3-tuple of 3-dimensional float32 arrays that is 
returned by this operator.

Definition at line 443 of file vapor_wrf.py.

References vapor_utils.deriv_findiff(), vapor_utils.deriv_var_findiff(), and vapor.MapVoxToUser().

◆ wrf_deriv_findiff()

def vapor_wrf.wrf_deriv_findiff (   A,
  ELEV,
  dir 
)
Operator that calculates the derivative of a WRF (or layered) variable A
in the direction dir (user coordinates; in Python the direction is reversed) 
ELEV is the ELEVATION variable. 

Definition at line 382 of file vapor_wrf.py.

References vapor_utils.deriv_findiff(), vapor_utils.deriv_var_findiff(), and vapor.MapVoxToUser().

Referenced by PV(), wrf_div_findiff(), and wrf_grad_findiff().

◆ wrf_div_findiff()

def vapor_wrf.wrf_div_findiff (   A,
  B,
  C,
  ELEV 
)
Operator that calculates the divergence of a vector field
using 6th order finite differences.
Calling sequence:  DIV = wrf_div_findiff(A,B,C,ELEV)
Where:
A, B, and C are 3-dimensional float32 arrays defining a vector field.
A is the x-component, B is y, C is z (in user coordinates)
ELEV is the ELEVATION variable
Resulting DIV is a 3-dimensional float3d array consisting of
the divergence of the triple (A,B,C).

Definition at line 428 of file vapor_wrf.py.

References wrf_deriv_findiff().

◆ wrf_grad_findiff()

def vapor_wrf.wrf_grad_findiff (   A,
  ELEV 
)
Operator that calculates the gradient of a scalar field 
using 6th order finite differences on a WRF (layered) grid
Calling sequence:  GRD = grad_findiff(A,ELEV)
Where:
A is a float32 array defining a scalar field.
ELEV is the corresponding ELEVATION array
Result GRD is a triple of 3 3-dimensional float3d arrays consisting of
the gradient of A.

Definition at line 412 of file vapor_wrf.py.

References wrf_deriv_findiff().