40 real,
parameter :: alpha=-9.477e-4 , &
46 real(esmf_kind_r4),
intent(inout),
dimension(i_input,j_input) ::rh_sphum
47 real(esmf_kind_r8),
intent(in) :: p, t(i_input,j_input)
49 real,
dimension(i_input,j_input) :: es, e, rh
51 print*,
"- CONVERT RH TO SPFH AT LEVEL ", p
55 es = esnot * exp( lnot/rv * ((t-tnot)/(t*tnot) + alpha * log(t/tnot) - alpha * (t-tnot)/ t))
59 rh_sphum = 0.622 * e / p
86 parameter(kind_phys = selected_real_kind(13,60))
89 real(kind=kind_phys),
parameter:: con_rd =2.8705e+2
90 real(kind=kind_phys),
parameter:: con_rv =4.6150e+2
92 real(kind=kind_phys),
parameter:: con_eps =con_rd/con_rv
93 real(kind=kind_phys),
parameter:: con_epsm1 =con_rd/con_rv-1.
98 real(esmf_kind_r4),
intent(inout),
dimension(i_input,j_input) ::rh_sphum
99 real(esmf_kind_r8),
intent(in) :: p, t(i_input,j_input)
101 real,
dimension(i_input,j_input) :: qc, rh
105 print*,
"- CONVERT RH TO SPFH AT LEVEL ", p
112 qc(i,j) = con_eps*es/(p+con_epsm1*es)
113 rh_sphum(i,j) = rh(i,j)*qc(i,j)/100.0
138 integer,
parameter:: nxpvs=7501
139 real,
parameter:: con_ttp =2.7316e+2
140 real,
parameter:: con_psat =6.1078e+2
141 real,
parameter:: con_cvap =1.8460e+3
142 real,
parameter:: con_cliq =4.1855e+3
143 real,
parameter:: con_hvap =2.5000e+6
144 real,
parameter:: con_rv =4.6150e+2
145 real,
parameter:: con_csol =2.1060e+3
146 real,
parameter:: con_hfus =3.3358e+5
147 real,
parameter:: tliq=con_ttp
148 real,
parameter:: tice=con_ttp-20.0
149 real,
parameter:: dldtl=con_cvap-con_cliq
150 real,
parameter:: heatl=con_hvap
151 real,
parameter:: xponal=-dldtl/con_rv
152 real,
parameter:: xponbl=-dldtl/con_rv+heatl/(con_rv*con_ttp)
153 real,
parameter:: dldti=con_cvap-con_csol
154 real,
parameter:: heati=con_hvap+con_hfus
155 real,
parameter:: xponai=-dldti/con_rv
156 real,
parameter:: xponbi=-dldti/con_rv+heati/(con_rv*con_ttp)
159 real(esmf_kind_r8),
intent(in):: t
161 real xj,x,tbpvs(nxpvs),xp1
162 real xmin,xmax,xinc,c2xpvs,c1xpvs
166 xinc=(xmax-xmin)/(nxpvs-1)
169 c1xpvs=1.-xmin*c2xpvs
171 xj=min(max(c1xpvs+c2xpvs*t,1.0),float(nxpvs))
172 jx=min(xj,float(nxpvs)-1.0)
177 tbpvs(jx)=con_psat*(tr**xponal)*exp(xponbl*(1.-tr))
179 tbpvs(jx)=con_psat*(tr**xponai)*exp(xponbi*(1.-tr))
181 w=(t-tice)/(tliq-tice)
182 pvl=con_psat*(tr**xponal)*exp(xponbl*(1.-tr))
183 pvi=con_psat*(tr**xponai)*exp(xponbi*(1.-tr))
184 tbpvs(jx)=w*pvl+(1.-w)*pvi
187 xp1=xmin+(jx-1+1)*xinc
191 tbpvs(jx+1)=con_psat*(tr**xponal)*exp(xponbl*(1.-tr))
192 elseif(xp1<tice)
then
193 tbpvs(jx+1)=con_psat*(tr**xponai)*exp(xponbi*(1.-tr))
195 w=(t-tice)/(tliq-tice)
196 pvl=con_psat*(tr**xponal)*exp(xponbl*(1.-tr))
197 pvi=con_psat*(tr**xponai)*exp(xponbi*(1.-tr))
198 tbpvs(jx+1)=w*pvl+(1.-w)*pvi
201 fpvsnew=tbpvs(jx)+(xj-jx)*(tbpvs(jx+1)-tbpvs(jx))
220 real(esmf_kind_r8),
pointer :: omega(:,:,:), p(:,:,:), t(:,:,:), q(:,:,:),omtmp,ptmp
222 integer :: clb(3), cub(3), i ,j, k
224 real,
parameter :: rd = 287.15_esmf_kind_r8, &
225 rv=461.51_esmf_kind_r8, &
226 g = 9.81_esmf_kind_r8
228 real(esmf_kind_r8) :: tv, w
233 tv = t(i,j,k)*(1+rd/rv*q(i,j,k))
237 w = -1 * omtmp * rd * tv / (ptmp * g)
subroutine, public convert_omega(omega, p, t, q, clb, cub)
Convert omega to vertical velocity.
subroutine, public rh2spfh(rh_sphum, p, t)
Convert relative humidity to specific humidity.
elemental real function, public fpvsnew(t)
Compute saturation vapor pressure.
Sets up the ESMF grid objects for the input data grid and target FV3 grid.
subroutine, public rh2spfh_gfs(rh_sphum, p, t)
Convert relative humidity to specific humidity (GFS formula) Calculation of saturation water vapor pr...
Utilities for use when reading grib2 data.