NCL Website header
NCL Home > Documentation > Functions > Meteorology

pot_temp_equiv

Compute the equivalent potential temperature using an approximation which does not use the lifting condensation temperature.

Available in version 6.4.0 and later.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  ; This library is automatically loaded
                                                             ; from NCL V6.2.0 onward.
                                                             ; No need for user to explicitly load.

	function pot_temp_equiv (
		p              : numeric,  ; float, double, integer only
		t              : numeric,  
		w              : numeric,  
		dim        [1] : integer,  
		humVarType [1] : string    
	)

	return_val [dimsizes(t)] :  float or double

Arguments

p

Array containing pressure levels (Pa).

t

Array containing temperatures (K).

w

Array containing the humidity related quantity. See the humVarType argument description.

dim

The dimension of t which corresponds to p. NOTE: If the rank and sizes of t are the same as those of p this argument is ignored. A suggested placeholder is dim=-1.

humVarType

Identifies the quantity associated with the w argument.

  • "q" for specific humidity (dimensionless: kg/kg)
  • "r" for mixing ratio (dimensionless: kg/kg)
  • "rh" for relative humidity (%)
  • "td" for dew point depression (K)

Return value

A multi-dimensional array of the same size and shape as t. The output will be double if t or p is of type double. All approprate meta data is returned.

Description

Calculate the equivalent potential temperature (theta_e). Over the years there have been numerous methods used to estimate equivalent potential temperature. Some are appropriate only for limited ranges. None agree 'perfectly.'

This function uses the formulation described in the Wikipedia reference:

    Wikipedia: Equivalent Potential Temperature
As noted in www.atmo.arizona.edu/students/courselinks/.../EquivalentPotentialTemperature.doc: "The problem with this approximate equation is that it assumes all of the water vapor is condensed out and converted to sensible heat at the present pressure of the air parcel. This is incorrect because the water condenses out as the air parcel is lifted into the uppermost troposphere where the pressure is lower such that the adiabatic compression when the air is brought to the surface will be larger. So we can anticipate this equation will systematically underestimate theta_e."

A weakness of this formulation is that it does not use the "lifting condensation temperature." For researchers analyzing buoyancy differences among tropical disturbances this simplification (omission) can be lead to significantly different theta_e.

It is recommended to use pot_temp_equivtlcl available in NCL 6.5.0.

See Also

pot_temp_equiv wrf_eth, ref="http://www.ncl.ucar.edu/Document/Functions/meteo.shtml">Meteorology functions,

Examples

Example 1: Compare with the WRF function, wrf_eth. Differences may be due to different algorithms and/or constants. Note that extra coding is necessary to 'broadcast' the one-dimension (1D) array to 3D for use by the WRF function.


; pressure (Pa)
     p  = (/ 97067.80, 96040.00, 94825.50, 93331.30, 91371.40, 88947.80, 86064.70, 82495.50 \
           , 78140.20, 73035.40, 67383.70, 61327.50, 54994.70, 48897.30, 43034.60, 37495.20 \
           , 32555.80, 28124.40, 24201.00, 20693.00, 17600.60, 14877.30, 12477.20, 10400.20 \
           ,  8553.98,  6984.69,   646.18 /)

; temperature (K)
     t  = (/  291.15,    291.60,   292.05,  292.13,    292.06,   291.17,   289.11,  287.49 \
           ,  286.25,    282.14,   277.42,  272.91,    266.99,   261.64,   254.40,  246.38 \
           ,  238.10,    229.76,   220.88,  213.65,    212.42,   212.58,   212.91,  213.34 \
           ,  213.73,    214.55,   216.59 /)  
     
; specific humidity (kg/kg; dimensionless))
     w  = (/0.012258,  0.012111, 0.011914, 0.011483, 0.010575, 0.008992, 0.006021,0.002559 \
           ,0.005169,  0.005746, 0.001608, 0.001645, 0.001382, 0.000235, 0.000094,0.000178 \
           ,0.000136,  0.000079, 0.000050, 0.000025, 0.000023, 0.000023, 0.000014,0.000010 \
           ,0.000008,  0.000007, 0.000007 /)

