Bolton, D. 1980: The Computation of Equivalent Potential Temperature, Monthly Weather Review, 108, 1046-1053.
相当温位の他に、飽和水蒸気圧、水蒸気圧、混合比、比湿の計算も可能
気温: temp
気圧: pha [hPa]
'theta=temp*pow((1000/' pha '),287/1004)'
気温: temp [K]
相対湿度: rh [%]
気圧: lev [hPa]
'tc=(temp-273.16)'
'td=tc-( (14.55+0.114*tc)*(1-0.01*rh) + pow((2.5+0.007*tc)*(1-0.01*rh),3) + (15.9+0.117*tc)*pow((1-0.01*rh),14) )'
'define vapr= 6.112*exp((17.67*td)/(td+243.5))'
'define e= vapr*1.001+(lev-100)/900*0.0034'
'define QVAPOR= 0.62197*(e/(lev-e))'
'undefine td'
'undefine tc'
'undefine vapr'
'undefine e'
'undefine dwpk'
気温: temp [K]
相対湿度: rh [%]
気圧: lev [hPa]
'tc=(temp-273.16)'
'td=tc-( (14.55+0.114*tc)*(1-0.01*rh) + pow((2.5+0.007*tc)*(1-0.01*rh),3) + (15.9+0.117*tc)*pow((1-0.01*rh),14) )'
'define vapr= 6.112*exp((17.67*td)/(td+243.5))'
'define e= vapr*1.001+(lev-100)/900*0.0034'
'define mixr= 0.62197*(e/(lev-e))'
'define theta=temp*pow(1000/lev,0.286)'
'define vpt=theta*(1.0 + 0.61*mixr)'
'undefine tc'
'undefine td'
'undefine vapr'
'undefine e'
'undefine mixr'
'undefine theta'
気温: temp [K]
相対湿度: rh [%]
気圧: lev [hPa]
#
# THETA-E FOR MSM DATA
#
'tc=(temp-273.16)'
'td=tc-( (14.55+0.114*tc)*(1-0.01*rh) +
pow((2.5+0.007*tc)*(1-0.01*rh),3) +
(15.9+0.117*tc)*pow((1-0.01*rh),14) )'
'define vapr= 6.112*exp((17.67*td)/(td+243.5))'
'define e= vapr*1.001+(lev-100)/900*0.0034'
'define mixr= 0.62197*(e/(lev-e))*1000'
'define dwpk= td+273.16'
'undefine td'
'define tlcl= 1/(1/(dwpk-56)+log(temp/dwpk)/800)+56'
'undefine e'
'define theta=temp*pow(1000/lev,0.286)'
'define ept=theta*exp((3.376/Tlcl-0.00254)*mixr*1.0+0.00081*mixr)'
'undefine vapr'
'undefine dwpk'
気温: temp
相対湿度: rh [%]
気圧: pha [hPa]
'es=6.1173*exp(((2.501*pow(10,6))/461.50)*(1/273.16 - 1/temp))'
'ws=621.97*(es/(' pha '-es))'
'w=(rh*ws)/(100*1000)'
'ept=(temp+((2.501*pow(10,6))/1004)*w)*pow((1000/' pha '),287/1004)'
subroutine potential_temperature(pt, tk, p)
!
implicit none
real,intent(out)::pt
! pt: potential temperature (kelvin)
real,intent(in)::tk,p
! tk: absolute temperature (kelvin)
! p : pressure (hPa)
real,parameter:: kappa=287.0/1004.0
! Rd=287 J K-1 kg-1
! Cp=1004 J K-1 kg-1
real,parameter::p0=1000.0
! p0: pressue (hPa)
pt=tk*(p0/p)**kappa
end subroutine potential_temperature
subroutine virtual_potential_temperature(vpt, tk, p, rh)
!
implicit none
real,intent(out)::vpt
! pt: virtual potential temperature (kelvin)
real,intent(in)::tk,p,rh
! tk: absolute temperature (kelvin)
! p : pressure (hPa)
! rh: Relative Humidity (%)
real,parameter:: kappa=287.0/1004.0
! Rd=287 J K-1 kg-1
! Cp=1004 J K-1 kg-1
real,parameter::p0=1000.0
! p0: pressue (hPa)
real pt !Potential Temp.
real tc !air temp. in Celsius
real es !saturated water vapor pressure
real e !water vapor pressure
real w !Mixing Ratio
pt=tk*(p0/p)**kappa
! saturated water vapor pressure by Tetens (1930)'s formulae
tc=tk-273.15
es=611.0/100.*10**((7.5*tc)/(237.3+tc)) ![hPa]
e=rh/100*es
! water vapor mixing ratio in kg/kg
w=0.622*e/(p-e)
vpt=pt*(1.0 + 0.61*w)
end subroutine virtual_potential_temperature
Linuxコマンドして使えるようにしたもの
program vpt
character(128) :: var(3)
num = iargc()
if(num /= 3)then
print '(A)','Error: Wrong number of arguments'
print '(A)','Usage: vpt tc p rh'
print *
stop
endif
call getarg(1,var(1))
call getarg(2,var(2))
call getarg(3,var(3))
read(var(1),*)tc
read(var(2),*)p
read(var(3),*)rh
tk=tc+273.15
call virtual_potential_temperature(thetav, tk, p, rh)
print *,thetav-273.15
stop
end program
subroutine virtual_potential_temperature(vpt, tk, p, rh)
!
implicit none
real,intent(out)::vpt
! pt: virtual potential temperature (kelvin)
real,intent(in)::tk,p,rh
! tk: absolute temperature (kelvin)
! p : pressure (hPa)
! rh: Relative Humidity (%)
real,parameter:: kappa=287.0/1004.0
! Rd=287 J K-1 kg-1
! Cp=1004 J K-1 kg-1
real,parameter::p0=1000.0
! p0: pressue (hPa)
real pt !Potential Temp.
real tc !air temp. in Celsius
real es !saturated water vapor pressure
real e !water vapor pressure
real w !Mixing Ratio
pt=tk*(p0/p)**kappa
! saturated water vapor pressure by Tetens (1930)'s formulae
tc=tk-273.15
es=611.0/100.*10**((7.5*tc)/(237.3+tc)) ![hPa]
e=rh/100*es
! water vapor mixing ratio in kg/kg
w=0.622*e/(p-e)
vpt=pt*(1.0 + 0.61*w)
end subroutine virtual_potential_temperature
コンパイル例
$ ifort vpt.f90 -o vpt
実行例
$ ./vpt 25 1010 80
27.05719
エラーメッセージ例
引数の数が足らないとエラーとなって終了
$ ./vpt
Error: Wrong number of arguments
Usage: vpt tc p rh
実行例
2018-09-22_17-44
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ test_ept_sept.run.sh
-rwxrwxr-x 1 am am 816K 9月 22 17:44 test_ept_sept.exe
tk, p, RH = 299.1 900.0 80.0
tc p RH es e r ept sept
26.0 900.0 80.0 33.6 26.9 19.2 366.7 382.2
2018-09-22_17-43
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ ncl -nQ <ncl_ept_sept.ncl
tk p qv
299.1 90000.0 0.01916
tc ph RH es e r ept
26.0 900.0 80.0 33.6 26.9 19.2 366.7
2018-09-22_17-42
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ test_ept_sept.run.sh
-rwxrwxr-x 1 am am 816K 9月 22 17:43 test_ept_sept.exe
tk, p, RH = 299.1 1000.0 80.0
tc p RH es e r ept sept
26.0 1000.0 80.0 33.6 26.9 17.2 349.5 362.7
2018-09-22_17-42
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ ncl -nQ <ncl_ept_sept.ncl
tk p qv
299.1 100000.0 0.01719
tc ph RH es e r ept
26.0 1000.0 80.0 33.6 26.9 17.2 349.5
2018-09-22_17-41
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ test_ept_sept.run.sh
-rwxrwxr-x 1 am am 816K 9月 22 17:41 test_ept_sept.exe
tk, p, RH = 303.1 1000.0 100.0
tc p RH es e r ept sept
30.0 1000.0 100.0 42.5 42.5 27.6 386.3 386.3
2018-09-22_17-41
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ ncl -nQ <ncl_ept_sept.ncl
tk p qv
303.1 100000.0 0.02758
tc ph RH es e r ept
30.0 1000.0 100.0 42.5 42.5 27.6 386.3
2018-09-22_17-03
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ test_ept_sept.run.sh
-rwxrwxr-x 1 am am 815K 9月 22 17:07 test_ept_sept.exe
tc p RH es e r ept sept
20.0 850.0 50.0 23.4 11.7 8.7 333.6 360.3
2018-09-22_17-24
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ ncl -nQ <ncl_ept_sept.ncl
tk p qv
293.1 85000.0 0.00867
tc ph RH es e r ept
20.0 850.0 50.0 23.4 11.7 8.7 333.7
2018-09-22_17-34
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ test_ept_sept.run.sh
-rwxrwxr-x 1 am am 816K 9月 22 17:35 test_ept_sept.exe
tk, p, RH = 283.1 700.0 10.0
tc p RH es e r ept sept
10.0 700.0 10.0 12.3 1.2 1.1 317.3 348.1
2018-09-22_17-35
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ ncl -nQ <ncl_ept_sept.ncl
tk p qv
283.1 70000.0 0.00109
tc ph RH es e r ept
10.0 700.0 10.0 12.3 1.2 1.1 317.4
2018-09-22_17-35
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
am@localhost
$ table_ept_sept.run.sh
-rwxrwxr-x 1 am am 817K 9月 22 17:36 table_ept_sept.exe
ntc= 21
n tc sept chk ept p RH
1 40.0 479.4 478.4 479.4 1000.0 100.0
2 38.0 455.3 454.8 455.3 1000.0 100.0
3 36.0 434.5 434.2 434.5 1000.0 100.0
4 34.0 416.3 416.5 416.3 1000.0 100.0
5 32.0 400.4 400.5 400.4 1000.0 100.0
6 30.0 386.3 386.2 386.3 1000.0 100.0
7 28.0 373.8 373.8 373.8 1000.0 100.0
8 26.0 362.7 362.6 362.7 1000.0 100.0
9 24.0 352.7 352.8 352.7 1000.0 100.0
10 22.0 343.7 343.5 343.7 1000.0 100.0
11 20.0 335.6 335.5 335.6 1000.0 100.0
12 18.0 328.2 328.0 328.2 1000.0 100.0
13 16.0 321.5 321.3 321.5 1000.0 100.0
14 14.0 315.4 315.3 315.4 1000.0 100.0
15 12.0 309.8 309.6 309.8 1000.0 100.0
16 10.0 304.6 304.4 304.6 1000.0 100.0
17 8.0 299.8 299.6 299.8 1000.0 100.0
18 6.0 295.3 295.0 295.3 1000.0 100.0
19 4.0 291.2 290.8 291.2 1000.0 100.0
20 2.0 287.3 286.9 287.3 1000.0 100.0
21 0.0 283.6 283.4 283.6 1000.0 100.0
chk: TABLE 78 OF Smithsonian Meteorological Tables (p. 319)
ソースファイル
#------------------------------
# List of the following files:
#------------------------------
test_ept_sept.f90
test_ept_sept.run.sh
ept_sept.f90
ncl_ept_sept.ncl
table_ept_sept.f90
table_ept_sept.run.sh
#------------------------------
# Machine info
#------------------------------
localhost
/work3/am/2018.KUROSHIO.CONVECTION/SNAPSHOT/SATURATED.EPT
Sat Sep 22 17:48:24 JST 2018
#======================
# test_ept_sept.f90
#======================
program test_ept_sept
implicit none
real ept,sept,es,e,r,tk,p,RH
real tc
integer::debug=0
namelist /para/tk,p,RH
read(*,nml=para)
tc=tk-273.15
print *
print '(A,3f7.1)','tk, p, RH = ',tk,p,RH
print '(A)',' tc p RH es e r ept sept'
call ept_sept(ept, sept, es, e, r, tk, p, RH, debug)
print '(8f7.1)',tc,p,RH,es,e,r,ept,sept
end program test_ept_sept
#----------------------
# End of test_ept_sept.f90
#----------------------
#======================
# test_ept_sept.run.sh
#======================
#!/bin/bash
tc=26.0
p=900.
RH=80.
tk=$(echo "scale=3;$tc + 273.15"|bc)
fc=ifort
opt=" -CB -traceback -fpe0 "
exe=$(basename $0 .run.sh).exe
src=$(basename $0 .run.sh).f90
nml=$(basename $0 .run.sh).nml
listsrc="$src ept_sept.f90"
for tmp in $listsrc; do
if [ ! -f $tmp ]; then
echo
echo "ERROR in $0 : NO SUCH FILE, $tmp"
echo
exit 1
fi
done
$fc -o $exe $listsrc $opt
if [ $? -ne 0 ]; then
echo
echo COMPLIE ERROR!
echo
exit 1
else
echo
ls -lh $exe
echo
fi
cat<<EOF >$nml
¶
tk=$tk
p=$p
RH=$RH
&end
EOF
$exe < $nml
if [ $? -ne 0 ];then
echo
echo "ERROR in $exe !"
echo
exit 1
fi
exit 0
#----------------------
# End of test_ept_sept.run.sh
#----------------------
#======================
# ept_sept.f90
#======================
subroutine ept_sept(ept, sept, es, e, r, tk, p, RH, debug)
! Author: am
!
! EPT
! Bolton, D., 1980: The computation of equivalent potential
! Temperature, Monthly Weather Review, 108, 1046-1053.
! url: http://www.rsmas.miami.edu/users/pzuidema/Bolton.pdf
!
! "The most accurate formula to data is from Bolton (1980).
! It computes EPT to accuracy, relative to numerical
! solutions of the governing equation, better than 0.02 K."
! Davies-Jones (MWR, 2009)
! SATURATED EPT
! https://unidata.github.io/MetPy/latest/api/generated/
! metpy.calc.saturation_equivalent_potential_temperature.html
implicit none
real,intent(out)::ept,sept,es,e,r
! ept: equivalent potential temperature (kelvin)
!sept: saturated equivalent potential temperature (kelvin)
! es: saturated water vapor pressure (hPa)
! e: water vapor pressure (hPa)
! r: water-vapor mixing ratio (g/kg)
real,intent(in)::tk,p,RH
! tk: absolute temperature (kelvin)
! p : pressure (hPa)
! RH : relative humidity (%)
integer,intent(in)::debug
real u,tc
! u : relative humidity (%)
! tc: temperature (degree Celsius)
real,parameter::p0=1000.0
! p0: pressue (hPa)
! Shimizus
real,parameter::L=2.5*1.e6
real,parameter::Rv=461.0
! L : latent heat
! Rv: gas constant
real tl
! tl: Absolute temperature at lifting condensation level (LCL)
! (kelvin)
real pt
! pt : potential temparature
real pow,arg11,arg12,exp1, denom
real A
real numer, C
real rs
!rs : saturated mixing ratio (g/kg)
real,parameter::kappa=0.2854
real arg21,arg22
u=RH
denom=1.0/(tk - 55.0) - log(u/100.0)/2840.0
tl = 1.0/denom + 55.0
! CHECK VALUES FOR tl
! 1/(1/(280-55))+55=280 (RH=100%)
! 1/(1/(280-55)-(log(50/100)/2840))+55=274.758 (RH=50%)
!A = (tk- 273.2)/(273.2*tk)
!es = 6.11*exp(A*L/Rv)
tc=tk-273.15
! Eq.(10) of B80 (p.1047)
es=6.112*exp((17.67*tc)/(tc+243.5)) !hPa
e=RH/100.0 * es !hPa
r = (0.622 * e/ (p - e))*1.E3 !g/kg
! Eq.(43) of B80. (p.1052)
pow=0.2854*(1.0 - 0.28*0.001*r)
pt=tk*(p0/p)**pow
arg11 = 3.376/tl - 0.00254
arg12 = r*(1.0 + 0.81 * 1.0E-3*r)
exp1=exp( arg11 * arg12 )
ept=pt * exp1
! SATURATED EPT
! https://unidata.github.io/MetPy/latest/api/generated/
! metpy.calc.saturation_equivalent_potential_temperature.html
!pt=tk*(p0/p)**kappa
!Eq.(39) of B80 (p.1052)
rs=(0.622 * es/ (p - es))*1.E3 !g/kg
pow=0.2854*(1.0 - 0.28*0.001*rs)
pt=tk*(p0/p)**pow
arg21=3.376/tk - 0.00254
arg22 = rs*(1.0 + 0.81 * 1.0E-3*rs)
!arg21=3036./tk-1.78
!arg22=r*1.E-3*(1.0+0.448*r*1.E-3)
sept=pt*exp(arg21 * arg22)
if(debug/=0)then
print *
print '(A)','CHECK:'
print '(A,f10.2)','tc = ',tc
print '(A,f10.2)','es = ',es
print '(A,f10.2)','e = ',e
print '(A,f10.2)','tl = ',tl
print '(A,f10.2)','rs = ',rs
print '(A,f10.2)','r = ',r
print '(A,f10.2)','pt = ',pt
end if
!
! Eq. (6.3) of Davies-Jones (MWR, 2009)
! numer = (2.771*1.E6 - 1109.0*(tl - 273.15))*r*1.E-3
! denom = 1005.7*tl
! ept=pt*exp(numer/denom)
! Eq. (2.5) of Davies-Jones (MWR, 2009)
! ept = pt*exp((2.690*1.E6 * 1.0E-3 * r)/(1005.7*tl) )
end subroutine ept_sept
#----------------------
# End of ept_sept.f90
#----------------------
#======================
# ncl_ept_sept.ncl
#======================
tc=26.0 ;C
ph=900.0 ;hPa
RH=80. ;%
tk=new( (/1,1,1/), float)
p=new( (/1,1,1/), float)
qv=new( (/1,1,1/), float)
tk=tc+273.15 ;K
p=ph*100.0 ;Pa
; Eq.(10) of B80 (p.1047)
es=6.112*exp((17.67*tc)/(tc+243.5)) ;hPa
e=RH/100.0 * es ;hPa
r = (0.622 * e/ (ph - e))*1000.0 ;g/kg
qv(0,0,0) = r/1000.0 ;kg/kg
ept=wrf_eth ( qv, tk, p )
print(" tk p qv")
print(\
sprintf("%7.1f",tk)+\
sprintf("%12.1f",p)+\
sprintf("%12.5f",qv)\
)
print(" tc ph RH es e r ept")
print(\
sprintf("%7.1f",tc)+\
sprintf("%7.1f",ph)+\
sprintf("%7.1f",RH)+\
sprintf("%7.1f",es)+\
sprintf("%7.1f",e )+\
sprintf("%7.1f",r)+\
sprintf("%7.1f",ept(0,0,0))\
)
#----------------------
# End of ncl_ept_sept.ncl
#----------------------
#======================
# table_ept_sept.f90
#======================
program table_ept_sept
real ept,sept,tk,p,RH
real,allocatable::septchk(:)
character(len=100)::septcheck_file
namelist /para/septcheck_file
read(*,nml=para)
tcmax=40.0
tcmin=0.0
dtc=2.0
p=1000.0
RH=100.
debug=0
ntc=(tcmax-tcmin)/dtc+1
print *,'ntc=',ntc
allocate(septchk(ntc))
open(11,file=septcheck_file,action="read")
do n=1,ntc
read(11,*)temp,septchk(n)
enddo
print '(A)',' n tc sept chk ept p RH'
do n=1,ntc
tc=tcmax-float(n-1)*dtc
tk=tc+273.15
call ept_sept(ept, sept, es, e, r, tk, p, RH, debug)
print '(i5,6f7.1)',n,tc, sept, septchk(n), ept, p, RH
end do !n
print '(A)','chk: TABLE 78 OF Smithsonian Meteorological Tables (p. 319)'
end program table_ept_sept
#----------------------
# End of table_ept_sept.f90
#----------------------
#======================
# table_ept_sept.run.sh
#======================
#!/bin/bash
fc=ifort
opt=" -CB -traceback -fpe0"
exe=$(basename $0 .run.sh).exe
src=$(basename $0 .run.sh).f90
nml=$(basename $0 .run.sh).nml
listsrc="$src ept_sept.f90"
for tmp in $listsrc; do
if [ ! -f $tmp ]; then
echo
echo "ERROR in $0 : NO SUCH FILE, $tmp"
echo
exit 1
fi
done
$fc -o $exe $listsrc $opt
if [ $? -ne 0 ]; then
echo
echo COMPLIE ERROR!
echo
exit 1
else
echo
ls -lh $exe
echo
fi
# TABLE 78 OF Smithsonian Meteorological Tables (p. 319)
septcheck_file="septcheck_file.txt"
cat<<EOF>$septcheck_file
40 478.4
38 454.8
36 434.2
34 416.5
32 400.5
30 386.2
28 373.8
26 362.6
24 352.8
22 343.5
20 335.5
18 328.0
16 321.3
14 315.3
12 309.6
10 304.4
8 299.6
6 295.0
4 290.8
2 286.9
0 283.4
EOF
cat<<EOF>$nml
¶
septcheck_file="${septcheck_file}"
&end
EOF
$exe <$nml
if [ $? -ne 0 ];then
echo
echo "ERROR in $exe !"
echo
exit 1
fi
exit 0
#----------------------
# End of table_ept_sept.run.sh
#----------------------
古いバージョン
subroutine ept_bolton80_RH(ept, tk, p, RH)
! Author: am
! Revision history:
! This file is created by /usr/local/mybin/nff.sh at 11:29 on 11-02-2012.
!
! References:
! Bolton, D., 1980: The computation of equivalent potential
! Temperature, Monthly Weather Review, 108, 1046-1053.
! url: http://www.rsmas.miami.edu/users/pzuidema/Bolton.pdf
!
! "The most accurate formula to data is from Bolton (1980).
! It computes EPT to accuracy, relative to numerical
! solutions of the governing equation, better than 0.02 K."
! Davies-Jones (MWR, 2009)
implicit none
real,intent(out)::ept
! ept: equivalent potential temperature (kelvin)
real,intent(in)::tk,p,RH
! tk: absolute temperature (kelvin)
! p : pressure (hPa)
! RH : relative humidity (%)
real r,u,td
! r : water-vapor mixing ratio (g/kg)
! u : relative humidity (%)
real,parameter::p0=1000.0
! p0: pressue (hPa)
! Shimizus
real,parameter::L=2.5*1.e6
real,parameter::Rv=461.0
! L : latent heat
! Rv: gas constant
real tl, e
! tl: Absolute temperature at lifting condensation level (LCL)
! (kelvin)
! e: water vapor pressure (hPa)
real pt
! pt : potential temparature
real pow,arg1,arg2,exp1, denom
real A, es
real numer, C !
u=RH
denom=1.0/(tk - 55.0) - log(u/100.0)/2840.0
tl = 1.0/denom + 55.0
A = (tk- 273.2)/(273.2*tk)
es = 6.11*exp(A*L/Rv)
e = u * es * 0.01
r = (0.622 * e/ (p - e))*1.E3 ! mixing ratio g/kg
pow=0.2854*(1.0 - 0.28*0.001*r)
! Eq.(43) of B80.
arg1 = 3.376/tl - 0.00254
arg2 = r*(1.0 + 0.81 * 1.0E-3*r)
exp1=exp( arg1 * arg2 )
pt=tk*(p0/p)**pow
ept=tk*(p0/p)**pow * exp1
! Eq. (6.3) of Davies-Jones (MWR, 2009)
! numer = (2.771*1.E6 - 1109.0*(tl - 273.15))*r*1.E-3
! denom = 1005.7*tl
! ept=pt*exp(numer/denom)
! Eq. (2.5) of Davies-Jones (MWR, 2009)
! ept = pt*exp((2.690*1.E6 * 1.0E-3 * r)/(1005.7*tl) )
! write(*,'(a)')'Done subroutine ept_b80.'
! write(*,*)
end subroutine ept_bolton80_RH
!
! Check result
!
! http://hurri.kean.edu/~yoh/calculations/diagnostic/
!
! P=900 mb
! T=300 K
! r=23.22014 g/kg
! pt=309.1584
! tl=298.16249 K
! ept=380.47828 K
!
!
! [2012年 11月 2日 金曜日 18:06:36 JST]
! [am@aofd30 processor=x86_64]
! [/work1/am/WRF/Test_EPT_Bolton/src]
! $ run_ept_bolton80 < in.txt
! Program run_ept_bolton80 starts.
!
! Reading input data from the standard input using namelist.
! tk = 300.0000 [K]
! p = 900.0000 [hPa]
! r = 23.22014 [g/kg]
! td = -999.0000 [K]
! u = -999.0000 [%]
! fillvalue = -999.0000
! ! NB:
! ! If td or u equals fillvalue, it is not used for
! ! computation of equivalent potential temperature.
!
! Mixing ratio, r is used.
!
! ept = 380.4848 [K]
!
!Done program run_ept_bolton80.
! p=975 hPa
! tk=290 K
! r=10 g/kg
! ept=320.71316 K
!
! [2012年 11月 2日 金曜日 18:09:37 JST]
! [am@aofd30 processor=x86_64]
! [/work1/am/WRF/Test_EPT_Bolton/src]
! $ run_ept_bolton80 < in.txt
! Program run_ept_bolton80 starts.
!
! Reading input data from the standard input using namelist.
! tk = 290.0000 [K]
! p = 975.0000 [hPa]
! r = 10.00000 [g/kg]
! td = -999.0000 [K]
! u = -999.0000 [%]
! fillvalue = -999.0000
! ! NB:
! ! If td or u equals fillvalue, it is not used for
! ! computation of equivalent potential temperature.
!
! Mixing ratio, r is used.
!
! ept = 320.7140 [K]
!
! Done program run_ept_bolton80.
! p=500 hPa
! tk=275 K
! r = 2 g/kg
! ept=342.47232 K
![2012年 11月 2日 金曜日 18:12:13 JST]
![am@aofd30 processor=x86_64]
![/work1/am/WRF/Test_EPT_Bolton/src]
!$ run_ept_bolton80 < in.txt
!Program run_ept_bolton80 starts.
!
! Reading input data from the standard input using namelist.
! tk = 275.0000 [K]
! p = 500.0000 [hPa]
! r = 2.000000 [g/kg]
! td = -999.0000 [K]
! u = -999.0000 [%]
! fillvalue = -999.0000
! ! NB:
! ! If td or u equals fillvalue, it is not used for
! ! computation of equivalent potential temperature.
!
! Mixing ratio, r is used.
!
! ept = 342.4699 [K]
!