SUBROUTINE robitzsch_etheta(temp,RH,pr, theta,theta_e,sat_theta_e,wmr)
! calculate equivalent potential temperature (Theta_e)
! using Temperature (T; in degree Kelvin!), Relative Humidity (RH)
! and Pressure (p) for objective analysis data
!
! [OUTPUT]
! theta : potential temperature (K)
! theta_e : equivalent potential temperature (K)
! sat_theta_e : saturated equivalent potential temperature (K)
! wmr : water mixing ratio (g/g)
!
!!! Copied from "96spr_HW_e-theta"
! Latent heat (Le) is defined as follows (see Pruppacher and Klett, 1978):
! Le=597.3*(273.15/T)**alpha
! alpha=0.167+T*3.67*10**(-4)
! T [K], Le [cal/g]
! unit convert from Le [cal/g] => Le' [J/kg]
! Le' = Le*4.19*10**3
! that is,
! Le=4.18605*597.3*((273.15/temp)**alpha)*10**3
!
! 1st release: 4 April 1996
! 2nd release: 10 October 2004
! 3rd updated: 25 December 2006
! 4th updated: 24 January 2007
! last updated: 5 January 2009
! written by M. HAYASAKI
!
! from Robitzsch (1928)
! ##### e-theta = Te * (p0/pr)**(Rd/Cpd)
! Te : equivalent temp. [K]
! Te = T + L*WMR/Cpd
! LH : Latent heat of water (J/g)
! L = 4.19*( 597.0 - 0.51*Temp ) <= function of Temp.
! [cal/g] [deg C]
! 597.0[cal/g]=2.50*10**3 [J/kg]
! 1.0 cal = 4.18605 J
! WMR : water mixing ratio [g/g]
! WMR = 0.622*E/(pr - E)
! E : Vapour pressure [hPa]
! E = RH*Es/100
!
! *** Tetens's experimental equation (1930) ***
! Es = 6.1078*10**((T * A)/(T + B))
! A = 7.5 } for use in
! B = 237.3 } vapor pressure with respect to water
! * A = 9.5 } for use in vapor pressure
! B = 265.5 } with respect to ice
REAL, PARAMETER :: p0=1000.0, R=287.0, Cp=1004.0
REAL, INTENT(IN) :: temp, RH, pr
REAL, INTENT(OUT) :: theta, theta_e, sat_theta_e, wmr
REAL :: c, power, E, Es, LH, Te
REAL :: kappa, sat_wmr
REAL :: dry_pr
! +++ Get theta
kappa = R / Cp
theta = temp * ( (p0/pr) ** kappa )
! +++ case selection by Temperature
! !! DO NOT proper for using real atmosphere
! Because of existence of "super-cooled water"
c=temp-273.15 ! convert into degree celsius
!! if(c.gt.0) then
!! power=(c*7.5)/(c+237.3)
!! else
!! power=(c*9.5)/(c+265.5)
!! endif
! For the reason of the mentioned above,
! "power" set to "water surface" version for the convinience!
power=(c*7.5)/(c+237.3)
ES = 6.1078*10**power
E = Es * RH / 100.0
LH = 4.19 * (597.0 - 0.51*c)*1.0E+3
WMR = 0.622 * E / (pr - E) ! mixing ratio (g/g)
Te = temp + LH * WMR / Cp
!!! robitzsch_etheta = Te*(p0/pr)**(R/Cp)
! +++ Using a "dry_pr" is a TEST!
dry_pr = pr - E ! partial pressure of dry air
! theta_e = Te * (p0 / pr) ** kappa
theta_e = Te * (p0 / dry_pr) ** kappa
! +++ calculate saturated equivalent potential temperature (theta_e^*)
sat_WMR = 0.622 * Es / (pr - Es) ! saturated mixing ratio (g/g)
Te = temp + LH * sat_WMR / Cp
! sat_theta_e = Te * (p0 / pr) ** kappa
sat_theta_e = Te * (p0 / dry_pr) ** kappa
! print *, "mixing ratio (g/kg) = ",W*1.0E+3
! print *, "Theta_e = ",robitzsch_etheta
RETURN
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! CHANGES:
! Add argument "sat_theta_e" (24Jan2007)
! Convert characters from small into capital in ... (26Dec2006)
! 1st release: Made for springtime homework of HLT labo. (04Apr1996)