16 use module_sf_noahmplsm
21 land_iau_mod_init, land_iau_mod_getiauforcing, land_iau_mod_final, calculate_landinc_mask
25 integer,
parameter :: psi_opt = 0
29 public :: noahmpdrv_init, noahmpdrv_run, &
30 noahmpdrv_timestep_init, noahmpdrv_final
40 subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, &
41 nlunit, pores, resid, &
42 do_mynnsfclay,do_mynnedmf, &
44 Land_IAU_Control, Land_IAU_Data, Land_IAU_state)
46 use machine,
only: kind_phys
52 integer,
intent(in) :: lsm
53 integer,
intent(in) :: lsm_noahmp
54 integer,
intent(in) :: me, isot, ivegsrc, nlunit
56 real (kind=kind_phys),
dimension(:),
intent(out) :: pores, resid
58 logical,
intent(in) :: do_mynnsfclay
59 logical,
intent(in) :: do_mynnedmf
62 character(len=*),
intent(out) :: errmsg
63 integer,
intent(out) :: errflg
70 type(land_iau_control_type),
intent(inout),
optional :: Land_IAU_Control
73 type(land_iau_state_type),
intent(inout),
optional :: Land_IAU_state
76 type(land_iau_external_data_type),
intent(inout),
optional :: Land_IAU_Data
83 if (lsm/=lsm_noahmp)
then
84 write(errmsg,
'(*(a))')
'Logic error: namelist choice of ', &
85 &
'LSM is different from Noah'
90 if (ivegsrc /= 1)
then
91 errmsg =
'The NOAHMP LSM expects that the ivegsrc physics '// &
92 'namelist parameter is 1. Exiting...'
97 errmsg =
'The NOAHMP LSM expects that the isot physics '// &
98 'namelist parameter is 1. Exiting...'
103 if ( do_mynnsfclay .and. .not. do_mynnedmf)
then
104 errmsg =
'Problem : do_mynnsfclay = .true.' // &
105 'but mynnpbl is .false.. Exiting ...'
112 call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg)
116 call read_mp_table_parameters(errmsg, errflg)
120 if ( do_mynnsfclay )
then
121 call psi_init(psi_opt,errmsg,errflg)
128 if (
present(land_iau_control) .and.
present(land_iau_data) .and.
present(land_iau_state))
then
131 if (.not. land_iau_control%do_land_iau)
return
132 call land_iau_mod_init (land_iau_control, land_iau_data, land_iau_state, errmsg, errflg)
136 end subroutine noahmpdrv_init
144subroutine noahmpdrv_timestep_init (itime, fhour, delt, km, ncols, &
145 isot, ivegsrc, soiltyp, vegtype, weasd, &
146 land_iau_control, land_iau_data, land_iau_state, &
147 stc, slc, smc, errmsg, errflg, &
148 con_g, con_t0c, con_hfus)
150 use machine,
only: kind_phys
157 integer ,
intent(in) :: itime
158 real(kind=kind_phys) ,
intent(in) :: fhour
159 real(kind=kind_phys) ,
intent(in) :: delt
160 integer ,
intent(in) :: km
161 integer,
intent(in) :: ncols
162 integer,
intent(in) :: isot
163 integer,
intent(in) :: ivegsrc
165 integer ,
dimension(:) ,
intent(in) :: soiltyp
166 integer ,
dimension(:) ,
intent(in) :: vegtype
167 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: weasd
169 type(land_iau_control_type) ,
intent(inout) :: Land_IAU_Control
170 type(land_iau_external_data_type) ,
intent(inout) :: Land_IAU_Data
171 type(land_iau_state_type) ,
intent(inout) :: Land_IAU_State
172 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: stc
173 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: slc
174 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smc
175 character(len=*),
intent(out) :: errmsg
176 integer,
intent(out) :: errflg
177 real(kind=kind_phys),
intent(in) :: con_g
178 real(kind=kind_phys),
intent(in) :: con_t0c
179 real(kind=kind_phys),
intent(in) :: con_hfus
182 real(kind=kind_phys),
allocatable,
dimension(:,:) :: stc_inc_flat, slc_inc_flat
183 real(kind=kind_phys),
dimension(km) :: dz
186 real(kind=kind_phys) :: zsoil(4) = (/ -0.1, -0.4, -1.0, -2.0 /)
188 integer :: lsoil_incr
189 integer,
allocatable :: mask_tile(:)
190 integer,
allocatable :: stc_updated(:)
191 logical :: soil_freeze, soil_ice
193 real(kind=kind_phys) :: slc_new
195 integer :: i, j, ij, l, k, ib
198 real(kind=kind_phys) :: smp
199 real(kind=kind_phys) :: hc_incr
200 real(kind=kind_phys),
parameter :: tfreez_noahmp=273.16
206 if (.not. land_iau_control%do_land_iau)
return
209 land_iau_control%fhour=fhour
212 call land_iau_mod_getiauforcing(land_iau_control, land_iau_data, land_iau_state, errmsg, errflg)
213 if (errflg .ne. 0)
then
218 if (.not. land_iau_data%in_interval)
then
222 if(land_iau_control%me == land_iau_control%mpi_root)
then
223 print*,
"adding land iau increments"
226 if (land_iau_control%lsoil .ne. km)
then
227 write(errmsg,*)
'noahmpdrv_timestep_init: Land_IAU_Data%lsoil ',land_iau_control%lsoil,
' not equal to km ',km
233 allocate(stc_inc_flat(land_iau_control%nx * land_iau_control%ny, km))
234 allocate(slc_inc_flat(land_iau_control%nx * land_iau_control%ny, km))
235 allocate(stc_updated(land_iau_control%nx * land_iau_control%ny))
240 do j = 1, land_iau_control%ny
242 stc_inc_flat(ib:ib+land_iau_control%nx-1, k) = land_iau_data%stc_inc(:,j, k)
243 slc_inc_flat(ib:ib+land_iau_control%nx-1, k) = land_iau_data%slc_inc(:,j, k)
245 ib = ib + land_iau_control%nx
248 if ((land_iau_control%dtp - delt) > 0.0001)
then
249 if(land_iau_control%me == land_iau_control%mpi_root)
then
250 print*,
"Warning! noahmpdrv_timestep_init delt ",delt,
" different from Land_IAU_Control%dtp ",land_iau_control%dtp
254 lsoil_incr = land_iau_control%lsoil_incr
255 lensfc = land_iau_control%nx * land_iau_control%ny
257 if(land_iau_control%me == land_iau_control%mpi_root) print*,
' adjusting first ', lsoil_incr,
' surface layers only, delt ', delt
259 allocate(mask_tile(lensfc))
260 call calculate_landinc_mask(weasd, vegtype, soiltyp, lensfc, isice_table, mask_tile)
264 dz(k) = -zsoil(k) + zsoil(k-1)
267 ij_loop :
do ij = 1, lensfc
269 if (mask_tile(ij) == 1)
then
274 if ( stc(ij,k) < tfreez_noahmp ) soil_freeze=.true.
275 if ( smc(ij,k) - slc(ij,k) > 0.001 ) soil_ice=.true.
277 if (land_iau_control%upd_stc)
then
278 if (k==1) stc_updated(ij) = 1
279 stc(ij,k) = stc(ij,k) + stc_inc_flat(ij,k)*delt
283 if ( (.not. soil_freeze ) .and. (.not. soil_ice ) )
then
284 if (land_iau_control%upd_slc)
then
286 slc(ij,k) = max(slc(ij,k) + slc_inc_flat(ij,k)*delt, min(0.0001/dz(k), slc(ij,k)))
287 smc(ij,k) = max(smc(ij,k) + slc_inc_flat(ij,k)*delt, min(0.0001/dz(k), smc(ij,k)))
295 call read_mp_table_parameters(errmsg, errflg)
296 if (errflg .ne. 0)
then
297 errmsg =
'FATAL ERROR in noahmpdrv_timestep_init: problem in set_soilveg_noahmp'
300 if (land_iau_control%do_stcsmc_adjustment)
then
301 if (land_iau_control%upd_stc)
then
303 if (stc_updated(i) == 1 )
then
304 soiltype = soiltyp(i)
306 if (abs(stc_inc_flat(i,l)) > land_iau_control%min_T_increment)
then
310 if (stc(i,l) .LE. tfreez_noahmp )
then
312 smp = con_hfus*(tfreez_noahmp-stc(i,l))/(con_g*stc(i,l))
313 slc_new=maxsmc(soiltype)*(smp/satpsi(soiltype))**(-1./bb(soiltype))
314 slc(i,l) = max( min( slc_new, smc(i,l)), 0.0 )
317 if ( stc(i,l) .GT. tfreez_noahmp .and. &
318 stc(i,l) - stc_inc_flat(i,l)*delt .LE. tfreez_noahmp )
then
328 deallocate(stc_inc_flat, slc_inc_flat, stc_updated)
329 deallocate(mask_tile)
332end subroutine noahmpdrv_timestep_init
340 subroutine noahmpdrv_final (Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg)
342 use machine,
only: kind_phys
344 type(land_iau_control_type) ,
intent(in ) :: Land_IAU_Control
345 type(land_iau_external_data_type) ,
intent(inout) :: Land_IAU_Data
346 type(land_iau_state_type) ,
intent(inout) :: Land_IAU_State
347 character(len=*),
intent(out) :: errmsg
348 integer,
intent(out) :: errflg
354 if (.not. land_iau_control%do_land_iau)
return
355 call land_iau_mod_final(land_iau_control, land_iau_data, land_iau_state, errmsg, errflg)
357 end subroutine noahmpdrv_final
380 subroutine noahmpdrv_run &
383 ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp,soilcol,&
384 vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, &
385 prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp,&
386 shdmin, shdmax, snoalb, sfalb, flag_iter,con_g, &
387 idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, &
388 iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot,iopt_stc,&
389 iopt_trs,iopt_diag,xlatin, xcoszin, iyrlen, julian, garea, &
390 rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1,&
391 con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, &
392 con_fvirt, con_rd, con_hfus, thsfc_loc, cpllnd, cpllnd2atm,&
395 weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
396 canopy, trans, tsurf, zorl, &
397 rb1, fm1, fh1, ustar1, stress1, fm101, fh21, &
398 rmol1,flhc1,flqc1,do_mynnsfclay, &
402 snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy,&
403 chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy,&
404 waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, &
405 rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, &
406 xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, &
407 albdvis, albdnir, albivis, albinir,emiss, &
410 sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
411 cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,&
412 stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, &
413 ztmax, rca, errmsg, errflg, &
414 canopy_heat_storage_ccpp, &
416 sw_absorbed_total_ccpp, &
417 sw_reflected_total_ccpp, &
418 lw_absorbed_total_ccpp, &
419 temperature_bare_grd_ccpp, &
420 temperature_veg_grd_ccpp, &
421 temperature_veg_2m_ccpp, &
422 temperature_bare_2m_ccpp, &
423 spec_humidity_veg_2m_ccpp, &
424 spec_humidity_bare_2m_ccpp, &
425 sw_absorbed_veg_ccpp, &
426 sw_absorbed_ground_ccpp, &
428 snowmelt_shallow_ccpp, &
429 albedo_direct_snow_ccpp, &
430 albedo_diffuse_snow_ccpp, &
432 ch_bare_ground_ccpp, &
433 sensible_heat_grd_veg_ccpp, &
434 sensible_heat_leaf_ccpp, &
435 sensible_heat_grd_bar_ccpp, &
436 latent_heat_grd_veg_ccpp, &
437 latent_heat_grd_bare_ccpp, &
438 ground_heat_veg_ccpp, &
439 ground_heat_bare_ccpp, &
440 lw_absorbed_grd_veg_ccpp, &
441 lw_absorbed_leaf_ccpp, &
442 lw_absorbed_grd_bare_ccpp, &
443 latent_heat_trans_ccpp, &
444 latent_heat_leaf_ccpp, &
446 ch_below_canopy_ccpp, &
447 ch_vegetated_2m_ccpp, &
448 ch_bare_ground_2m_ccpp, &
449 precip_adv_heat_veg_ccpp, &
450 precip_adv_heat_grd_v_ccpp, &
451 precip_adv_heat_grd_b_ccpp, &
452 spec_humid_sfc_veg_ccpp, &
453 spec_humid_sfc_bare_ccpp &
456 use machine ,
only : kind_phys
457 use funcphys,
only : fpvs
459 use module_sf_noahmplsm,
only : gfs_stability
465 real(kind=kind_phys),
parameter :: a2 = 17.2693882
466 real(kind=kind_phys),
parameter :: a3 = 273.16
467 real(kind=kind_phys),
parameter :: a4 = 35.86
468 real(kind=kind_phys),
parameter :: a23m4 = a2*(a3-a4)
469 real(kind=kind_phys),
intent(in) :: con_g
471 real,
parameter :: undefined = 9.99e20_kind_phys
473 integer,
parameter :: nsoil = 4
474 integer,
parameter :: nsnow = 3
476 integer,
parameter :: iz0tlnd = 0
478 real(kind=kind_phys),
save :: zsoil(nsoil)
479 data zsoil / -0.1, -0.4, -1.0, -2.0 /
485 integer ,
intent(in) :: im
486 integer ,
intent(in) :: km
487 integer ,
intent(in) :: lsnowl
488 integer ,
intent(in) :: itime
489 real(kind=kind_phys),
dimension(:) ,
intent(in) :: ps
490 real(kind=kind_phys),
dimension(:) ,
intent(in) :: u1
491 real(kind=kind_phys),
dimension(:) ,
intent(in) :: v1
492 real(kind=kind_phys),
dimension(:) ,
intent(in) :: t1
493 real(kind=kind_phys),
dimension(:) ,
intent(in) :: q1
494 integer ,
dimension(:) ,
intent(in) :: soiltyp
495 integer ,
dimension(:) ,
intent(in) :: soilcol
496 integer ,
dimension(:) ,
intent(in) :: vegtype
497 real(kind=kind_phys),
dimension(:) ,
intent(in) :: sigmaf
498 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dlwflx
499 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dswsfc
500 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snet
501 real(kind=kind_phys) ,
intent(in) :: delt
502 real(kind=kind_phys),
dimension(:) ,
intent(in) :: tg3
503 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: cm
504 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ch
505 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsl1
506 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslk1
508 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslki
509 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsik1
511 real(kind=kind_phys),
dimension(:) ,
intent(in) :: zf
513 logical ,
intent(in) :: do_mynnsfclay
515 real(kind=kind_phys),
dimension(:) ,
intent(in) :: pblh
516 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rmol1
517 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flhc1
518 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flqc1
521 logical ,
dimension(:) ,
intent(in) :: dry
522 real(kind=kind_phys),
dimension(:) ,
intent(in) :: wind
523 integer ,
dimension(:) ,
intent(in) :: slopetyp
524 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmin
525 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmax
526 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snoalb
527 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: sfalb
528 logical ,
dimension(:) ,
intent(in) :: flag_iter
529 integer ,
intent(in) :: idveg
530 integer ,
intent(in) :: iopt_crs
531 integer ,
intent(in) :: iopt_btr
532 integer ,
intent(in) :: iopt_run
533 integer ,
intent(in) :: iopt_sfc
534 integer ,
intent(in) :: iopt_frz
535 integer ,
intent(in) :: iopt_inf
536 integer ,
intent(in) :: iopt_rad
537 integer ,
intent(in) :: iopt_alb
538 integer ,
intent(in) :: iopt_snf
539 integer ,
intent(in) :: iopt_tbot
540 integer ,
intent(in) :: iopt_stc
541 integer ,
intent(in) :: iopt_trs
542 integer ,
intent(in) :: iopt_diag
543 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xlatin
544 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xcoszin
545 integer ,
intent(in) :: iyrlen
546 real(kind=kind_phys) ,
intent(in) :: julian
547 real(kind=kind_phys),
dimension(:) ,
intent(in) :: garea
548 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rainn_mp
549 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rainc_mp
550 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snow_mp
551 real(kind=kind_phys),
dimension(:) ,
intent(in) :: graupel_mp
552 real(kind=kind_phys),
dimension(:) ,
intent(in) :: ice_mp
553 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rhonewsn1
554 real(kind=kind_phys) ,
intent(in) :: con_hvap
555 real(kind=kind_phys) ,
intent(in) :: con_cp
556 real(kind=kind_phys) ,
intent(in) :: con_jcal
557 real(kind=kind_phys) ,
intent(in) :: rhoh2o
558 real(kind=kind_phys) ,
intent(in) :: con_eps
559 real(kind=kind_phys) ,
intent(in) :: con_epsm1
560 real(kind=kind_phys) ,
intent(in) :: con_fvirt
561 real(kind=kind_phys) ,
intent(in) :: con_rd
562 real(kind=kind_phys) ,
intent(in) :: con_hfus
564 logical ,
intent(in) :: thsfc_loc
566 logical ,
intent(in) :: cpllnd
567 logical ,
intent(in) :: cpllnd2atm
569 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: weasd
570 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: snwdph
571 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tskin
572 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tprcp
573 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: srflag
574 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smc
575 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: stc
576 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: slc
577 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canopy
578 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: trans
579 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tsurf
580 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: zorl
582 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rb1
583 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm1
584 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh1
585 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ustar1
586 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stress1
587 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm101
588 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh21
590 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: snowxy
591 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tvxy
592 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tgxy
593 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canicexy
594 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canliqxy
595 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: eahxy
596 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tahxy
597 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: cmxy
598 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: chxy
599 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fwetxy
600 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: sneqvoxy
601 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: alboldxy
602 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: qsnowxy
603 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: wslakexy
604 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: zwtxy
605 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: waxy
606 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: wtxy
607 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: tsnoxy
608 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: zsnsoxy
609 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: snicexy
610 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: snliqxy
611 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: lfmassxy
612 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rtmassxy
613 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stmassxy
614 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: woodxy
615 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stblcpxy
616 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fastcpxy
617 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: xlaixy
618 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: xsaixy
619 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: taussxy
620 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smoiseq
621 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: smcwtdxy
622 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: deeprechxy
623 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rechxy
624 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdvis
625 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdnir
626 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albivis
627 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albinir
628 real(kind=kind_phys),
dimension(:) ,
intent(out) :: emiss
629 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sncovr1
630 real(kind=kind_phys),
dimension(:) ,
intent(out) :: qsurf
631 real(kind=kind_phys),
dimension(:) ,
intent(out) :: gflux
632 real(kind=kind_phys),
dimension(:) ,
intent(out) :: drain
633 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evap
634 real(kind=kind_phys),
dimension(:) ,
intent(out) :: hflx
635 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ep
636 real(kind=kind_phys),
dimension(:) ,
intent(out) :: runoff
637 real(kind=kind_phys),
dimension(:) ,
intent(out) :: cmm
638 real(kind=kind_phys),
dimension(:) ,
intent(out) :: chh
639 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evbs
640 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evcw
641 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sbsno
642 real(kind=kind_phys),
dimension(:) ,
intent(out) :: pah
643 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ecan
644 real(kind=kind_phys),
dimension(:) ,
intent(out) :: etran
645 real(kind=kind_phys),
dimension(:) ,
intent(out) :: edir
646 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snowc
647 real(kind=kind_phys),
dimension(:) ,
intent(out) :: stm
648 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snohf
649 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcwlt2
650 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcref2
651 real(kind=kind_phys),
dimension(:) ,
intent(out) :: wet1
652 real(kind=kind_phys),
dimension(:) ,
intent(out) :: t2mmp
653 real(kind=kind_phys),
dimension(:) ,
intent(out) :: q2mp
654 real(kind=kind_phys),
dimension(:) ,
intent(out) :: zvfun
655 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ztmax
656 real(kind=kind_phys),
dimension(:) ,
intent(out) :: rca
658 character(len=*) ,
intent(out) :: errmsg
659 integer ,
intent(out) :: errflg
661 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: canopy_heat_storage_ccpp
662 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: rainfall_ccpp
663 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_total_ccpp
664 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_reflected_total_ccpp
665 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_total_ccpp
666 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_grd_ccpp
667 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_grd_ccpp
668 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_2m_ccpp
669 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_2m_ccpp
670 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_veg_2m_ccpp
671 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_bare_2m_ccpp
672 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_veg_ccpp
673 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_ground_ccpp
674 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_out_ccpp
675 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_shallow_ccpp
676 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_direct_snow_ccpp
677 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_diffuse_snow_ccpp
678 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_ccpp
679 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_ccpp
680 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_veg_ccpp
681 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_leaf_ccpp
682 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_bar_ccpp
683 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_veg_ccpp
684 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_bare_ccpp
685 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_veg_ccpp
686 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_bare_ccpp
687 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_veg_ccpp
688 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_leaf_ccpp
689 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_bare_ccpp
690 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_trans_ccpp
691 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_leaf_ccpp
692 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_leaf_ccpp
693 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_below_canopy_ccpp
694 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_2m_ccpp
695 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_2m_ccpp
696 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_veg_ccpp
697 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_v_ccpp
698 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_b_ccpp
699 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_veg_ccpp
700 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_bare_ccpp
706 integer :: iopt_rsf = 4
707 integer :: iopt_soil = 1
708 integer :: iopt_pedo = 1
709 integer :: iopt_crop = 0
710 integer :: iopt_gla = 2
711 integer :: iopt_z0m = 1
717 integer :: i_location
718 integer :: j_location
719 real (kind=kind_phys) :: latitude
720 integer :: year_length
721 real (kind=kind_phys) :: julian_day
722 real (kind=kind_phys) :: cosine_zenith
723 real (kind=kind_phys) :: timestep
724 real (kind=kind_phys) :: spatial_scale
725 real (kind=kind_phys) :: atmosphere_thickness
726 integer :: soil_levels
727 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_interface_depth
728 integer :: max_snow_levels
729 real (kind=kind_phys) :: vegetation_frac
730 real (kind=kind_phys) :: area_grid
731 real (kind=kind_phys) :: max_vegetation_frac
732 integer :: vegetation_category
734 integer :: surface_type
736 real (kind=kind_phys),
dimension( 1:nsoil) :: eq_soil_water_vol
737 real (kind=kind_phys) :: temperature_forcing
738 real (kind=kind_phys) :: air_pressure_surface
739 real (kind=kind_phys) :: air_pressure_forcing
740 real (kind=kind_phys) :: uwind_forcing
741 real (kind=kind_phys) :: vwind_forcing
742 real (kind=kind_phys) :: spec_humidity_forcing
743 real (kind=kind_phys) :: cloud_water_forcing
744 real (kind=kind_phys) :: sw_radiation_forcing
745 real (kind=kind_phys) :: radiation_lw_forcing
746 real (kind=kind_phys) :: precipitation_forcing
747 real (kind=kind_phys) :: precip_convective
748 real (kind=kind_phys) :: precip_non_convective
749 real (kind=kind_phys) :: precip_sh_convective
750 real (kind=kind_phys) :: precip_snow
751 real (kind=kind_phys) :: precip_graupel
752 real (kind=kind_phys) :: precip_hail
753 real (kind=kind_phys) :: temperature_soil_bot
754 real (kind=kind_phys) :: co2_air
755 real (kind=kind_phys) :: o2_air
756 real (kind=kind_phys) :: foliage_nitrogen
757 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_ice_frac_old
758 real (kind=kind_phys) :: forcing_height
759 real (kind=kind_phys) :: snow_albedo_old
760 real (kind=kind_phys) :: snow_water_equiv_old
761 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: temperature_snow_soil
762 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_liquid_vol
763 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_moisture_vol
765 real (kind=kind_phys) :: surface_temperature
767 real (kind=kind_phys) :: temperature_canopy_air
768 real (kind=kind_phys) :: vapor_pres_canopy_air
769 real (kind=kind_phys) :: canopy_wet_fraction
770 real (kind=kind_phys) :: canopy_liquid
771 real (kind=kind_phys) :: canopy_ice
772 real (kind=kind_phys) :: temperature_leaf
773 real (kind=kind_phys) :: temperature_ground
774 real (kind=kind_phys) :: spec_humidity_surface
775 real (kind=kind_phys) :: snowfall
776 real (kind=kind_phys) :: rainfall
777 integer :: snow_levels
778 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: interface_depth
779 real (kind=kind_phys) :: snow_depth
780 real (kind=kind_phys) :: snow_water_equiv
781 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_ice
782 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_liquid
783 real (kind=kind_phys) :: depth_water_table
784 real (kind=kind_phys) :: aquifer_water
785 real (kind=kind_phys) :: saturated_water
786 real (kind=kind_phys) :: lake_water
787 real (kind=kind_phys) :: leaf_carbon
788 real (kind=kind_phys) :: root_carbon
789 real (kind=kind_phys) :: stem_carbon
790 real (kind=kind_phys) :: wood_carbon
791 real (kind=kind_phys) :: soil_carbon_stable
792 real (kind=kind_phys) :: soil_carbon_fast
793 real (kind=kind_phys) :: leaf_area_index
794 real (kind=kind_phys) :: stem_area_index
795 real (kind=kind_phys) :: cm_noahmp
796 real (kind=kind_phys) :: ch_noahmp
797 real (kind=kind_phys) :: snow_age
798 real (kind=kind_phys) :: grain_carbon
799 real (kind=kind_phys) :: growing_deg_days
800 integer :: plant_growth_stage
801 real (kind=kind_phys) :: soil_moisture_wtd
802 real (kind=kind_phys) :: deep_recharge
803 real (kind=kind_phys) :: recharge
804 real (kind=kind_phys) :: z0_total
805 real (kind=kind_phys) :: z0h_total
807 real (kind=kind_phys) :: sw_absorbed_total
808 real (kind=kind_phys) :: sw_reflected_total
809 real (kind=kind_phys) :: lw_absorbed_total
810 real (kind=kind_phys) :: sensible_heat_total
811 real (kind=kind_phys) :: ground_heat_total
812 real (kind=kind_phys) :: latent_heat_canopy
813 real (kind=kind_phys) :: latent_heat_ground
814 real (kind=kind_phys) :: transpiration_heat
815 real (kind=kind_phys) :: evaporation_canopy
816 real (kind=kind_phys) :: transpiration
817 real (kind=kind_phys) :: evaporation_soil
818 real (kind=kind_phys) :: temperature_radiative
819 real (kind=kind_phys) :: temperature_bare_grd
820 real (kind=kind_phys) :: temperature_veg_grd
821 real (kind=kind_phys) :: temperature_veg_2m
822 real (kind=kind_phys) :: temperature_bare_2m
823 real (kind=kind_phys) :: spec_humidity_veg_2m
824 real (kind=kind_phys) :: spec_humidity_bare_2m
825 real (kind=kind_phys) :: runoff_surface
826 real (kind=kind_phys) :: runoff_baseflow
827 real (kind=kind_phys) :: par_absorbed
828 real (kind=kind_phys) :: photosynthesis
829 real (kind=kind_phys) :: sw_absorbed_veg
830 real (kind=kind_phys) :: sw_absorbed_ground
831 real (kind=kind_phys) :: snow_cover_fraction
832 real (kind=kind_phys) :: net_eco_exchange
833 real (kind=kind_phys) :: global_prim_prod
834 real (kind=kind_phys) :: net_prim_prod
835 real (kind=kind_phys) :: vegetation_fraction
836 real (kind=kind_phys) :: albedo_total
837 real (kind=kind_phys) :: snowmelt_out
838 real (kind=kind_phys) :: snowmelt_shallow
839 real (kind=kind_phys) :: snowmelt_shallow_1
840 real (kind=kind_phys) :: snowmelt_shallow_2
841 real (kind=kind_phys) :: rs_sunlit
842 real (kind=kind_phys) :: rs_shaded
843 real (kind=kind_phys),
dimension(1:2) :: albedo_direct
844 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse
845 real (kind=kind_phys),
dimension(1:2) :: albedo_direct_snow
846 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse_snow
847 real (kind=kind_phys) :: canopy_gap_fraction
848 real (kind=kind_phys) :: incanopy_gap_fraction
849 real (kind=kind_phys) :: ch_vegetated
850 real (kind=kind_phys) :: ch_bare_ground
851 real (kind=kind_phys) :: emissivity_total
852 real (kind=kind_phys) :: sensible_heat_grd_veg
853 real (kind=kind_phys) :: sensible_heat_leaf
854 real (kind=kind_phys) :: sensible_heat_grd_bar
855 real (kind=kind_phys) :: latent_heat_grd_veg
856 real (kind=kind_phys) :: latent_heat_grd_bare
857 real (kind=kind_phys) :: ground_heat_veg
858 real (kind=kind_phys) :: ground_heat_bare
859 real (kind=kind_phys) :: lw_absorbed_grd_veg
860 real (kind=kind_phys) :: lw_absorbed_leaf
861 real (kind=kind_phys) :: lw_absorbed_grd_bare
862 real (kind=kind_phys) :: latent_heat_trans
863 real (kind=kind_phys) :: latent_heat_leaf
864 real (kind=kind_phys) :: ch_leaf
865 real (kind=kind_phys) :: ch_below_canopy
866 real (kind=kind_phys) :: ch_vegetated_2m
867 real (kind=kind_phys) :: ch_bare_ground_2m
868 real (kind=kind_phys) :: precip_frozen_frac
869 real (kind=kind_phys) :: precip_adv_heat_veg
870 real (kind=kind_phys) :: precip_adv_heat_grd_v
871 real (kind=kind_phys) :: precip_adv_heat_grd_b
872 real (kind=kind_phys) :: precip_adv_heat_total
873 real (kind=kind_phys) :: snow_sublimation
874 real (kind=kind_phys) :: lai_sunlit
875 real (kind=kind_phys) :: lai_shaded
876 real (kind=kind_phys) :: leaf_air_resistance
878 real (kind=kind_phys) :: canopy_heat_storage
879 real (kind=kind_phys) :: spec_humid_sfc_veg
880 real (kind=kind_phys) :: spec_humid_sfc_bare
882 real (kind=kind_phys) :: ustarx
883 real (kind=kind_phys) :: prslkix
884 real (kind=kind_phys) :: prsik1x
885 real (kind=kind_phys) :: prslk1x
887 real (kind=kind_phys) :: ch2
888 real (kind=kind_phys) :: cq2
889 real (kind=kind_phys) :: qfx
890 real (kind=kind_phys) :: wspd1
891 real (kind=kind_phys) :: pblhx
894 real (kind=kind_phys) :: rah_total
895 real (kind=kind_phys) :: cah_total
902 integer :: soil_category(nsoil)
903 integer :: slope_category
904 integer :: soil_color_category
905 character(len=256) :: dataset_identifier
907 real (kind=kind_phys) :: spec_humidity_sat
908 real (kind=kind_phys) :: vapor_pressure_sat
909 real (kind=kind_phys) :: latent_heat_total
910 real (kind=kind_phys) :: density
911 real (kind=kind_phys) :: virtual_temperature
912 real (kind=kind_phys) :: potential_evaporation
913 real (kind=kind_phys) :: potential_temperature
914 real (kind=kind_phys) :: penman_radiation
915 real (kind=kind_phys) :: dqsdt
916 real (kind=kind_phys) :: precip_freeze_frac_in
918 real (kind=kind_phys) :: virtfac1
919 real (kind=kind_phys) :: tflux
920 real (kind=kind_phys) :: tvs1
921 real (kind=kind_phys) :: vptemp
923 real(kind=kind_phys) :: tem1,tem2,gdx
924 real(kind=kind_phys),
parameter :: z0lo=0.1, z0up=1.0
926 logical :: is_snowing
927 logical :: is_freeze_rain
934 type(noahmp_parameters) :: parameters
949 if (cpllnd .and. cpllnd2atm)
return
953 if (flag_iter(i) .and. dry(i))
then
959 if(vegtype(i) == isice_table )
then
960 if(weasd(i) < 0.1)
then
969 dataset_identifier =
"modified_igbp_modis_noah"
976 cosine_zenith = xcoszin(i)
978 spatial_scale = -9999.0
979 atmosphere_thickness = -9999.0
981 soil_interface_depth = zsoil
982 max_snow_levels = nsnow
983 vegetation_frac = sigmaf(i)
984 max_vegetation_frac = shdmax(i)
985 vegetation_category = vegtype(i)
988 eq_soil_water_vol = smoiseq(i,:)
989 temperature_forcing = t1(i)
990 air_pressure_surface = ps(i)
991 air_pressure_forcing = prsl1(i)
992 uwind_forcing = u1(i)
993 vwind_forcing = v1(i)
1002 spec_humidity_forcing = max(q1(i), 1.e-8)
1003 virtual_temperature = temperature_forcing * &
1004 (1.0 + con_fvirt * spec_humidity_forcing)
1005 vapor_pressure_sat = fpvs( temperature_forcing )
1006 spec_humidity_sat = con_eps*vapor_pressure_sat / &
1007 (prsl1(i) + con_epsm1*vapor_pressure_sat)
1008 spec_humidity_sat = max(spec_humidity_sat, 1.e-8)
1009 spec_humidity_forcing = min(spec_humidity_sat,spec_humidity_forcing)
1011 cloud_water_forcing = -9999.0
1012 sw_radiation_forcing = dswsfc(i)
1013 radiation_lw_forcing = dlwflx(i)
1014 precipitation_forcing = 1000.0 * tprcp(i) / delt
1015 precip_convective = rainc_mp(i)
1016 precip_non_convective = rainn_mp(i)
1017 precip_sh_convective = 0.
1018 precip_snow = snow_mp(i)
1019 precip_graupel = graupel_mp(i)
1020 precip_hail = ice_mp(i)
1021 temperature_soil_bot = tg3(i)
1022 co2_air = co2_table * air_pressure_forcing
1023 o2_air = o2_table * air_pressure_forcing
1024 foliage_nitrogen = 1.0
1030 forcing_height = zf(i)
1031 snow_albedo_old = alboldxy(i)
1032 snow_water_equiv_old = sneqvoxy(i)
1033 temperature_snow_soil(-2: 0) = tsnoxy(i,:)
1034 temperature_snow_soil( 1:km) = stc(i,:)
1035 soil_liquid_vol = slc(i,:)
1036 soil_moisture_vol = smc(i,:)
1037 temperature_canopy_air = tahxy(i)
1038 vapor_pres_canopy_air = eahxy(i)
1039 canopy_wet_fraction = fwetxy(i)
1040 canopy_liquid = canliqxy(i)
1041 canopy_ice = canicexy(i)
1042 temperature_leaf = tvxy(i)
1043 temperature_ground = tgxy(i)
1044 spec_humidity_surface = undefined
1045 snowfall = qsnowxy(i)
1047 snow_levels = nint(snowxy(i))
1048 interface_depth = zsnsoxy(i,:)
1049 snow_depth = snwdph(i) * 0.001
1050 snow_water_equiv = weasd(i)
1051 if (snow_water_equiv /= 0.0 .and. snow_depth == 0.0)
then
1052 snow_depth = 10.0 * snow_water_equiv /1000.0
1054 snow_level_ice = snicexy(i,:)
1055 snow_level_liquid = snliqxy(i,:)
1056 depth_water_table = zwtxy(i)
1057 aquifer_water = waxy(i)
1058 saturated_water = wtxy(i)
1059 lake_water = wslakexy(i)
1060 leaf_carbon = lfmassxy(i)
1061 root_carbon = rtmassxy(i)
1062 stem_carbon = stmassxy(i)
1063 wood_carbon = woodxy(i)
1064 soil_carbon_stable = stblcpxy(i)
1065 soil_carbon_fast = fastcpxy(i)
1066 leaf_area_index = xlaixy(i)
1067 stem_area_index = xsaixy(i)
1070 snow_age = taussxy(i)
1074 soil_moisture_wtd = smcwtdxy(i)
1075 deep_recharge = deeprechxy(i)
1076 recharge = rechxy(i)
1080 snow_ice_frac_old = 0.0
1081 do k = snow_levels+1, 0
1082 if(snow_level_ice(k) > 0.0 ) &
1083 snow_ice_frac_old(k) = snow_level_ice(k) /(snow_level_ice(k)+snow_level_liquid(k))
1087 if (snow_depth .gt. 0.1 .or. vegetation_category == isice_table )
then
1096 density = air_pressure_forcing / (con_rd * virtual_temperature)
1097 chh(i) = ch(i) * wind(i) * density
1098 cmm(i) = cm(i) * wind(i)
1103 soil_category = soiltyp(i)
1104 slope_category = slopetyp(i)
1105 soil_color_category = soilcol(i)
1109 call transfer_mp_parameters(vegetation_category, soil_category, &
1110 slope_category, soil_color_category, crop_type,parameters)
1111 parameters%prcpiceden = rhonewsn1(i)
1112 call noahmp_options(idveg ,iopt_crs, iopt_btr , iopt_run, iopt_sfc, &
1113 iopt_frz, iopt_inf , iopt_rad, iopt_alb, &
1114 iopt_snf, iopt_tbot, iopt_stc, iopt_rsf, &
1115 iopt_soil,iopt_pedo, iopt_crop,iopt_trs, &
1118 if ( vegetation_category == isice_table )
then
1120 if (precipitation_forcing > 0.0)
then
1121 if (srflag(i) > 0.0)
then
1122 snowfall = srflag(i) * precipitation_forcing
1127 temperature_soil_bot = min(temperature_soil_bot,263.15)
1129 call noahmp_options_glacier(iopt_alb, iopt_snf, iopt_tbot, iopt_stc, iopt_gla, &
1131 vegetation_frac = 0.0
1132 call noahmp_glacier ( &
1133 i_location ,1 ,cosine_zenith ,nsnow , &
1135 temperature_forcing ,air_pressure_forcing ,uwind_forcing ,vwind_forcing , &
1136 spec_humidity_forcing,sw_radiation_forcing ,precipitation_forcing,radiation_lw_forcing , &
1137 temperature_soil_bot ,forcing_height ,snow_ice_frac_old ,zsoil , &
1138 thsfc_loc ,prslkix ,prsik1x ,prslk1x , &
1139 air_pressure_surface ,pblhx ,iz0tlnd ,itime , &
1140 vegetation_frac ,area_grid ,psi_opt , &
1141 con_fvirt ,con_eps ,con_epsm1 ,con_cp , &
1142 snowfall ,snow_water_equiv_old ,snow_albedo_old , &
1143 cm_noahmp ,ch_noahmp ,snow_levels ,snow_water_equiv , &
1144 soil_moisture_vol ,interface_depth ,snow_depth ,snow_level_ice , &
1145 snow_level_liquid ,temperature_ground ,temperature_snow_soil,soil_liquid_vol , &
1146 snow_age ,spec_humidity_surface,sw_absorbed_total ,sw_reflected_total , &
1147 lw_absorbed_total ,sensible_heat_total ,latent_heat_ground ,ground_heat_total , &
1148 temperature_radiative,evaporation_soil ,runoff_surface ,runoff_baseflow , &
1149 sw_absorbed_ground ,albedo_total ,snowmelt_out ,snowmelt_shallow , &
1150 snowmelt_shallow_1 ,snowmelt_shallow_2 ,temperature_bare_2m ,spec_humidity_bare_2m, &
1152 emissivity_total ,precip_frozen_frac ,ch_bare_ground_2m ,snow_sublimation , &
1154 albedo_direct ,albedo_diffuse, errmsg ,errflg )
1156 albedo_direct ,albedo_diffuse)
1160 if (errflg /= 0)
return
1167 snow_cover_fraction = 1.0
1168 temperature_leaf = temperature_radiative
1171 vapor_pres_canopy_air = 2000.0
1172 temperature_canopy_air = temperature_radiative
1173 canopy_wet_fraction = 0.0
1175 depth_water_table = 0.0
1177 saturated_water = 0.0
1182 soil_carbon_stable = 0.0
1183 soil_carbon_fast = 0.0
1184 leaf_area_index = 0.0
1185 stem_area_index = 0.0
1186 evaporation_canopy = 0.0
1189 precip_adv_heat_total = 0.0
1190 soil_moisture_wtd = 0.0
1193 eq_soil_water_vol = soil_moisture_vol
1194 transpiration_heat = 0.0
1195 latent_heat_canopy = 0.0
1197 latent_heat_total = latent_heat_ground
1198 t2mmp(i) = temperature_bare_2m
1199 q2mp(i) = spec_humidity_bare_2m
1201 tskin(i) = temperature_radiative
1202 tflux = temperature_ground
1203 surface_temperature = temperature_ground
1204 vegetation_fraction = vegetation_frac
1206 ch_bare_ground = ch_noahmp
1207 canopy_heat_storage = 0.0
1218 i_location ,j_location ,latitude , &
1219 year_length ,julian_day ,cosine_zenith , &
1220 timestep ,spatial_scale ,atmosphere_thickness , &
1221 soil_levels ,soil_interface_depth ,max_snow_levels , &
1222 vegetation_frac ,max_vegetation_frac ,vegetation_category , &
1223 ice_flag ,surface_type ,crop_type , &
1224 eq_soil_water_vol ,temperature_forcing ,air_pressure_forcing , &
1225 air_pressure_surface ,uwind_forcing ,vwind_forcing , &
1226 spec_humidity_forcing ,area_grid ,cloud_water_forcing , &
1227 sw_radiation_forcing ,radiation_lw_forcing ,thsfc_loc , &
1228 prslkix ,prsik1x ,prslk1x , &
1229 pblhx ,iz0tlnd ,itime , &
1231 precip_convective , &
1232 precip_non_convective ,precip_sh_convective ,precip_snow , &
1233 precip_graupel ,precip_hail ,temperature_soil_bot , &
1234 co2_air ,o2_air ,foliage_nitrogen , &
1235 snow_ice_frac_old ,forcing_height , &
1236 con_fvirt ,con_eps, con_epsm1 ,con_cp , &
1237 snow_albedo_old ,snow_water_equiv_old , &
1238 temperature_snow_soil ,soil_liquid_vol ,soil_moisture_vol , &
1239 temperature_canopy_air,vapor_pres_canopy_air ,canopy_wet_fraction , &
1240 canopy_liquid ,canopy_ice ,temperature_leaf , &
1241 temperature_ground ,spec_humidity_surface ,snowfall , &
1242 rainfall ,snow_levels ,interface_depth , &
1243 snow_depth ,snow_water_equiv ,snow_level_ice , &
1244 snow_level_liquid ,depth_water_table ,aquifer_water , &
1246 lake_water ,leaf_carbon ,root_carbon , &
1247 stem_carbon ,wood_carbon ,soil_carbon_stable , &
1248 soil_carbon_fast ,leaf_area_index ,stem_area_index , &
1249 cm_noahmp ,ch_noahmp ,snow_age , &
1250 grain_carbon ,growing_deg_days ,plant_growth_stage , &
1251 soil_moisture_wtd ,deep_recharge ,recharge,ustarx , &
1252 z0_total ,z0h_total ,surface_temperature , &
1253 sw_absorbed_total ,sw_reflected_total , &
1254 lw_absorbed_total ,sensible_heat_total ,ground_heat_total , &
1255 latent_heat_canopy ,latent_heat_ground ,transpiration_heat , &
1256 evaporation_canopy ,transpiration ,evaporation_soil , &
1257 temperature_radiative ,temperature_bare_grd ,temperature_veg_grd , &
1258 temperature_veg_2m ,temperature_bare_2m ,spec_humidity_veg_2m , &
1259 spec_humidity_bare_2m ,runoff_surface ,runoff_baseflow , &
1260 par_absorbed ,photosynthesis ,sw_absorbed_veg , &
1261 sw_absorbed_ground ,snow_cover_fraction ,net_eco_exchange , &
1262 global_prim_prod ,net_prim_prod ,vegetation_fraction , &
1263 albedo_total ,snowmelt_out ,snowmelt_shallow , &
1264 snowmelt_shallow_1 ,snowmelt_shallow_2 ,rs_sunlit , &
1265 rs_shaded ,albedo_direct ,albedo_diffuse , &
1266 albedo_direct_snow ,albedo_diffuse_snow , &
1267 canopy_gap_fraction , &
1268 incanopy_gap_fraction ,ch_vegetated ,ch_bare_ground , &
1269 emissivity_total ,sensible_heat_grd_veg ,sensible_heat_leaf , &
1270 sensible_heat_grd_bar ,latent_heat_grd_veg ,latent_heat_grd_bare , &
1271 ground_heat_veg ,ground_heat_bare ,lw_absorbed_grd_veg , &
1272 lw_absorbed_leaf ,lw_absorbed_grd_bare ,latent_heat_trans , &
1273 latent_heat_leaf ,ch_leaf ,ch_below_canopy , &
1274 ch_vegetated_2m ,ch_bare_ground_2m ,precip_frozen_frac , &
1275 precip_adv_heat_veg ,precip_adv_heat_grd_v ,precip_adv_heat_grd_b , &
1276 precip_adv_heat_total ,snow_sublimation ,canopy_heat_storage , &
1277 lai_sunlit ,lai_shaded ,leaf_air_resistance , &
1279 spec_humid_sfc_veg ,spec_humid_sfc_bare , &
1282 spec_humid_sfc_veg ,spec_humid_sfc_bare )
1286 if (errflg /= 0)
return
1289 latent_heat_total = latent_heat_canopy + latent_heat_ground + transpiration_heat
1291 t2mmp(i) = temperature_veg_2m * vegetation_fraction + &
1292 temperature_bare_2m * (1-vegetation_fraction)
1293 q2mp(i) = spec_humidity_veg_2m * vegetation_fraction + &
1294 spec_humidity_bare_2m * (1-vegetation_fraction)
1296 tskin(i) = temperature_radiative
1297 tflux = surface_temperature
1305 tsnoxy(i,:) = temperature_snow_soil(-2: 0)
1306 stc(i,:) = temperature_snow_soil( 1:km)
1307 hflx(i) = sensible_heat_total
1308 evap(i) = latent_heat_total
1309 evbs(i) = latent_heat_ground
1310 evcw(i) = latent_heat_canopy
1311 trans(i) = transpiration_heat
1312 gflux(i) = -1.0*ground_heat_total
1313 snohf(i) = snowmelt_out * con_hfus
1314 sbsno(i) = snow_sublimation
1315 pah(i) = precip_adv_heat_total
1319 zorl(i) = z0_total * 100.0
1320 ztmax(i) = z0h_total
1323 if(rs_sunlit .le. 0.0 .or. rs_shaded .le. 0.0 .or. &
1324 lai_sunlit .eq. 0.0 .or. lai_shaded .eq. 0.0)
then
1325 rca(i) = parameters%rsmax
1327 rca(i) = ((1.0/(rs_sunlit+leaf_air_resistance)*lai_sunlit) + &
1328 ((1.0/(rs_shaded+leaf_air_resistance))*lai_shaded))
1329 rca(i) = max((1.0/rca(i)),parameters%rsmin)
1332 smc(i,:) = soil_moisture_vol
1333 slc(i,:) = soil_liquid_vol
1334 snowxy(i) = float(snow_levels)
1335 weasd(i) = snow_water_equiv
1336 snicexy(i,:) = snow_level_ice
1337 snliqxy(i,:) = snow_level_liquid
1338 snwdph(i) = snow_depth * 1000.0
1339 canopy(i) = canopy_ice + canopy_liquid
1340 canliqxy(i) = canopy_liquid
1341 canicexy(i) = canopy_ice
1342 zwtxy(i) = depth_water_table
1343 waxy(i) = aquifer_water
1344 wtxy(i) = saturated_water
1345 qsnowxy(i) = snowfall
1346 ecan(i) = evaporation_canopy
1347 etran(i) = transpiration
1348 edir(i) = evaporation_soil
1349 drain(i) = runoff_baseflow
1350 runoff(i) = runoff_surface
1352 lfmassxy(i) = leaf_carbon
1353 rtmassxy(i) = root_carbon
1354 stmassxy(i) = stem_carbon
1355 woodxy(i) = wood_carbon
1356 stblcpxy(i) = soil_carbon_stable
1357 fastcpxy(i) = soil_carbon_fast
1358 xlaixy(i) = leaf_area_index
1359 xsaixy(i) = stem_area_index
1361 snowc(i) = snow_cover_fraction
1362 sncovr1(i) = snow_cover_fraction
1364 qsurf(i) = spec_humidity_surface
1367 tvxy(i) = temperature_leaf
1368 tgxy(i) = temperature_ground
1369 tahxy(i) = temperature_canopy_air
1370 eahxy(i) = vapor_pres_canopy_air
1371 emiss(i) = emissivity_total
1373 if(albedo_total > 0.0)
then
1374 sfalb(i) = albedo_total
1375 albdvis(i) = albedo_direct(1)
1376 albdnir(i) = albedo_direct(2)
1377 albivis(i) = albedo_diffuse(1)
1378 albinir(i) = albedo_diffuse(2)
1381 zsnsoxy(i,:) = interface_depth
1383 if(
present(canopy_heat_storage_ccpp )) canopy_heat_storage_ccpp(i) = canopy_heat_storage
1384 if(
present(rainfall_ccpp )) rainfall_ccpp(i) = rainfall
1385 if(
present(sw_absorbed_total_ccpp )) sw_absorbed_total_ccpp(i) = sw_absorbed_total
1386 if(
present(sw_reflected_total_ccpp )) sw_reflected_total_ccpp(i) = sw_reflected_total
1387 if(
present(lw_absorbed_total_ccpp )) lw_absorbed_total_ccpp(i) = lw_absorbed_total
1388 if(
present(temperature_bare_grd_ccpp )) temperature_bare_grd_ccpp(i) = temperature_bare_grd
1389 if(
present(temperature_veg_grd_ccpp )) temperature_veg_grd_ccpp(i) = temperature_veg_grd
1390 if(
present(temperature_veg_2m_ccpp )) temperature_veg_2m_ccpp(i) = temperature_veg_2m
1391 if(
present(temperature_bare_2m_ccpp )) temperature_bare_2m_ccpp(i) = temperature_bare_2m
1392 if(
present(spec_humidity_veg_2m_ccpp )) spec_humidity_veg_2m_ccpp(i) = spec_humidity_veg_2m
1393 if(
present(spec_humidity_bare_2m_ccpp)) spec_humidity_bare_2m_ccpp(i) = spec_humidity_bare_2m
1394 if(
present(sw_absorbed_veg_ccpp )) sw_absorbed_veg_ccpp(i) = sw_absorbed_veg
1395 if(
present(sw_absorbed_ground_ccpp )) sw_absorbed_ground_ccpp(i) = sw_absorbed_ground
1396 if(
present(snowmelt_out_ccpp )) snowmelt_out_ccpp(i) = snowmelt_out
1397 if(
present(snowmelt_shallow_ccpp )) snowmelt_shallow_ccpp(i) = snowmelt_shallow
1398 if(
present(albedo_direct_snow_ccpp )) albedo_direct_snow_ccpp(i,:) = albedo_direct_snow
1399 if(
present(albedo_diffuse_snow_ccpp )) albedo_diffuse_snow_ccpp(i,:) = albedo_diffuse_snow
1400 if(
present(ch_vegetated_ccpp )) ch_vegetated_ccpp(i) = ch_vegetated
1401 if(
present(ch_bare_ground_ccpp )) ch_bare_ground_ccpp(i) = ch_bare_ground
1402 if(
present(sensible_heat_grd_veg_ccpp)) sensible_heat_grd_veg_ccpp(i) = sensible_heat_grd_veg
1403 if(
present(sensible_heat_leaf_ccpp )) sensible_heat_leaf_ccpp(i) = sensible_heat_leaf
1404 if(
present(sensible_heat_grd_bar_ccpp)) sensible_heat_grd_bar_ccpp(i) = sensible_heat_grd_bar
1405 if(
present(latent_heat_grd_veg_ccpp )) latent_heat_grd_veg_ccpp(i) = latent_heat_grd_veg
1406 if(
present(latent_heat_grd_bare_ccpp )) latent_heat_grd_bare_ccpp(i) = latent_heat_grd_bare
1407 if(
present(ground_heat_veg_ccpp )) ground_heat_veg_ccpp(i) = ground_heat_veg
1408 if(
present(ground_heat_bare_ccpp )) ground_heat_bare_ccpp(i) = ground_heat_bare
1409 if(
present(lw_absorbed_grd_veg_ccpp )) lw_absorbed_grd_veg_ccpp(i) = lw_absorbed_grd_veg
1410 if(
present(lw_absorbed_leaf_ccpp )) lw_absorbed_leaf_ccpp(i) = lw_absorbed_leaf
1411 if(
present(lw_absorbed_grd_bare_ccpp )) lw_absorbed_grd_bare_ccpp(i) = lw_absorbed_grd_bare
1412 if(
present(latent_heat_trans_ccpp )) latent_heat_trans_ccpp(i) = latent_heat_trans
1413 if(
present(latent_heat_leaf_ccpp )) latent_heat_leaf_ccpp(i) = latent_heat_leaf
1414 if(
present(ch_leaf_ccpp )) ch_leaf_ccpp(i) = ch_leaf
1415 if(
present(ch_below_canopy_ccpp )) ch_below_canopy_ccpp(i) = ch_below_canopy
1416 if(
present(ch_vegetated_2m_ccpp )) ch_vegetated_2m_ccpp(i) = ch_vegetated_2m
1417 if(
present(ch_bare_ground_2m_ccpp )) ch_bare_ground_2m_ccpp(i) = ch_bare_ground_2m
1418 if(
present(precip_adv_heat_veg_ccpp )) precip_adv_heat_veg_ccpp(i) = precip_adv_heat_veg
1419 if(
present(precip_adv_heat_grd_v_ccpp)) precip_adv_heat_grd_v_ccpp(i) = precip_adv_heat_grd_v
1420 if(
present(precip_adv_heat_grd_b_ccpp)) precip_adv_heat_grd_b_ccpp(i) = precip_adv_heat_grd_b
1421 if(
present(spec_humid_sfc_veg_ccpp )) spec_humid_sfc_veg_ccpp(i) = spec_humid_sfc_veg
1422 if(
present(spec_humid_sfc_bare_ccpp )) spec_humid_sfc_bare_ccpp(i) = spec_humid_sfc_bare
1424 wslakexy(i) = lake_water
1425 fwetxy(i) = canopy_wet_fraction
1426 taussxy(i) = snow_age
1427 alboldxy(i) = snow_albedo_old
1428 sneqvoxy(i) = snow_water_equiv_old
1430 smcwtdxy(i) = soil_moisture_wtd
1431 deeprechxy(i) = deep_recharge
1432 rechxy(i) = recharge
1433 smoiseq(i,:) = eq_soil_water_vol
1435 stm(i) = (0.1*soil_moisture_vol(1) + &
1436 0.3*soil_moisture_vol(2) + &
1437 0.6*soil_moisture_vol(3) + &
1438 1.0*soil_moisture_vol(4))*1000.0
1440 wet1(i) = soil_moisture_vol(1) / smcmax_table(soil_category(1))
1441 smcwlt2(i) = smcdry_table(soil_category(1))
1442 smcref2(i) = smcref_table(soil_category(1))
1444 virtfac1 = 1.0 + con_fvirt * max(q1(i), 1.e-8)
1447 vptemp =temperature_forcing * prslki(i)*virtfac1
1449 vptemp =temperature_forcing /prslk1(i) * virtfac1
1453 tvs1 = tflux * virtfac1
1455 tvs1 = tflux/prsik1(i) * virtfac1
1458 z0_total = max(min(z0_total,forcing_height),1.0e-6)
1459 z0h_total = max(z0h_total,1.0e-6)
1462 tem1 = (z0_total - z0lo) / (z0up - z0lo)
1463 tem1 = min(max(tem1, 0.0_kind_phys), 1.0_kind_phys)
1464 tem2 = max(vegetation_fraction, 0.1_kind_phys)
1465 zvfun(i) = sqrt(tem1 * tem2)
1469 if ( iopt_sfc .ne. 4 )
then
1471 call gfs_stability &
1472 (zf(i), zvfun(i), gdx, virtual_temperature, vptemp,wind(i), z0_total, z0h_total, &
1473 tvs1, con_g, thsfc_loc, &
1474 rb1(i), fm1(i), fh1(i), fm101(i), fh21(i), cm(i), ch(i), stress1(i), ustar1(i))
1476 rmol1(i) = undefined
1477 flhc1(i) = undefined
1478 flqc1(i) = undefined
1480 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1481 cah_total = density * con_cp /rah_total
1488 qfx = evap(i) / con_hvap
1490 call sfcdif4(i_location ,j_location ,uwind_forcing ,vwind_forcing , &
1491 temperature_forcing, air_pressure_forcing ,air_pressure_surface , &
1492 pblhx,gdx,z0_total,con_fvirt,con_eps,con_cp,itime,snwdph(i),mnice, &
1493 psi_opt,surface_temperature, &
1494 spec_humidity_forcing,forcing_height,iz0tlnd,spec_humidity_surface,&
1495 sensible_heat_total,qfx,cm(i),ch(i),ch2,cq2,rmol1(i),ustar1(i), &
1496 rb1(i),fm1(i),fh1(i),stress1(i),fm101(i),fh21(i),wspd1,flhc1(i), &
1502 ch(i) = ch_vegetated * vegetation_fraction + ch_bare_ground*(1.0-vegetation_fraction)
1504 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1505 cah_total = density * con_cp /rah_total
1516 chh(i) = chxy(i) * wind(i) * density
1517 cmm(i) = cmxy(i) * wind(i)
1519 snwdph(i) = snow_depth * 1000.0
1525 hflx(i) = hflx(i) / density / con_cp
1526 evap(i) = evap(i) / density / con_hvap
1531 potential_temperature = temperature_forcing * prslki(i)
1532 virtual_temperature = temperature_forcing * (1.0 + 0.61*spec_humidity_forcing)
1533 penman_radiation = sw_absorbed_total + radiation_lw_forcing
1534 dqsdt = spec_humidity_sat * a23m4/(temperature_forcing-a4)**2
1536 precip_freeze_frac_in = srflag(i)
1537 is_snowing = .false.
1538 is_freeze_rain = .false.
1539 if (precipitation_forcing > 0.0)
then
1540 if (precip_freeze_frac_in > 0.0)
then
1543 if (temperature_forcing <= 275.15) is_freeze_rain = .true.
1550 ch_noahmp = chxy(i) * wind(i)
1552 call penman (temperature_forcing, air_pressure_forcing , ch_noahmp , &
1553 virtual_temperature, potential_temperature, precipitation_forcing, &
1554 penman_radiation , ground_heat_total , spec_humidity_forcing, &
1555 spec_humidity_sat , potential_evaporation, is_snowing , &
1556 is_freeze_rain , precip_freeze_frac_in, dqsdt , &
1557 emissivity_total , snow_cover_fraction )
1559 ep(i) = potential_evaporation
1567 end subroutine noahmpdrv_run
1574 subroutine transfer_mp_parameters (vegtype,soiltype,slopetype, &
1575 soilcolor,croptype,parameters)
1578 use module_sf_noahmplsm
1582 integer,
intent(in) :: vegtype
1583 integer,
intent(in) :: soiltype(4)
1584 integer,
intent(in) :: slopetype
1585 integer,
intent(in) :: soilcolor
1586 integer,
intent(in) :: croptype
1588 type (noahmp_parameters),
intent(out) :: parameters
1596 parameters%iswater = iswater_table
1597 parameters%isbarren = isbarren_table
1598 parameters%isice = isice_table
1599 parameters%iscrop = iscrop_table
1600 parameters%eblforest = eblforest_table
1603 parameters%urban_flag = .false.
1604 if( vegtype == isurban_table .or. vegtype == 31 &
1605 & .or.vegtype == 32 .or. vegtype == 33)
then
1606 parameters%urban_flag = .true.
1613 parameters%ch2op = ch2op_table(vegtype)
1614 parameters%dleaf = dleaf_table(vegtype)
1615 parameters%z0mvt = z0mvt_table(vegtype)
1616 parameters%hvt = hvt_table(vegtype)
1617 parameters%hvb = hvb_table(vegtype)
1618 parameters%z0mhvt = z0mhvt_table(vegtype)
1619 parameters%den = den_table(vegtype)
1620 parameters%rc = rc_table(vegtype)
1621 parameters%mfsno = mfsno_table(vegtype)
1622 parameters%scffac = scffac_table(vegtype)
1623 parameters%cbiom = cbiom_table(vegtype)
1624 parameters%saim = saim_table(vegtype,:)
1625 parameters%laim = laim_table(vegtype,:)
1626 parameters%sla = sla_table(vegtype)
1627 parameters%dilefc = dilefc_table(vegtype)
1628 parameters%dilefw = dilefw_table(vegtype)
1629 parameters%fragr = fragr_table(vegtype)
1630 parameters%ltovrc = ltovrc_table(vegtype)
1632 parameters%c3psn = c3psn_table(vegtype)
1633 parameters%kc25 = kc25_table(vegtype)
1634 parameters%akc = akc_table(vegtype)
1635 parameters%ko25 = ko25_table(vegtype)
1636 parameters%ako = ako_table(vegtype)
1637 parameters%vcmx25 = vcmx25_table(vegtype)
1638 parameters%avcmx = avcmx_table(vegtype)
1639 parameters%bp = bp_table(vegtype)
1640 parameters%mp = mp_table(vegtype)
1641 parameters%qe25 = qe25_table(vegtype)
1642 parameters%aqe = aqe_table(vegtype)
1643 parameters%rmf25 = rmf25_table(vegtype)
1644 parameters%rms25 = rms25_table(vegtype)
1645 parameters%rmr25 = rmr25_table(vegtype)
1646 parameters%arm = arm_table(vegtype)
1647 parameters%folnmx = folnmx_table(vegtype)
1648 parameters%tmin = tmin_table(vegtype)
1650 parameters%xl = xl_table(vegtype)
1651 parameters%rhol = rhol_table(vegtype,:)
1652 parameters%rhos = rhos_table(vegtype,:)
1653 parameters%taul = taul_table(vegtype,:)
1654 parameters%taus = taus_table(vegtype,:)
1656 parameters%mrp = mrp_table(vegtype)
1657 parameters%cwpvt = cwpvt_table(vegtype)
1659 parameters%wrrat = wrrat_table(vegtype)
1660 parameters%wdpool = wdpool_table(vegtype)
1661 parameters%tdlef = tdlef_table(vegtype)
1663 parameters%nroot = nroot_table(vegtype)
1664 parameters%rgl = rgl_table(vegtype)
1665 parameters%rsmin = rs_table(vegtype)
1666 parameters%hs = hs_table(vegtype)
1667 parameters%topt = topt_table(vegtype)
1668 parameters%rsmax = rsmax_table(vegtype)
1674 parameters%albsat = albsat_table(soilcolor,:)
1675 parameters%albdry = albdry_table(soilcolor,:)
1676 parameters%albice = albice_table
1677 parameters%alblak = alblak_table
1678 parameters%omegas = omegas_table
1679 parameters%betads = betads_table
1680 parameters%betais = betais_table
1681 parameters%eg = eg_table
1687 if(croptype > 0)
then
1688 parameters%pltday = pltday_table(croptype)
1689 parameters%hsday = hsday_table(croptype)
1690 parameters%plantpop = plantpop_table(croptype)
1691 parameters%irri = irri_table(croptype)
1692 parameters%gddtbase = gddtbase_table(croptype)
1693 parameters%gddtcut = gddtcut_table(croptype)
1694 parameters%gdds1 = gdds1_table(croptype)
1695 parameters%gdds2 = gdds2_table(croptype)
1696 parameters%gdds3 = gdds3_table(croptype)
1697 parameters%gdds4 = gdds4_table(croptype)
1698 parameters%gdds5 = gdds5_table(croptype)
1699 parameters%c3c4 = c3c4_table(croptype)
1700 parameters%aref = aref_table(croptype)
1701 parameters%psnrf = psnrf_table(croptype)
1702 parameters%i2par = i2par_table(croptype)
1703 parameters%tassim0 = tassim0_table(croptype)
1704 parameters%tassim1 = tassim1_table(croptype)
1705 parameters%tassim2 = tassim2_table(croptype)
1706 parameters%k = k_table(croptype)
1707 parameters%epsi = epsi_table(croptype)
1708 parameters%q10mr = q10mr_table(croptype)
1709 parameters%foln_mx = foln_mx_table(croptype)
1710 parameters%lefreez = lefreez_table(croptype)
1711 parameters%dile_fc = dile_fc_table(croptype,:)
1712 parameters%dile_fw = dile_fw_table(croptype,:)
1713 parameters%fra_gr = fra_gr_table(croptype)
1714 parameters%lf_ovrc = lf_ovrc_table(croptype,:)
1715 parameters%st_ovrc = st_ovrc_table(croptype,:)
1716 parameters%rt_ovrc = rt_ovrc_table(croptype,:)
1717 parameters%lfmr25 = lfmr25_table(croptype)
1718 parameters%stmr25 = stmr25_table(croptype)
1719 parameters%rtmr25 = rtmr25_table(croptype)
1720 parameters%grainmr25 = grainmr25_table(croptype)
1721 parameters%lfpt = lfpt_table(croptype,:)
1722 parameters%stpt = stpt_table(croptype,:)
1723 parameters%rtpt = rtpt_table(croptype,:)
1724 parameters%grainpt = grainpt_table(croptype,:)
1725 parameters%bio2lai = bio2lai_table(croptype)
1732 parameters%co2 = co2_table
1733 parameters%o2 = o2_table
1734 parameters%timean = timean_table
1735 parameters%fsatmx = fsatmx_table
1736 parameters%z0sno = z0sno_table
1737 parameters%ssi = ssi_table
1738 parameters%snow_ret_fac = snow_ret_fac_table
1739 parameters%swemx = swemx_table
1740 parameters%tau0 = tau0_table
1741 parameters%grain_growth = grain_growth_table
1742 parameters%extra_growth = extra_growth_table
1743 parameters%dirt_soot = dirt_soot_table
1744 parameters%bats_cosz = bats_cosz_table
1745 parameters%bats_vis_new = bats_vis_new_table
1746 parameters%bats_nir_new = bats_nir_new_table
1747 parameters%bats_vis_age = bats_vis_age_table
1748 parameters%bats_nir_age = bats_nir_age_table
1749 parameters%bats_vis_dir = bats_vis_dir_table
1750 parameters%bats_nir_dir = bats_nir_dir_table
1751 parameters%rsurf_snow = rsurf_snow_table
1752 parameters%rsurf_exp = rsurf_exp_table
1753 parameters%snow_emis = snow_emis_table
1759 do isoil = 1,
size(soiltype)
1760 parameters%bexp(isoil) = bexp_table(soiltype(isoil))
1761 parameters%dksat(isoil) = dksat_table(soiltype(isoil))
1762 parameters%dwsat(isoil) = dwsat_table(soiltype(isoil))
1763 parameters%psisat(isoil) = psisat_table(soiltype(isoil))
1764 parameters%quartz(isoil) = quartz_table(soiltype(isoil))
1765 parameters%smcdry(isoil) = smcdry_table(soiltype(isoil))
1766 parameters%smcmax(isoil) = smcmax_table(soiltype(isoil))
1767 parameters%smcref(isoil) = smcref_table(soiltype(isoil))
1768 parameters%smcwlt(isoil) = smcwlt_table(soiltype(isoil))
1771 parameters%f1 = f1_table(soiltype(1))
1772 parameters%refdk = refdk_table
1773 parameters%refkdt = refkdt_table
1778 parameters%csoil = csoil_table
1779 parameters%zbot = zbot_table
1780 parameters%czil = czil_table
1783 parameters%kdt = parameters%refkdt * parameters%dksat(1) / parameters%refdk
1784 parameters%slope = slope_table(slopetype)
1786 if(parameters%urban_flag)
then
1787 parameters%smcmax = 0.45
1788 parameters%smcref = 0.42
1789 parameters%smcwlt = 0.40
1790 parameters%smcdry = 0.40
1791 parameters%csoil = 3.e6
1797 if(soiltype(1) /= 14)
then
1798 frzfact = (parameters%smcmax(1) / parameters%smcref(1)) * (0.412 / 0.468)
1799 parameters%frzx = frzk * frzfact
1802 end subroutine transfer_mp_parameters
1806SUBROUTINE pedotransfer_sr2006(nsoil,sand,clay,orgm,parameters)
1808 use module_sf_noahmplsm
1813 integer,
intent(in ) :: nsoil
1814 real,
dimension( 1:nsoil ),
intent(inout) :: sand
1815 real,
dimension( 1:nsoil ),
intent(inout) :: clay
1816 real,
dimension( 1:nsoil ),
intent(inout) :: orgm
1818 real,
dimension( 1:nsoil ) :: theta_1500t
1819 real,
dimension( 1:nsoil ) :: theta_1500
1820 real,
dimension( 1:nsoil ) :: theta_33t
1821 real,
dimension( 1:nsoil ) :: theta_33
1822 real,
dimension( 1:nsoil ) :: theta_s33t
1823 real,
dimension( 1:nsoil ) :: theta_s33
1824 real,
dimension( 1:nsoil ) :: psi_et
1825 real,
dimension( 1:nsoil ) :: psi_e
1827 type(noahmp_parameters),
intent(inout) :: parameters
1831 if(sand(k) <= 0 .or. clay(k) <= 0)
then
1835 if(orgm(k) <= 0 ) orgm(k) = 0.0
1838 theta_1500t = sr2006_theta_1500t_a*sand &
1839 + sr2006_theta_1500t_b*clay &
1840 + sr2006_theta_1500t_c*orgm &
1841 + sr2006_theta_1500t_d*sand*orgm &
1842 + sr2006_theta_1500t_e*clay*orgm &
1843 + sr2006_theta_1500t_f*sand*clay &
1844 + sr2006_theta_1500t_g
1846 theta_1500 = theta_1500t &
1847 + sr2006_theta_1500_a*theta_1500t &
1848 + sr2006_theta_1500_b
1850 theta_33t = sr2006_theta_33t_a*sand &
1851 + sr2006_theta_33t_b*clay &
1852 + sr2006_theta_33t_c*orgm &
1853 + sr2006_theta_33t_d*sand*orgm &
1854 + sr2006_theta_33t_e*clay*orgm &
1855 + sr2006_theta_33t_f*sand*clay &
1856 + sr2006_theta_33t_g
1858 theta_33 = theta_33t &
1859 + sr2006_theta_33_a*theta_33t*theta_33t &
1860 + sr2006_theta_33_b*theta_33t &
1863 theta_s33t = sr2006_theta_s33t_a*sand &
1864 + sr2006_theta_s33t_b*clay &
1865 + sr2006_theta_s33t_c*orgm &
1866 + sr2006_theta_s33t_d*sand*orgm &
1867 + sr2006_theta_s33t_e*clay*orgm &
1868 + sr2006_theta_s33t_f*sand*clay &
1869 + sr2006_theta_s33t_g
1871 theta_s33 = theta_s33t &
1872 + sr2006_theta_s33_a*theta_s33t &
1873 + sr2006_theta_s33_b
1875 psi_et = sr2006_psi_et_a*sand &
1876 + sr2006_psi_et_b*clay &
1877 + sr2006_psi_et_c*theta_s33 &
1878 + sr2006_psi_et_d*sand*theta_s33 &
1879 + sr2006_psi_et_e*clay*theta_s33 &
1880 + sr2006_psi_et_f*sand*clay &
1884 + sr2006_psi_e_a*psi_et*psi_et &
1885 + sr2006_psi_e_b*psi_et &
1888 parameters%smcwlt = theta_1500
1889 parameters%smcref = theta_33
1890 parameters%smcmax = theta_33 &
1892 + sr2006_smcmax_a*sand &
1895 parameters%bexp = 3.816712826 / (log(theta_33) - log(theta_1500) )
1896 parameters%psisat = psi_e
1897 parameters%dksat = 1930.0 * (parameters%smcmax - theta_33) ** (3.0 - 1.0/parameters%bexp)
1898 parameters%quartz = sand
1902 parameters%psisat = max(0.1,parameters%psisat)
1903 parameters%psisat = 0.101997 * parameters%psisat
1904 parameters%dksat = parameters%dksat / 3600000.0
1905 parameters%dwsat = parameters%dksat * parameters%psisat *parameters%bexp / parameters%smcmax
1906 parameters%smcdry = parameters%smcwlt
1910 parameters%smcmax = max(0.32 ,min(parameters%smcmax, 0.50 ))
1911 parameters%smcref = max(0.17 ,min(parameters%smcref,parameters%smcmax ))
1912 parameters%smcwlt = max(0.01 ,min(parameters%smcwlt,parameters%smcref ))
1913 parameters%smcdry = max(0.01 ,min(parameters%smcdry,parameters%smcref ))
1914 parameters%bexp = max(2.50 ,min(parameters%bexp, 12.0 ))
1915 parameters%psisat = max(0.03 ,min(parameters%psisat, 1.00 ))
1916 parameters%dksat = max(5.e-7,min(parameters%dksat, 1.e-5))
1917 parameters%dwsat = max(1.e-6,min(parameters%dwsat, 3.e-5))
1918 parameters%quartz = max(0.05 ,min(parameters%quartz, 0.95 ))
1920 END SUBROUTINE pedotransfer_sr2006
1928 subroutine penman (sfctmp,sfcprs,ch,t2v,th2,prcp,fdown,ssoil, &
1929 & q2,q2sat,etp,snowng,frzgra,ffrozp, &
1930 & dqsdt2,emissi_in,sncovr)
1937 use machine,
only: kind_phys
1939 logical,
intent(in) :: snowng, frzgra
1940 real(kind=kind_phys),
intent(in) :: ch, dqsdt2,fdown,prcp,ffrozp, &
1941 & q2, q2sat,ssoil, sfcprs, sfctmp, &
1942 & t2v, th2,emissi_in,sncovr
1943 real(kind=kind_phys),
intent(out) :: etp
1944 real(kind=kind_phys) :: epsca,flx2,rch,rr,t24
1945 real(kind=kind_phys) :: a, delta, fnet,rad,rho,emissi,elcp1,lvs
1947 real(kind=kind_phys),
parameter :: elcp = 2.4888e+3, lsubc = 2.501000e+6,cp = 1004.6
1948 real(kind=kind_phys),
parameter :: lsubs = 2.83e+6, rd = 287.05, cph2o = 4.1855e+3
1949 real(kind=kind_phys),
parameter :: cpice = 2.106e+3, lsubf = 3.335e5
1950 real(kind=kind_phys),
parameter :: sigma = 5.6704e-8
1960 lvs = (1.0-sncovr)*lsubc + sncovr*lsubs
1963 delta = elcp * dqsdt2
1965 t24 = sfctmp * sfctmp * sfctmp * sfctmp
1966 rr = t24 * 6.48e-8 / (sfcprs * ch) + 1.0
1968 rho = sfcprs / (rd * t2v)
1975 if (.not. snowng)
then
1976 if (prcp > 0.0) rr = rr + cph2o * prcp / rch
1979 rr = rr + (cpice*ffrozp+cph2o*(1.-ffrozp)) &
1988 fnet = fdown - emissi*sigma * t24- ssoil
1990 flx2 = - lsubf * prcp
1996 rad = fnet / rch + th2- sfctmp
1997 a = elcp * (q2sat - q2)
1999 epsca = (a * rr + rad * delta) / (delta + rr)
2000 etp = epsca * rch / lsubc
2004 end subroutine penman
2006 end module noahmpdrv
subroutine noahmp_sflx(parameters, iloc, jloc, lat, yearlen, julian, cosz, dt, dx, dz8w, nsoil, zsoil, nsnow, shdfac, shdmax, vegtyp, ice, ist, croptype, smceq, sfctmp, sfcprs, psfc, uu, vv, q2, garea1, qc, soldn, lwdn, thsfc_loc, prslkix, prsik1x, prslk1x, pblhx, iz0tlnd, itime,psi_opt, prcpconv, prcpnonc, prcpshcv, prcpsnow, prcpgrpl, prcphail, tbot, co2air, o2air, foln, ficeold, zlvl, ep_1, ep_2, epsm1, cp, albold, sneqvo, stc, sh2o, smc, tah, eah, fwet, canliq, canice, tv, tg, qsfc, qsnow, qrain, isnow, zsnso, snowh, sneqv, snice, snliq, zwt, wa, wt, wslake, lfmass, rtmass, stmass, wood, stblcp, fastcp, lai, sai, cm, ch, tauss, grain, gdd, pgs, smcwtd,deeprech, rech, ustarx, z0wrf, z0hwrf, ts, fsa, fsr, fira, fsh, ssoil, fcev, fgev, fctr, ecan, etran, edir, trad, tgb, tgv, t2mv, t2mb, q2v, q2b, runsrf, runsub, apar, psn, sav, sag, fsno, nee, gpp, npp, fveg, albedo, qsnbot, ponding, ponding1, ponding2, rssun, rssha, albd, albi, albsnd, albsni, bgap, wgap, chv, chb, emissi, shg, shc, shb, evg, evb, ghv, ghb, irg, irc, irb, tr, evc, chleaf, chuc, chv2, chb2, fpice, pahv, pahg, pahb, pah, esnow, canhs, laisun, laisha, rb, qsfcveg, qsfcbare ifdef ccpp
subroutine, public set_soilveg(me, isot, ivet, nlunit, errmsg, errflg)
This subroutine initializes soil and vegetation.
TODO: replace with appropriate licence for CCPP.
This module contains the interface of noahmp_glacier_routines and noahmp_glacier_globals.
This module contains namelist options for Noah LSM.
brief Data from MPTABLE.TBL, SOILPARM.TBL, GENPARM.TBL for NoahMP
This module contains set_soilveg subroutine.