44 logical :: initialized = .false.
54 if ( initialized )
return
57 log_info(
"CPL_PHY_SFC_FIXED_TEMP_setup",*)
'Setup'
87 ZMFLX, XMFLX, YMFLX, &
88 SHFLX, LHFLX, QVFLX, &
90 Ustar, Tstar, Qstar, &
105 qsat => atmos_saturation_dens2qsat_all
108 bulkflux_diagnose_surface
111 integer,
intent(in) :: ia, is, ie
112 integer,
intent(in) :: ja, js, je
113 real(
rp),
intent(in) :: tmpa (ia,ja)
114 real(
rp),
intent(in) :: prsa (ia,ja)
115 real(
rp),
intent(in) :: wa (ia,ja)
116 real(
rp),
intent(in) :: ua (ia,ja)
117 real(
rp),
intent(in) :: va (ia,ja)
118 real(
rp),
intent(in) :: rhoa (ia,ja)
119 real(
rp),
intent(in) :: qva (ia,ja)
120 real(
rp),
intent(in) :: lh (ia,ja)
121 real(
rp),
intent(in) :: z1 (ia,ja)
122 real(
rp),
intent(in) :: pbl (ia,ja)
123 real(
rp),
intent(in) :: rhos (ia,ja)
124 real(
rp),
intent(in) :: prss (ia,ja)
126 real(
rp),
intent(in) :: tmps (ia,ja)
127 real(
rp),
intent(in) :: wstr (ia,ja)
128 real(
rp),
intent(in) :: qvef (ia,ja)
130 real(
rp),
intent(in) :: rb (ia,ja)
131 real(
rp),
intent(in) :: z0m (ia,ja)
132 real(
rp),
intent(in) :: z0h (ia,ja)
133 real(
rp),
intent(in) :: z0e (ia,ja)
134 logical,
intent(in) :: calc_flag(ia,ja)
135 real(
dp),
intent(in) :: dt
137 real(
rp),
intent(out) :: zmflx (ia,ja)
138 real(
rp),
intent(out) :: xmflx (ia,ja)
139 real(
rp),
intent(out) :: ymflx (ia,ja)
140 real(
rp),
intent(out) :: shflx (ia,ja)
141 real(
rp),
intent(out) :: lhflx (ia,ja)
142 real(
rp),
intent(out) :: qvflx (ia,ja)
143 real(
rp),
intent(out) :: gflx (ia,ja)
144 real(
rp),
intent(out) :: ustar (ia,ja)
145 real(
rp),
intent(out) :: tstar (ia,ja)
146 real(
rp),
intent(out) :: qstar (ia,ja)
147 real(
rp),
intent(out) :: wstar (ia,ja)
148 real(
rp),
intent(out) :: rlmo (ia,ja)
149 real(
rp),
intent(out) :: u10 (ia,ja)
150 real(
rp),
intent(out) :: v10 (ia,ja)
151 real(
rp),
intent(out) :: t2 (ia,ja)
152 real(
rp),
intent(out) :: q2 (ia,ja)
165 real(
rp) :: qvs(ia,ja)
169 real(
rp) :: fracu10(ia,ja)
170 real(
rp) :: fract2 (ia,ja)
171 real(
rp) :: fracq2 (ia,ja)
178 log_progress(*)
'coupler / physics / surface / FIXED-TEMP'
200 if ( calc_flag(i,j) )
then
205 call qsat( tmps(i,j), rhos(i,j), qvsat )
207 qvs(i,j) = ( 1.0_rp-qvef(i,j) ) * qva(i,j) &
208 + ( qvef(i,j) ) * qvsat
210 uabs = sqrt( wa(i,j)**2 + ua(i,j)**2 + va(i,j)**2 )
212 call bulkflux( tmpa(i,j), tmps(i,j), &
213 prsa(i,j), prss(i,j), &
214 qva(i,j), qvs(i,j), &
215 uabs, z1(i,j), pbl(i,j), &
216 z0m(i,j), z0h(i,j), z0e(i,j), &
217 ustar(i,j), tstar(i,j), qstar(i,j), &
218 wstar(i,j), rlmo(i,j), ra, &
219 fracu10(i,j), fract2(i,j), fracq2(i,j) )
221 if ( uabs < eps )
then
226 mflux = - rhos(i,j) * ustar(i,j)**2
227 zmflx(i,j) = mflux * wa(i,j) / uabs
228 xmflx(i,j) = mflux * ua(i,j) / uabs
229 ymflx(i,j) = mflux * va(i,j) / uabs
231 shflx(i,j) = -rhos(i,j) * ustar(i,j) * tstar(i,j) * cpdry
232 qvflx(i,j) = -rhos(i,j) * ustar(i,j) * qstar(i,j) * ra / ( ra+rb(i,j) )
233 qvflx(i,j) = min( qvflx(i,j), wstr(i,j) / real(dt,
rp) )
234 lhflx(i,j) = qvflx(i,j) * lh(i,j)
250 res = swd - swu + lwd - lwu - shflx(i,j) - qvflx(i,j) * lh(i,j)
277 call bulkflux_diagnose_surface( ia, is, ie, ja, js, je, &
279 tmpa(:,:), qva(:,:), &
280 tmps(:,:), qvs(:,:), &
281 z1(:,:), z0m(:,:), z0h(:,:), z0e(:,:), &
282 u10(:,:), v10(:,:), t2(:,:), q2(:,:), &
283 mask = calc_flag(:,:), &
284 fracu10 = fracu10(:,:), &
285 fract2 = fract2(:,:), &
286 fracq2 = fracq2(:,:) )