43 logical :: initialized = .false.
53 if ( initialized )
return
56 log_info(
"CPL_PHY_SFC_FIXED_TEMP_setup",*)
'Setup'
77 ZMFLX, XMFLX, YMFLX, &
78 SHFLX, LHFLX, QVFLX, &
80 Ustar, Tstar, Qstar, &
95 qsat => atmos_saturation_dens2qsat_all
98 bulkflux_diagnose_surface
101 integer,
intent(in) :: ia, is, ie
102 integer,
intent(in) :: ja, js, je
103 real(
rp),
intent(in) :: tmpa (ia,ja)
104 real(
rp),
intent(in) :: prsa (ia,ja)
105 real(
rp),
intent(in) :: wa (ia,ja)
106 real(
rp),
intent(in) :: ua (ia,ja)
107 real(
rp),
intent(in) :: va (ia,ja)
108 real(
rp),
intent(in) :: rhoa (ia,ja)
109 real(
rp),
intent(in) :: qva (ia,ja)
110 real(
rp),
intent(in) :: lh (ia,ja)
111 real(
rp),
intent(in) :: z1 (ia,ja)
112 real(
rp),
intent(in) :: pbl (ia,ja)
113 real(
rp),
intent(in) :: rhos (ia,ja)
114 real(
rp),
intent(in) :: prss (ia,ja)
116 real(
rp),
intent(in) :: tmps (ia,ja)
117 real(
rp),
intent(in) :: wstr (ia,ja)
118 real(
rp),
intent(in) :: qvef (ia,ja)
120 real(
rp),
intent(in) :: rb (ia,ja)
121 real(
rp),
intent(in) :: z0m (ia,ja)
122 real(
rp),
intent(in) :: z0h (ia,ja)
123 real(
rp),
intent(in) :: z0e (ia,ja)
124 logical,
intent(in) :: calc_flag(ia,ja)
125 real(
dp),
intent(in) :: dt
127 real(
rp),
intent(out) :: zmflx (ia,ja)
128 real(
rp),
intent(out) :: xmflx (ia,ja)
129 real(
rp),
intent(out) :: ymflx (ia,ja)
130 real(
rp),
intent(out) :: shflx (ia,ja)
131 real(
rp),
intent(out) :: lhflx (ia,ja)
132 real(
rp),
intent(out) :: qvflx (ia,ja)
133 real(
rp),
intent(out) :: gflx (ia,ja)
134 real(
rp),
intent(out) :: ustar (ia,ja)
135 real(
rp),
intent(out) :: tstar (ia,ja)
136 real(
rp),
intent(out) :: qstar (ia,ja)
137 real(
rp),
intent(out) :: wstar (ia,ja)
138 real(
rp),
intent(out) :: rlmo (ia,ja)
139 real(
rp),
intent(out) :: u10 (ia,ja)
140 real(
rp),
intent(out) :: v10 (ia,ja)
141 real(
rp),
intent(out) :: t2 (ia,ja)
142 real(
rp),
intent(out) :: q2 (ia,ja)
155 real(
rp) :: qvs(ia,ja)
159 real(
rp) :: fracu10(ia,ja)
160 real(
rp) :: fract2 (ia,ja)
161 real(
rp) :: fracq2 (ia,ja)
168 log_progress(*)
'coupler / physics / surface / FIXED-TEMP'
184 if ( calc_flag(i,j) )
then
189 call qsat( tmps(i,j), rhos(i,j), qvsat )
191 qvs(i,j) = ( 1.0_rp-qvef(i,j) ) * qva(i,j) &
192 + ( qvef(i,j) ) * qvsat
194 uabs = sqrt( wa(i,j)**2 + ua(i,j)**2 + va(i,j)**2 )
196 call bulkflux( tmpa(i,j), tmps(i,j), &
197 prsa(i,j), prss(i,j), &
198 qva(i,j), qvs(i,j), &
199 uabs, z1(i,j), pbl(i,j), &
200 z0m(i,j), z0h(i,j), z0e(i,j), &
201 ustar(i,j), tstar(i,j), qstar(i,j), &
202 wstar(i,j), rlmo(i,j), ra, &
203 fracu10(i,j), fract2(i,j), fracq2(i,j) )
205 if ( uabs < eps )
then
210 mflux = - rhos(i,j) * ustar(i,j)**2
211 zmflx(i,j) = mflux * wa(i,j) / uabs
212 xmflx(i,j) = mflux * ua(i,j) / uabs
213 ymflx(i,j) = mflux * va(i,j) / uabs
215 shflx(i,j) = -rhos(i,j) * ustar(i,j) * tstar(i,j) * cpdry
216 qvflx(i,j) = -rhos(i,j) * ustar(i,j) * qstar(i,j) * ra / ( ra+rb(i,j) )
217 qvflx(i,j) = min( qvflx(i,j), wstr(i,j) / real(dt,
rp) )
218 lhflx(i,j) = qvflx(i,j) * lh(i,j)
234 res = swd - swu + lwd - lwu - shflx(i,j) - qvflx(i,j) * lh(i,j)
260 call bulkflux_diagnose_surface( ia, is, ie, ja, js, je, &
262 tmpa(:,:), qva(:,:), &
263 tmps(:,:), qvs(:,:), &
264 z1(:,:), z0m(:,:), z0h(:,:), z0e(:,:), &
265 u10(:,:), v10(:,:), t2(:,:), q2(:,:), &
266 mask = calc_flag(:,:), &
267 fracu10 = fracu10(:,:), &
268 fract2 = fract2(:,:), &
269 fracq2 = fracq2(:,:) )