CCPP SciDoc v7.0.x  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
lsm_noah.f
1
3
5 module lsm_noah
6
7 use machine, only: kind_phys
10 use sflx
11
12 implicit none
13
14 private
15
16 public :: lsm_noah_init, lsm_noah_run, lsm_noah_finalize
17
18 contains
19
24 subroutine lsm_noah_init(lsm, lsm_noah, me, isot, ivegsrc, nlunit,
25 & pores, resid, errmsg, errflg)
26
27 implicit none
28 integer, intent(in) :: lsm
29 integer, intent(in) :: lsm_noah
30
31 integer, intent(in) :: me, isot, ivegsrc, nlunit
32
33 real (kind=kind_phys), dimension(:), intent(out) :: pores, resid
34
35 character(len=*), intent(out) :: errmsg
36 integer, intent(out) :: errflg
37
38 ! Initialize CCPP error handling variables
39 errmsg = ''
40 errflg = 0
41
42 ! Consistency checks
43 if (lsm/=lsm_noah) then
44 write(errmsg,'(*(a))') 'Logic error: namelist choice of ',
45 & 'LSM is different from Noah'
46 errflg = 1
47 return
48 end if
49
50 if (ivegsrc > 2) then
51 errmsg = 'The NOAH LSM expects that the ivegsrc physics '//
52 & 'namelist parameter is 0, 1, or 2. Exiting...'
53 errflg = 1
54 return
55 end if
56 if (isot > 1) then
57 errmsg = 'The NOAH LSM expects that the isot physics '//
58 & 'namelist parameter is 0, or 1. Exiting...'
59 errflg = 1
60 return
61 end if
62
63 !--- initialize soil vegetation
64 call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg)
65
66 pores(:) = maxsmc(:)
67 resid(:) = drysmc(:)
68
69 end subroutine lsm_noah_init
70
71
75 subroutine lsm_noah_finalize(errmsg, errflg)
76
77 implicit none
78
79 character(len=*), intent(out) :: errmsg
80 integer, intent(out) :: errflg
81
82 ! Initialize CCPP error handling variables
83 errmsg = ''
84 errflg = 0
85
86 end subroutine lsm_noah_finalize
87
88
89! ===================================================================== !
90! description: !
91! !
92! usage: !
93! !
94! call sfc_drv !
95! --- inputs: !
96! ( im, km, ps, t1, q1, soiltyp, vegtype, sigmaf, !
97! sfcemis, dlwflx, dswsfc, delt, tg3, cm, ch, !
98! prsl1, prslki, zf, land, wind, slopetyp, !
99! shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, !
100! lheatstrg, isot, ivegsrc, !
101! albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, !
102! adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, !
103! --- in/outs: !
104! weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, !
105! canopy, trans, tsurf, zorl, !
106! --- outputs: !
107! sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, !
108! cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, !
109! smcwlt2, smcref2, wet1 ) !
110! !
111! !
112! subprogram called: sflx !
113! !
114! program history log: !
115! xxxx -- created !
116! 200x -- sarah lu modified !
117! oct 2006 -- h. wei modified !
118! apr 2009 -- y.-t. hou modified to include surface emissivity !
119! effect on lw radiation. replaced the comfussing !
120! slrad (net sw + dlw) with sfc net sw snet=dsw-usw !
121! sep 2009 -- s. moorthi modification to remove rcl and unit change!
122! nov 2011 -- sarah lu corrected wet1 calculation
123! !
124! ==================== defination of variables ==================== !
125! !
126! inputs: size !
127! im - integer, horiz dimention and num of used pts 1 !
128! km - integer, vertical soil layer dimension 1 !
129! ps - real, surface pressure (pa) im !
130! t1 - real, surface layer mean temperature (k) im !
131! q1 - real, surface layer mean specific humidity im !
132! soiltyp - integer, soil type (integer index) im !
133! vegtype - integer, vegetation type (integer index) im !
134! sigmaf - real, areal fractional cover of green vegetation im !
135! sfcemis - real, sfc lw emissivity ( fraction ) im !
136! dlwflx - real, total sky sfc downward lw flux ( w/m**2 ) im !
137! dswflx - real, total sky sfc downward sw flux ( w/m**2 ) im !
138! delt - real, time interval (second) 1 !
139! tg3 - real, deep soil temperature (k) im !
140! cm - real, surface exchange coeff for momentum (m/s) im !
141! ch - real, surface exchange coeff heat & moisture(m/s) im !
142! prsl1 - real, sfc layer 1 mean pressure (pa) im !
143! prslki - real, dimensionless exner function at layer 1 im !
144! zf - real, height of bottom layer (m) im !
145! land - logical, = T if a point with any land im !
146! wind - real, wind speed (m/s) im !
147! slopetyp - integer, class of sfc slope (integer index) im !
148! shdmin - real, min fractional coverage of green veg im !
149! shdmax - real, max fractnl cover of green veg (not used) im !
150! snoalb - real, upper bound on max albedo over deep snow im !
151! sfalb - real, mean sfc diffused sw albedo (fractional) im !
152! albdvis_lnd - real, sfc vis direct sw albedo over land im !
153! albdnir_lnd - real, sfc nir direct sw albedo over land im !
154! albivis_lnd - real, sfc vis diffused sw albedo over land im !
155! albinir_lnd - real, sfc nir diffused sw albedo over land im !
156! adjvisbmd - real, t adj sfc uv+vis-beam sw dnward flux im !
157! adjnirbmd - real, t adj sfc nir-beam sw dnward flux im !
158! adjvisdfd - real, t adj sfc uv+vis-diff sw dnward flux im !
159! adjnirdfd - real, t adj sfc nir-diff sw dnward flux im !
160! flag_iter- logical, im !
161! flag_guess-logical, im !
162! lheatstrg- logical, flag for canopy heat storage 1 !
163! parameterization !
164! isot - integer, sfc soil type data source zobler or statsgo !
165! ivegsrc - integer, sfc veg type data source umd or igbp !
166! !
167! input/outputs: !
168! weasd - real, water equivalent accumulated snow depth (mm) im !
169! snwdph - real, snow depth (water equiv) over land im !
170! tskin - real, ground surface skin temperature ( k ) im !
171! tprcp - real, total precipitation im !
172! srflag - real, snow/rain flag for precipitation im !
173! smc - real, total soil moisture content (fractional) im,km !
174! stc - real, soil temp (k) im,km !
175! slc - real, liquid soil moisture im,km !
176! canopy - real, canopy moisture content (m) im !
177! trans - real, total plant transpiration (m/s) im !
178! tsurf - real, surface skin temperature (after iteration) im !
179! zorl - real, surface roughness im !
180! sncovr1 - real, snow cover over land (fractional) im !
181! qsurf - real, specific humidity at sfc im !
182! gflux - real, soil heat flux (w/m**2) im !
183! drain - real, subsurface runoff (mm/s) im !
184! evap - real, evaperation from latent heat flux im !
185! hflx - real, sensible heat flux im !
186! ep - real, potential evaporation im !
187! runoff - real, surface runoff (m/s) im !
188! cmm - real, im !
189! chh - real, im !
190! evbs - real, direct soil evaporation (m/s) im !
191! evcw - real, canopy water evaporation (m/s) im !
192! sbsno - real, sublimation/deposit from snopack (m/s) im !
193! snowc - real, fractional snow cover im !
194! stm - real, total soil column moisture content (m) im !
195! snohf - real, snow/freezing-rain latent heat flux (w/m**2)im !
196! smcwlt2 - real, dry soil moisture threshold im !
197! smcref2 - real, soil moisture threshold im !
198! wet1 - real, normalized soil wetness im !
199! lai - real, leaf area index (dimensionless) im !
200! rca - real, canopy resistance (s/m) im !
201! !
202! ==================== end of description ===================== !
203
214 subroutine lsm_noah_run &
215 & ( im, km, grav, cp, hvap, rd, eps, epsm1, rvrdm1, ps, & ! --- inputs:
216 & t1, q1, soiltyp, vegtype, sigmaf, &
217 & sfcemis, dlwflx, dswsfc, delt, tg3, cm, ch, &
218 & prsl1, prslki, zf, land, wind, slopetyp, &
219 & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, &
220 & lheatstrg, isot, ivegsrc, &
221 & bexppert, xlaipert, vegfpert,pertvegf, & ! sfc perts, mgehne
222 & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, &
223 & adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, rhonewsn1, &
224 & exticeden, &
225! --- in/outs:
226 & weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
227 & canopy, trans, tsurf, zorl, &
228! --- outputs:
229 & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
230 & cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, &
231 & smcwlt2, smcref2, wet1, lai, rca, errmsg, errflg &
232 & )
233!
234 !use machine , only : kind_phys
235 use funcphys, only : fpvs
236
237 use surface_perturbation, only : ppfbet
238
239 implicit none
240
241! --- constant parameters:
242 real(kind=kind_phys), parameter :: zero = 0.0_kind_phys
243 real(kind=kind_phys), parameter :: one = 1.0_kind_phys
244 real(kind=kind_phys), parameter :: rhoh2o = 1000.0_kind_phys
245 real(kind=kind_phys), parameter :: a2 = 17.2693882_kind_phys
246 real(kind=kind_phys), parameter :: a3 = 273.16_kind_phys
247 real(kind=kind_phys), parameter :: a4 = 35.86_kind_phys
248 real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4)
249 real(kind=kind_phys), parameter :: qmin = 1.0e-8_kind_phys
250
251 real(kind=kind_phys), save :: zsoil_noah(4)
252 data zsoil_noah / -0.1_kind_phys, -0.4_kind_phys, &
253 & -1.0_kind_phys, -2.0_kind_phys /
254
255! --- input:
256 integer, intent(in) :: im, km, isot, ivegsrc
257 real (kind=kind_phys), intent(in) :: grav, cp, hvap, rd, eps, &
258 & epsm1, rvrdm1
259 real (kind=kind_phys), intent(in) :: pertvegf
260
261 integer, dimension(:), intent(in) :: soiltyp, vegtype, slopetyp
262
263 real (kind=kind_phys), dimension(:), intent(in) :: ps, &
264 & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, tg3, cm, &
265 & ch, prsl1, prslki, wind, shdmin, shdmax, &
266 & snoalb, sfalb, zf, &
267 & bexppert, xlaipert, vegfpert, &
268 & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, &
269 & adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, rhonewsn1
270
271 real (kind=kind_phys), intent(in) :: delt
272
273 logical, dimension(:), intent(in) :: flag_iter, flag_guess, land
274
275 logical, intent(in) :: lheatstrg, exticeden
276
277! --- in/out:
278 real (kind=kind_phys), dimension(:), intent(inout) :: weasd, &
279 & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf, zorl
280
281 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
282 & smc, stc, slc
283
284! --- output:
285 real (kind=kind_phys), dimension(:), intent(inout) :: sncovr1, &
286 & qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, &
287 & evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2
288 real (kind=kind_phys), dimension(:), intent(inout) :: lai, rca
289 real (kind=kind_phys), dimension(:), intent(inout), optional :: &
290 & wet1
291
292 character(len=*), intent(out) :: errmsg
293 integer, intent(out) :: errflg
294
295! --- locals:
296 real (kind=kind_phys), dimension(im) :: rch, rho, &
297 & q0, qs1, theta1, weasd_old, snwdph_old, &
298 & tprcp_old, srflag_old, tskin_old, canopy_old
299
300 real (kind=kind_phys), dimension(km) :: et, sldpth, stsoil, &
301 & smsoil, slsoil
302
303 real (kind=kind_phys), dimension(im,km) :: zsoil, smc_old, &
304 & stc_old, slc_old
305
306 real (kind=kind_phys) :: alb, albedo, beta, chx, cmx, cmc, &
307 & dew, drip, dqsdt2, ec, edir, ett, eta, esnow, etp, &
308 & flx1, flx2, flx3, ffrozp, lwdn, pc, prcp, ptu, q2, &
309 & q2sat, solnet, rc, rcs, rct, rcq, rcsoil, rsmin, &
310 & runoff1, runoff2, runoff3, sfcspd, sfcprs, sfctmp, &
311 & sfcems, sheat, shdfac, shdmin1d, shdmax1d, smcwlt, &
312 & smcdry, smcref, smcmax, sneqv, snoalb1d, snowh, &
313 & snomlt, sncovr, soilw, soilm, ssoil, tsea, th2, tbot, &
314 & xlai, zlvl, swdn, tem, z0, bexpp, xlaip, vegfp, &
315 & mv, sv, alphav, betav, vegftmp, cpinv, hvapi, elocp, &
316 & rhonewsn
317 integer :: couple, ice, nsoil, nroot, slope, stype, vtype
318 integer :: i, k, iflag
319!
320!===> ... begin here
321!
322 cpinv = one/cp
323 hvapi = one/hvap
324 elocp = hvap/cp
325
327
328 errmsg = ''
329 errflg = 0
330
332 do i = 1, im
333 if (land(i) .and. flag_guess(i)) then
334 weasd_old(i) = weasd(i)
335 snwdph_old(i) = snwdph(i)
336 tskin_old(i) = tskin(i)
337 canopy_old(i) = canopy(i)
338 tprcp_old(i) = tprcp(i)
339 srflag_old(i) = srflag(i)
340 do k = 1, km
341 smc_old(i,k) = smc(i,k)
342 stc_old(i,k) = stc(i,k)
343 slc_old(i,k) = slc(i,k)
344 enddo
345 endif ! land & flag_guess
346 enddo
347
348! --- ... initialization block
349
350 do i = 1, im
351 if (flag_iter(i) .and. land(i)) then
352 ep(i) = zero
353 evap(i) = zero
354 hflx(i) = zero
355 gflux(i) = zero
356 drain(i) = zero
357 canopy(i) = max(canopy(i), zero)
358
359 evbs(i) = zero
360 evcw(i) = zero
361 trans(i) = zero
362 sbsno(i) = zero
363 snowc(i) = zero
364 snohf(i) = zero
366
367 q0(i) = max(q1(i), qmin) !* q1=specific humidity at level 1 (kg/kg)
368 theta1(i) = t1(i) * prslki(i) !* adiabatic temp at level 1 (k)
369
370 rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0(i)))
371 qs1(i) = fpvs( t1(i) ) !* qs1=sat. humidity at level 1 (kg/kg)
372 qs1(i) = max(eps*qs1(i) / (prsl1(i)+epsm1*qs1(i)), qmin)
373 q0(i) = min(qs1(i), q0(i))
374 do k = 1, km
375 zsoil(i,k) = zsoil_noah(k)
376 enddo
377
379! - 1. configuration information (c):
380! couple couple-uncouple flag (=1: coupled, =0: uncoupled)
381! ffrozp flag for snow-rain detection (1.=snow, 0.=rain)
382! ice sea-ice flag (=1: sea-ice, =0: land)
383! dt timestep (sec) (dt should not exceed 3600 secs) = delt
384! zlvl height (\f$m\f$) above ground of atmospheric forcing variables
385! nsoil number of soil layers (at least 2)
386! sldpth the thickness of each soil layer (\f$m\f$)
387
388 couple = 1 ! run noah lsm in 'couple' mode
389! use srflag directly to allow fractional rain/snow
390! if (srflag(i) == 1.0) then ! snow phase
391! ffrozp = 1.0
392! elseif (srflag(i) == 0.0) then ! rain phase
393! ffrozp = 0.0
394! endif
395 ffrozp = srflag(i)
396 ice = 0
397
398 zlvl = zf(i)
399
400 nsoil = km
401 sldpth(1) = - zsoil(i,1)
402 do k = 2, km
403 sldpth(k) = zsoil(i,k-1) - zsoil(i,k)
404 enddo
405
406! - 2. forcing data (f):
407! lwdn lw dw radiation flux (\f$W m^{-2}\f$)
408! solnet - net sw radiation flux (dn-up) (\f$W m^{-2}\f$)
409! sfcprs - pressure at height zlvl above ground (pascals)
410! prcp - precip rate (\f$kg m^{-2} s^{-1}\f$)
411! sfctmp - air temperature (\f$K\f$) at height zlvl above ground
412! th2 - air potential temperature (\f$K\f$) at height zlvl above ground
413! q2 - mixing ratio at height zlvl above ground (\f$kg kg^{-1}\f$)
414
415 lwdn = dlwflx(i) !..downward lw flux at sfc in w/m2
416 swdn = dswsfc(i) !..downward sw flux at sfc in w/m2
417!net sw rad flx (dn-up) at sfc in w/m2
418 solnet = adjvisbmd(i)*(1-albdvis_lnd(i)) &
419 & +adjnirbmd(i)*(1-albdnir_lnd(i)) &
420 & +adjvisdfd(i)*(1-albivis_lnd(i)) &
421 & +adjnirdfd(i)*(1-albinir_lnd(i))
422
423 sfcems = sfcemis(i)
424
425 sfcprs = prsl1(i)
426 prcp = rhoh2o * tprcp(i) / delt
427 sfctmp = t1(i)
428 th2 = theta1(i)
429 q2 = q0(i)
430
431! - 3. other forcing (input) data (i):
432! sfcspd - wind speed (\f$m s^{-1}\f$) at height zlvl above ground
433! q2sat - sat mixing ratio at height zlvl above ground (\f$kg kg^{-1}\f$)
434! dqsdt2 - slope of sat specific humidity curve at t=sfctmp (\f$kg kg^{-1} k^{-1}\f$)
435
436 sfcspd = wind(i)
437 q2sat = qs1(i)
438 dqsdt2 = q2sat * a23m4/(sfctmp-a4)**2
439
440! - 4. canopy/soil characteristics (s):
441! vegtyp - vegetation type (integer index) -> vtype
442! soiltyp - soil type (integer index) -> stype
443! slopetyp- class of sfc slope (integer index) -> slope
444! shdfac - areal fractional coverage of green vegetation (0.0-1.0)
445! shdmin - minimum areal fractional coverage of green vegetation -> shdmin1d
446! ptu - photo thermal unit (plant phenology for annuals/crops)
447! alb - backround snow-free surface albedo (fraction)
448! snoalb - upper bound on maximum albedo over deep snow -> snoalb1d
449! tbot - bottom soil temperature (local yearly-mean sfc air temp)
450
451 vtype = vegtype(i)
452 stype = soiltyp(i)
453 slope = slopetyp(i)
454 shdfac= sigmaf(i)
455
457! perturb vegetation fraction that goes into sflx, use the same
458! perturbation strategy as for albedo (percentile matching)
459!! Following Gehne et al. (2018) \cite gehne_et_al_2018, a perturbation of vegetation
460!! fraction is added to account for the uncertainty. A percentile matching technique
461!! is applied to guarantee the perturbed vegetation fraction is bounded between 0 and
462!! 1. The standard deviation of the perturbations is 0.25 for vegetation fraction of
463!! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper
464!! or lower bound.
465 vegfp = vegfpert(i) ! sfc-perts, mgehne
466 if (pertvegf>zero) then
467 ! compute beta distribution parameters for vegetation fraction
468 mv = shdfac
469 sv = pertvegf*mv*(one-mv)
470 alphav = mv*mv*(one-mv)/(sv*sv)-mv
471 betav = alphav*(one-mv)/mv
472 ! compute beta distribution value corresponding
473 ! to the given percentile albPpert to use as new albedo
474 call ppfbet(vegfp,alphav,betav,iflag,vegftmp)
475 shdfac = vegftmp
476 endif
477! *** sfc-perts, mgehne
478
479 shdmin1d = shdmin(i)
480 shdmax1d = shdmax(i)
481 snoalb1d = snoalb(i)
482
483 ptu = zero
484 alb = sfalb(i)
485 tbot = tg3(i)
486
487! - 5. history (state) variables (h):
488! cmc - canopy moisture content (\f$m\f$)
489! t1 - ground/canopy/snowpack effective skin temperature (\f$K\f$) -> tsea
490! stc(nsoil) - soil temp (\f$K\f$) -> stsoil
491! smc(nsoil) - total soil moisture content (volumetric fraction) -> smsoil
492! sh2o(nsoil)- unfrozen soil moisture content (volumetric fraction) -> slsoil
493! snowh - actual snow depth (\f$m\f$)
494! sneqv - liquid water-equivalent snow depth (\f$m\f$)
495! albedo - surface albedo including snow effect (unitless fraction)
496! ch - surface exchange coefficient for heat and moisture (\f$m s^{-1}\f$) -> chx
497! cm - surface exchange coefficient for momentum (\f$m s^{-1}\f$) -> cmx
498! z0 - surface roughness (\f$m\f$) -> zorl(\f$cm\f$)
499
500 cmc = canopy(i) * 0.001_kind_phys ! convert from mm to m
501 tsea = tsurf(i) ! clu_q2m_iter
502
503 do k = 1, km
504 stsoil(k) = stc(i,k)
505 smsoil(k) = smc(i,k)
506 slsoil(k) = slc(i,k)
507 enddo
508
509 snowh = snwdph(i) * 0.001_kind_phys ! convert from mm to m
510 sneqv = weasd(i) * 0.001_kind_phys ! convert from mm to m
511 if (sneqv /= zero .and. snowh == zero) then
512 snowh = 10.0_kind_phys * sneqv
513 endif
514
515 chx = ch(i) * wind(i) ! compute conductance
516 cmx = cm(i) * wind(i)
517 chh(i) = chx * rho(i)
518 cmm(i) = cmx
519
520! ---- ... outside sflx, roughness uses cm as unit
521 z0 = zorl(i) * 0.01_kind_phys
522! ---- mgehne, sfc-perts
524 bexpp = bexppert(i) ! sfc perts, mgehne
525 xlaip = xlaipert(i) ! sfc perts, mgehne
527 rhonewsn = rhonewsn1(i)
529
530 call gfssflx & ! ccppdox: these is sflx in mpbl
531! --- inputs:
532 & ( nsoil, couple, ice, ffrozp, delt, zlvl, sldpth, &
533 & swdn, solnet, lwdn, sfcems, sfcprs, sfctmp, &
534 & sfcspd, prcp, q2, q2sat, dqsdt2, th2, ivegsrc, &
535 & vtype, stype, slope, shdmin1d, alb, snoalb1d, &
536 & rhonewsn, exticeden, &
537 & bexpp, xlaip, & ! sfc-perts, mgehne
538 & lheatstrg, &
539! --- input/outputs:
540 & tbot, cmc, tsea, stsoil, smsoil, slsoil, sneqv, chx, cmx, &
541 & z0, &
542! --- outputs:
543 & nroot, shdfac, snowh, albedo, eta, sheat, ec, &
544 & edir, et, ett, esnow, drip, dew, beta, etp, ssoil, &
545 & flx1, flx2, flx3, runoff1, runoff2, runoff3, &
546 & snomlt, sncovr, rc, pc, rsmin, xlai, rcs, rct, rcq, &
547 & rcsoil, soilw, soilm, smcwlt, smcdry, smcref, smcmax, &
548 & errmsg, errflg )
549 if(errflg/=0) return
550
552! - 6. output (o):
553! eta - actual latent heat flux (\f$W m^{-2}\f$: positive, if upward from sfc)
554! sheat - sensible heat flux (\f$W m^{-2}\f$: positive, if upward from sfc)
555! beta - ratio of actual/potential evap (dimensionless)
556! etp - potential evaporation (\f$W m^{-2}\f$)
557! ssoil - soil heat flux (\f$W m^{-2}\f$: negative if downward from surface)
558! runoff1 - surface runoff (\f$m s^{-1}\f$), not infiltrating the surface
559! runoff2 - subsurface runoff (\f$m s^{-1}\f$), drainage out bottom
560! xlai - leaf area index (dimensionless)
561! rca - canopy resistance (s/m)
562
563 evap(i) = eta
564 hflx(i) = sheat
565 gflux(i) = ssoil
566
567 evbs(i) = edir
568 evcw(i) = ec
569 trans(i) = ett
570 sbsno(i) = esnow
571 snowc(i) = sncovr
572 stm(i) = soilm * 1000.0_kind_phys ! unit conversion (from m to kg m-2)
573 snohf(i) = flx1 + flx2 + flx3
574
575 smcwlt2(i) = smcwlt
576 smcref2(i) = smcref
577
578 ep(i) = etp
579 tsurf(i) = tsea
580
581 do k = 1, km
582 stc(i,k) = stsoil(k)
583 smc(i,k) = smsoil(k)
584 slc(i,k) = slsoil(k)
585 enddo
586 wet1(i) = smsoil(1) / smcmax !Sarah Lu added 09/09/2010 (for GOCART)
587
588! --- ... unit conversion (from m s-1 to mm s-1 and kg m-2 s-1)
589 runoff(i) = runoff1 * 1000.0_kind_phys
590 drain(i) = runoff2 * 1000.0_kind_phys
591
592! --- ... unit conversion (from m to mm)
593 canopy(i) = cmc * 1000.0_kind_phys
594 snwdph(i) = snowh * 1000.0_kind_phys
595 weasd(i) = sneqv * 1000.0_kind_phys
596 sncovr1(i) = sncovr
597! ---- ... outside sflx, roughness uses cm as unit (update after snow's effect)
598 zorl(i) = z0*100.0_kind_phys
599
600 lai(i) = xlai
601 rca(i) = rc
602
603! - Do not return the following output fields to parent model:
604! ec - canopy water evaporation (m s-1)
605! edir - direct soil evaporation (m s-1)
606! et(nsoil)-plant transpiration from a particular root layer (m s-1)
607! ett - total plant transpiration (m s-1)
608! esnow - sublimation from (or deposition to if <0) snowpack (m s-1)
609! drip - through-fall of precip and/or dew in excess of canopy
610! water-holding capacity (m)
611! dew - dewfall (or frostfall for t<273.15) (m)
612! beta - ratio of actual/potential evap (dimensionless)
613! flx1 - precip-snow sfc (w m-2)
614! flx2 - freezing rain latent heat flux (w m-2)
615! flx3 - phase-change heat flux from snowmelt (w m-2)
616! snomlt - snow melt (m) (water equivalent)
617! sncovr - fractional snow cover (unitless fraction, 0-1)
618! runoff3 - numerical trunctation in excess of porosity (smcmax)
619! for a given soil layer at the end of a time step
620! rc - canopy resistance (s m-1)
621! pc - plant coefficient (unitless fraction, 0-1) where pc*etp
622! = actual transp
623! rsmin - minimum canopy resistance (s m-1)
624! rcs - incoming solar rc factor (dimensionless)
625! rct - air temperature rc factor (dimensionless)
626! rcq - atmos vapor pressure deficit rc factor (dimensionless)
627! rcsoil - soil moisture rc factor (dimensionless)
628! soilw - available soil moisture in root zone (unitless fraction
629! between smcwlt and smcmax)
630! soilm - total soil column moisture content (frozen+unfrozen) (m)
631! smcwlt - wilting point (volumetric)
632! smcdry - dry soil moisture threshold where direct evap frm top
633! layer ends (volumetric)
634! smcref - soil moisture threshold where transpiration begins to
635! stress (volumetric)
636! smcmax - porosity, i.e. saturated value of soil moisture
637! (volumetric)
638! nroot - number of root layers, a function of veg type, determined
639! in subroutine redprm.
640
641! endif ! end if flag_iter and flag
642! enddo ! end do_i_loop
643
645
646 rch(i) = rho(i) * cp * ch(i) * wind(i)
647 qsurf(i) = q1(i) + evap(i) / (elocp * rch(i))
648
651 tem = one / rho(i)
652 hflx(i) = hflx(i) * tem * cpinv
653 evap(i) = evap(i) * tem * hvapi
654
655 endif ! flag_iter & land
656 enddo
657
659
660 do i = 1, im
661 if (land(i)) then
662 if (flag_guess(i)) then
663 weasd(i) = weasd_old(i)
664 snwdph(i) = snwdph_old(i)
665 tskin(i) = tskin_old(i)
666 canopy(i) = canopy_old(i)
667 tprcp(i) = tprcp_old(i)
668 srflag(i) = srflag_old(i)
669
670 do k = 1, km
671 smc(i,k) = smc_old(i,k)
672 stc(i,k) = stc_old(i,k)
673 slc(i,k) = slc_old(i,k)
674 enddo
675 else ! flag_guess = F
676 tskin(i) = tsurf(i)
677 endif ! flag_guess
678 endif ! land
679 enddo
680!
681!...................................
682 end subroutine lsm_noah_run
683!-----------------------------
685
686 end module lsm_noah
subroutine gfssflx(nsoil, couple, icein, ffrozp, dt, zlvl, sldpth, swdn, swnet, lwdn, sfcems, sfcprs, sfctmp, sfcspd, prcp, q2, q2sat, dqsdt2, th2, ivegsrc, vegtyp, soiltyp, slopetyp, shdmin, alb, snoalb, rhonewsn, exticeden, bexpp, xlaip, lheatstrg, tbot, cmc, t1, stc, smc, sh2o, sneqv, ch, cm, z0, nroot, shdfac, snowh, albedo, eta, sheat, ec, edir, et, ett, esnow, drip, dew, beta, etp, ssoil, flx1, flx2, flx3, runoff1, runoff2, runoff3, snomlt, sncovr, rc, pc, rsmin, xlai, rcs, rct, rcq, rcsoil, soilw, soilm, smcwlt, smcdry, smcref, smcmax, errmsg, errflg)
This is the entity of GFS Noah LSM model of physics subroutines. It is a soil/veg/snowpack land-surfa...
Definition sflx.f:131
subroutine, public lsm_noah_run(im, km, grav, cp, hvap, rd, eps, epsm1, rvrdm1, ps, t1, q1, soiltyp, vegtype, sigmaf, sfcemis, dlwflx, dswsfc, delt, tg3, cm, ch, prsl1, prslki, zf, land, wind, slopetyp, shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, lheatstrg, isot, ivegsrc, bexppert, xlaipert, vegfpert, pertvegf, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, rhonewsn1, exticeden, weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, canopy, trans, tsurf, zorl, sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2, wet1, lai, rca, errmsg, errflg)
Definition lsm_noah.f:233
subroutine, public set_soilveg(me, isot, ivet, nlunit, errmsg, errflg)
This subroutine initializes soil and vegetation.
Definition set_soilveg.f:17
subroutine albedo(parameters, vegtyp, ist, ice, nsoil, dt, cosz, fage, elai, esai, tg, tv, snowh, fsno, fwet, smc, sneqvo, sneqv, qsnow, fveg, iloc, jloc, albold, tauss, albgrd, albgri, albd, albi, fabd, fabi, ftdd, ftid, ftii, fsun, frevi, frevd, fregd, fregi, bgap, wgap, albsnd, albsni)
surface albedos. also fluxes (per unit incoming direct and diffuse radiation) reflected,...
subroutine, public ppfbet(pr, p, q, iflag, x)
This subroutine computes the beta distribution value that matches the percentile from the random patt...
This module contains the CCPP-compliant Noah land surface scheme driver.
Definition lsm_noah.f:5
This module contains namelist options for Noah LSM.
This module contains set_soilveg subroutine.
Definition set_soilveg.f:4
This module contains the entity of GFS Noah LSM Model(Version 2.7).
Definition sflx.f:5
This module contains routines used in the percentile matching algorithm for the albedo and vegetation...