; Compute 
     dim = 0
     ept = pot_temp_equiv(p, t, w, dim, "q")  

; Compare with WRF function (different algorithm)
; The wrf_eth requires 3D or 4D input. Use conform_dims to force desired dimensionality.

; compare with 'wrf_eth' ... this requires 3D or 4D

  klvl = dimsizes(p)

  p3   = conform_dims((/klvl,1,1/), p, 0)
  t3   = conform_dims((/klvl,1,1/), t, 0)
  w3   = conform_dims((/klvl,1,1/), w, 0)

  ept_wrf = wrf_eth ( w3, t3, p3 )     ; [klvl] x [1] x [1]

  ept_dif = ept-ept_wrf(:,0,0)         ; difference

  print(sprintf("%8.2f", p)  +"  " \
       +sprintf("%8.2f", t)  +"  " \
       +sprintf("%9.6f", w)  +"  " \
       +sprintf("%7.2f", ept)+"  " \
       +sprintf("%7.2f", ept_wrf(:,0,0)) \
       +sprintf("%9.2f", ept_dif))

would yield
           P          T         W        ept    ept_wrf     diff
(0)	97067.80    291.15   0.012258   324.91   328.77    -3.86
(1)	96040.00    291.60   0.012111   325.97   329.91    -3.94
(2)	94825.50    292.05   0.011914   327.10   331.12    -4.01
(3)	93331.30    292.13   0.011483   327.55   331.53    -3.98
(4)	91371.40    292.06   0.010575   327.09   330.91    -3.82
(5)	88947.80    291.17   0.008992   324.52   327.91    -3.40
(6)	86064.70    289.11   0.006021   317.57   320.08    -2.51
(7)	82495.50    287.49   0.002559   310.51   311.95    -1.43
(8)	78140.20    286.25   0.005169   321.08   323.34    -2.26
(9)	73035.40    282.14   0.005746   324.44   326.65    -2.21
(10)	67383.70    277.42   0.001608   315.05   316.00    -0.95
(11)	61327.50    272.91   0.001645   318.56   319.47    -0.91
(12)	54994.70    266.99   0.001382   320.83   321.58    -0.75
(13)	48897.30    261.64   0.000235   321.71   321.95    -0.24
(14)	43034.60    254.40   0.000094   323.99   324.13    -0.14
(15)	37495.20    246.38   0.000178   326.67   326.86    -0.19
(16)	32555.80    238.10   0.000136   328.58   328.74    -0.16
(17)	28124.40    229.76   0.000079   330.41   330.54    -0.13
(18)	24201.00    220.88   0.000050   331.47   331.59    -0.12
(19)	20693.00    213.65   0.000025   335.21   335.32    -0.11
(20)	17600.60    212.42   0.000023   349.03   349.16    -0.13
(21)	14877.30    212.58   0.000023   366.49   366.63    -0.15
(22)	12477.20    212.91   0.000014   385.95   386.11    -0.16
(23)	10400.20    213.34   0.000010   407.35   407.53    -0.18
(24)	 8553.98    213.73   0.000008   431.53   431.73    -0.20
(25)	 6984.69    214.55   0.000007   459.00   459.23    -0.23
(26)	  646.18    216.59   0.000007   914.70   915.57    -0.87

Example 2: Consider p, t and w with dimensionality (ntim,klev,nlat,mlon) and appropriate units. Here w contains mixing ratio (humVarType="r"). Since all variables conform, the dim argument is ignored (set to -1 for convenience or 1)


     theta_e = pot_temp_equiv(p, t, w, -1, "r") ; dim=-1 or 1  

Example 3: Consider t and w with dimensionality (ntim,klev,nlat,mlon) and p(klev). Here w contains relative humidity (%; humVarType="rh"). This is commonly encountered for isobaric analyses. Here, NCL's dimension numbering is (0[ntim],1[klev],2[nlat],3[mlon]) so dim=1.

     theta_e = pot_temp_equiv(p, t, w, 1, "rh")