42 logical,
private :: lst_update
44 integer,
private :: land_sfc_slab_itr_max = 100
46 real(RP),
private :: land_sfc_slab_dts_max = 5.0e-2_rp
47 real(RP),
private :: land_sfc_slab_res_min = 1.0e+0_rp
48 real(RP),
private :: land_sfc_slab_err_min = 1.0e-2_rp
49 real(RP),
private :: land_sfc_slab_dreslim = 1.0e+2_rp
51 logical,
allocatable,
private :: is_lnd(:,:)
63 character(len=*),
intent(in) :: LAND_TYPE
65 namelist / param_land_sfc_slab / &
66 land_sfc_slab_itr_max, &
67 land_sfc_slab_dts_max, &
68 land_sfc_slab_res_min, &
69 land_sfc_slab_err_min, &
77 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[SLAB] / Categ[LAND SFC] / Origin[SCALElib]' 81 read(
io_fid_conf,nml=param_land_sfc_slab,iostat=ierr)
83 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 84 elseif( ierr > 0 )
then 85 write(*,*)
'xxx Not appropriate names in namelist PARAM_LAND_SFC_SLAB. Check!' 90 if( land_type ==
'CONST' )
then 92 else if( land_type ==
'SLAB' )
then 95 write(*,*)
'xxx wrong LAND_TYPE. Check!' 100 allocate( is_lnd(
ia,
ja) )
107 is_lnd(i,j) = .false.
161 qsat => atmos_saturation_pres2qsat_all
163 atmos_thermodyn_templhv
169 real(RP),
parameter :: dTS0 = 1.0e-4_rp
171 real(RP),
parameter :: redf_min = 1.0e-2_rp
172 real(RP),
parameter :: redf_max = 1.0e+0_rp
173 real(RP),
parameter :: TFa = 0.5e+0_rp
174 real(RP),
parameter :: TFb = 1.1e+0_rp
177 real(RP),
intent(out) :: LST_t(
ia,
ja)
178 real(RP),
intent(out) :: ZMFLX(
ia,
ja)
179 real(RP),
intent(out) :: XMFLX(
ia,
ja)
180 real(RP),
intent(out) :: YMFLX(
ia,
ja)
181 real(RP),
intent(out) :: SHFLX(
ia,
ja)
182 real(RP),
intent(out) :: LHFLX(
ia,
ja)
183 real(RP),
intent(out) :: GHFLX(
ia,
ja)
184 real(RP),
intent(out) :: U10 (
ia,
ja)
185 real(RP),
intent(out) :: V10 (
ia,
ja)
186 real(RP),
intent(out) :: T2 (
ia,
ja)
187 real(RP),
intent(out) :: Q2 (
ia,
ja)
189 real(RP),
intent(in) :: TMPA(
ia,
ja)
190 real(RP),
intent(in) :: PRSA(
ia,
ja)
191 real(RP),
intent(in) :: WA (
ia,
ja)
192 real(RP),
intent(in) :: UA (
ia,
ja)
193 real(RP),
intent(in) :: VA (
ia,
ja)
194 real(RP),
intent(in) :: RHOA(
ia,
ja)
195 real(RP),
intent(in) :: QVA (
ia,
ja)
196 real(RP),
intent(in) :: Z1 (
ia,
ja)
197 real(RP),
intent(in) :: PBL (
ia,
ja)
198 real(RP),
intent(in) :: PRSS(
ia,
ja)
199 real(RP),
intent(in) :: LWD (
ia,
ja)
200 real(RP),
intent(in) :: SWD (
ia,
ja)
202 real(RP),
intent(in) :: TG (
ia,
ja)
203 real(RP),
intent(in) :: LST (
ia,
ja)
204 real(RP),
intent(in) :: QVEF (
ia,
ja)
205 real(RP),
intent(in) :: ALB_LW(
ia,
ja)
206 real(RP),
intent(in) :: ALB_SW(
ia,
ja)
207 real(RP),
intent(in) :: DZG (
ia,
ja)
208 real(RP),
intent(in) :: TCS (
ia,
ja)
209 real(RP),
intent(in) :: Z0M (
ia,
ja)
210 real(RP),
intent(in) :: Z0H (
ia,
ja)
211 real(RP),
intent(in) :: Z0E (
ia,
ja)
212 real(DP),
intent(in) :: dt
215 real(RP) :: LST1(
ia,
ja)
222 real(RP) :: Ustar, dUstar
223 real(RP) :: Tstar, dTstar
224 real(RP) :: Qstar, dQstar
225 real(RP) :: Uabs, dUabs
226 real(RP) :: SQV, dSQV
228 real(RP) :: LHV(
ia,
ja)
240 call atmos_thermodyn_templhv( lhv, tmpa )
243 if( lst_update )
then 248 if( is_lnd(i,j) )
then 251 oldres = huge(0.0_rp)
254 do n = 1, land_sfc_slab_itr_max
302 res = ( 1.0_rp - alb_sw(i,j) ) * swd(i,j) &
303 + ( 1.0_rp - alb_lw(i,j) ) * ( lwd(i,j) - stb * lst1(i,j)**4 ) &
304 + cpdry * rhoa(i,j) * ustar * tstar &
305 + lhv(i,j) * rhoa(i,j) * ustar * qstar * qvef(i,j) &
306 - 2.0_rp * tcs(i,j) * ( lst1(i,j) - tg(i,j) ) / dzg(i,j)
309 dres = -4.0_rp * ( 1.0_rp - alb_lw(i,j) ) * stb * lst1(i,j)**3 &
310 + cpdry * rhoa(i,j) * ( (dustar-ustar)/dts0 * tstar + ustar * (dtstar-tstar)/dts0 ) &
311 + lhv(i,j) * rhoa(i,j) * ( (dustar-ustar)/dts0 * qstar + ustar * (dqstar-qstar)/dts0 ) * qvef(i,j) &
312 - 2.0_rp * tcs(i,j) / dzg(i,j)
315 if( abs( res ) < land_sfc_slab_res_min .OR. &
316 abs( res/dres ) < land_sfc_slab_err_min )
then 321 if( abs(dres) * land_sfc_slab_dreslim < abs(res) )
then 326 if( dres < 0.0_rp )
then 327 if( abs(res) > abs(oldres) )
then 328 redf = max( tfa*abs(redf), redf_min )
330 redf = min( tfb*abs(redf), redf_max )
337 lst1(i,j) = lst1(i,j) - redf * res / dres
345 lst1(i,j) = min( max( lst1(i,j), &
346 lst(i,j) - land_sfc_slab_dts_max * dt ), &
347 lst(i,j) + land_sfc_slab_dts_max * dt )
349 if( n > land_sfc_slab_itr_max )
then 351 if(
io_l )
write(
io_fid_log,
'(A)' )
'Warning: land surface tempearture was not converged.' 354 if(
io_l )
write(
io_fid_log,
'(A,I32)' )
'DEBUG --- number of i [no unit] :', i
355 if(
io_l )
write(
io_fid_log,
'(A,I32)' )
'DEBUG --- number of j [no unit] :', j
357 if(
io_l )
write(
io_fid_log,
'(A,I32)' )
'DEBUG --- loop number [no unit] :', n
358 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- Residual [J/m2/s] :', res
359 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- delta Residual [J/m2/s] :', dres
361 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- temperature [K] :', tmpa(i,j)
362 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- pressure [Pa] :', prsa(i,j)
363 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- velocity w [m/s] :', wa(i,j)
364 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- velocity u [m/s] :', ua(i,j)
365 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- velocity v [m/s] :', va(i,j)
366 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- density [kg/m3] :', rhoa(i,j)
367 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- water vapor mass ratio [kg/kg] :', qva(i,j)
368 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- cell center height [m] :', z1(i,j)
369 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- atmospheric mixing layer height [m] :', pbl(i,j)
370 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- pressure at the surface [Pa] :', prss(i,j)
371 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- downward long-wave radiation [J/m2/s] :', lwd(i,j)
372 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- downward short-wave radiation [J/m2/s] :', swd(i,j)
374 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- soil temperature [K] :', tg(i,j)
375 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- land surface temperature [K] :', lst(i,j)
376 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- efficiency of evaporation [0-1] :', qvef(i,j)
377 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- surface albedo for LW [0-1] :', alb_lw(i,j)
378 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- surface albedo for SW [0-1] :', alb_sw(i,j)
379 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- soil depth [m] :', dzg(i,j)
380 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- thermal conductivity for soil [J/m/K/s] :', tcs(i,j)
381 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- roughness length for momemtum [m] :', z0m(i,j)
382 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- roughness length for heat [m] :', z0h(i,j)
383 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- roughness length for vapor [m] :', z0e(i,j)
385 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- latent heat [J/kg] :', lhv(i,j)
386 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- friction velocity [m] :', ustar
387 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- friction potential temperature [K] :', tstar
388 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- friction water vapor mass ratio [kg/kg] :', qstar
389 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- d(friction velocity) [m] :', dustar
390 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- d(friction potential temperature) [K] :', dtstar
391 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- d(friction water vapor mass ratio) [kg/kg] :', dqstar
392 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- modified absolute velocity [m/s] :', uabs
393 if(
io_l )
write(
io_fid_log,
'(A,F32.16)')
'DEBUG --- next land surface temperature [K] :', lst1(i,j)
396 if ( .NOT. ( res > -1.0_rp .OR. res < 1.0_rp ) )
then 397 write(*,*)
'xxx NaN is detected for land surface temperature.' 399 write(*,*)
'DEBUG --- PRC_myrank :',
prc_myrank 400 write(*,*)
'DEBUG --- number of i :', i
401 write(*,*)
'DEBUG --- number of j :', j
403 write(*,*)
'DEBUG --- Residual [J/m2/s] :', res
404 write(*,*)
'DEBUG --- delta Residual [J/m2/s] :', dres
406 write(*,*)
'DEBUG --- temperature [K] :', tmpa(i,j)
407 write(*,*)
'DEBUG --- pressure [Pa] :', prsa(i,j)
408 write(*,*)
'DEBUG --- velocity w [m/s] :', wa(i,j)
409 write(*,*)
'DEBUG --- velocity u [m/s] :', ua(i,j)
410 write(*,*)
'DEBUG --- velocity v [m/s] :', va(i,j)
411 write(*,*)
'DEBUG --- density [kg/m3] :', rhoa(i,j)
412 write(*,*)
'DEBUG --- water vapor mass ratio [kg/kg] :', qva(i,j)
413 write(*,*)
'DEBUG --- cell center height [m] :', z1(i,j)
414 write(*,*)
'DEBUG --- atmospheric mixing layer height [m] :', pbl(i,j)
415 write(*,*)
'DEBUG --- pressure at the surface [Pa] :', prss(i,j)
416 write(*,*)
'DEBUG --- downward long-wave radiation [J/m2/s] :', lwd(i,j)
417 write(*,*)
'DEBUG --- downward short-wave radiation [J/m2/s] :', swd(i,j)
419 write(*,*)
'DEBUG --- soil temperature [K] :', tg(i,j)
420 write(*,*)
'DEBUG --- land surface temperature [K] :', lst(i,j)
421 write(*,*)
'DEBUG --- efficiency of evaporation [0-1] :', qvef(i,j)
422 write(*,*)
'DEBUG --- surface albedo for LW [0-1] :', alb_lw(i,j)
423 write(*,*)
'DEBUG --- surface albedo for SW [0-1] :', alb_sw(i,j)
424 write(*,*)
'DEBUG --- soil depth [m] :', dzg(i,j)
425 write(*,*)
'DEBUG --- thermal conductivity for soil [J/m/K/s] :', tcs(i,j)
426 write(*,*)
'DEBUG --- roughness length for momemtum [m] :', z0m(i,j)
427 write(*,*)
'DEBUG --- roughness length for heat [m] :', z0h(i,j)
428 write(*,*)
'DEBUG --- roughness length for vapor [m] :', z0e(i,j)
430 write(*,*)
'DEBUG --- latent heat [J/kg] :', lhv(i,j)
431 write(*,*)
'DEBUG --- friction velocity [m] :', ustar
432 write(*,*)
'DEBUG --- friction potential temperature [K] :', tstar
433 write(*,*)
'DEBUG --- friction water vapor mass ratio [kg/kg] :', qstar
434 write(*,*)
'DEBUG --- d(friction velocity) [m] :', dustar
435 write(*,*)
'DEBUG --- d(friction potential temperature) [K] :', dtstar
436 write(*,*)
'DEBUG --- d(friction water vapor mass ratio) [kg/kg] :', dqstar
437 write(*,*)
'DEBUG --- modified absolute velocity [m/s] :', uabs
438 write(*,*)
'DEBUG --- next land surface temperature [K] :', lst1(i,j)
448 lst_t(i,j) = ( lst1(i,j) - lst(i,j) ) / dt
469 if( is_lnd(i,j) )
then 494 zmflx(i,j) = -rhoa(i,j) * ustar**2 / uabs * wa(i,j)
495 xmflx(i,j) = -rhoa(i,j) * ustar**2 / uabs * ua(i,j)
496 ymflx(i,j) = -rhoa(i,j) * ustar**2 / uabs * va(i,j)
497 shflx(i,j) = -cpdry * rhoa(i,j) * ustar * tstar
498 lhflx(i,j) = -lhv(i,j) * rhoa(i,j) * ustar * qstar * qvef(i,j)
499 ghflx(i,j) = -2.0_rp * tcs(i,j) * ( lst1(i,j) - tg(i,j) ) / dzg(i,j)
502 res = ( 1.0_rp - alb_sw(i,j) ) * swd(i,j) &
503 + ( 1.0_rp - alb_lw(i,j) ) * ( lwd(i,j) - stb * lst1(i,j)**4 ) &
504 - shflx(i,j) - lhflx(i,j) + ghflx(i,j)
507 ghflx(i,j) = ghflx(i,j) - res
510 u10(i,j) = ua(i,j) *
log( 10.0_rp / z0m(i,j) ) /
log( z1(i,j) / z0m(i,j) )
511 v10(i,j) = va(i,j) *
log( 10.0_rp / z0m(i,j) ) /
log( z1(i,j) / z0m(i,j) )
512 t2(i,j) = lst1(i,j) + ( tmpa(i,j) - lst1(i,j) ) * (
log( 2.0_rp / z0m(i,j) ) *
log( 2.0_rp / z0h(i,j) ) ) &
513 / (
log( z1(i,j) / z0m(i,j) ) *
log( z1(i,j) / z0h(i,j) ) )
514 q2(i,j) = sqv + ( qva(i,j) - sqv ) * (
log( 2.0_rp / z0m(i,j) ) *
log( 2.0_rp / z0e(i,j) ) ) &
515 / (
log( z1(i,j) / z0m(i,j) ) *
log( z1(i,j) / z0e(i,j) ) )
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
module ATMOSPHERE / Saturation adjustment
subroutine, public prc_mpistop
Abort MPI.
real(rp), parameter, public const_stb
Stefan-Boltzman constant [W/m2/K4].
logical, public io_l
output log or not? (this process)
subroutine, public land_sfc_slab(LST_t, ZMFLX, XMFLX, YMFLX, SHFLX, LHFLX, GHFLX, U10, V10, T2, Q2, TMPA, PRSA, WA, UA, VA, RHOA, QVA, Z1, PBL, PRSS, LWD, SWD, TG, LST, QVEF, ALB_LW, ALB_SW, DZG, TCS, Z0M, Z0H, Z0E, dt)
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
integer, public ia
of x whole cells (local, with HALO)
procedure(bc), pointer, public bulkflux
integer, public js
start point of inner domain: y, local
subroutine, public log(type, message)
integer, public prc_myrank
process num in local communicator
subroutine, public land_sfc_slab_setup(LAND_TYPE)
Setup.
integer, public ie
end point of inner domain: x, local
real(rp), public const_eps
small number
module ATMOSPHERE / Thermodynamics
logical, public io_lnml
output log or not? (for namelist, this process)
module LAND / Surface fluxes with slab land model
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
integer, public io_fid_log
Log file ID.
integer, public ja
of y whole cells (local, with HALO)