CCPP SciDoc v7.0.0  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), optional :: &
289 & wet1, lai, rca
290
291 character(len=*), intent(out) :: errmsg
292 integer, intent(out) :: errflg
293
294! --- locals:
295 real (kind=kind_phys), dimension(im) :: rch, rho, &
296 & q0, qs1, theta1, weasd_old, snwdph_old, &
297 & tprcp_old, srflag_old, tskin_old, canopy_old
298
299 real (kind=kind_phys), dimension(km) :: et, sldpth, stsoil, &
300 & smsoil, slsoil
301
302 real (kind=kind_phys), dimension(im,km) :: zsoil, smc_old, &
303 & stc_old, slc_old
304
305 real (kind=kind_phys) :: alb, albedo, beta, chx, cmx, cmc, &
306 & dew, drip, dqsdt2, ec, edir, ett, eta, esnow, etp, &
307 & flx1, flx2, flx3, ffrozp, lwdn, pc, prcp, ptu, q2, &
308 & q2sat, solnet, rc, rcs, rct, rcq, rcsoil, rsmin, &
309 & runoff1, runoff2, runoff3, sfcspd, sfcprs, sfctmp, &
310 & sfcems, sheat, shdfac, shdmin1d, shdmax1d, smcwlt, &
311 & smcdry, smcref, smcmax, sneqv, snoalb1d, snowh, &
312 & snomlt, sncovr, soilw, soilm, ssoil, tsea, th2, tbot, &
313 & xlai, zlvl, swdn, tem, z0, bexpp, xlaip, vegfp, &
314 & mv, sv, alphav, betav, vegftmp, cpinv, hvapi, elocp, &
315 & rhonewsn
316 integer :: couple, ice, nsoil, nroot, slope, stype, vtype
317 integer :: i, k, iflag
318!
319!===> ... begin here
320!
321 cpinv = one/cp
322 hvapi = one/hvap
323 elocp = hvap/cp
324
326
327 errmsg = ''
328 errflg = 0
329
331 do i = 1, im
332 if (land(i) .and. flag_guess(i)) then
333 weasd_old(i) = weasd(i)
334 snwdph_old(i) = snwdph(i)
335 tskin_old(i) = tskin(i)
336 canopy_old(i) = canopy(i)
337 tprcp_old(i) = tprcp(i)
338 srflag_old(i) = srflag(i)
339 do k = 1, km
340 smc_old(i,k) = smc(i,k)
341 stc_old(i,k) = stc(i,k)
342 slc_old(i,k) = slc(i,k)
343 enddo
344 endif ! land & flag_guess
345 enddo
346
347! --- ... initialization block
348
349 do i = 1, im
350 if (flag_iter(i) .and. land(i)) then
351 ep(i) = zero
352 evap(i) = zero
353 hflx(i) = zero
354 gflux(i) = zero
355 drain(i) = zero
356 canopy(i) = max(canopy(i), zero)
357
358 evbs(i) = zero
359 evcw(i) = zero
360 trans(i) = zero
361 sbsno(i) = zero
362 snowc(i) = zero
363 snohf(i) = zero
365
366 q0(i) = max(q1(i), qmin) !* q1=specific humidity at level 1 (kg/kg)
367 theta1(i) = t1(i) * prslki(i) !* adiabatic temp at level 1 (k)
368
369 rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0(i)))
370 qs1(i) = fpvs( t1(i) ) !* qs1=sat. humidity at level 1 (kg/kg)
371 qs1(i) = max(eps*qs1(i) / (prsl1(i)+epsm1*qs1(i)), qmin)
372 q0(i) = min(qs1(i), q0(i))
373 do k = 1, km
374 zsoil(i,k) = zsoil_noah(k)
375 enddo
376
378! - 1. configuration information (c):
379! couple couple-uncouple flag (=1: coupled, =0: uncoupled)
380! ffrozp flag for snow-rain detection (1.=snow, 0.=rain)
381! ice sea-ice flag (=1: sea-ice, =0: land)
382! dt timestep (sec) (dt should not exceed 3600 secs) = delt
383! zlvl height (\f$m\f$) above ground of atmospheric forcing variables
384! nsoil number of soil layers (at least 2)
385! sldpth the thickness of each soil layer (\f$m\f$)
386
387 couple = 1 ! run noah lsm in 'couple' mode
388! use srflag directly to allow fractional rain/snow
389! if (srflag(i) == 1.0) then ! snow phase
390! ffrozp = 1.0
391! elseif (srflag(i) == 0.0) then ! rain phase
392! ffrozp = 0.0
393! endif
394 ffrozp = srflag(i)
395 ice = 0
396
397 zlvl = zf(i)
398
399 nsoil = km
400 sldpth(1) = - zsoil(i,1)
401 do k = 2, km
402 sldpth(k) = zsoil(i,k-1) - zsoil(i,k)
403 enddo
404
405! - 2. forcing data (f):
406! lwdn lw dw radiation flux (\f$W m^{-2}\f$)
407! solnet - net sw radiation flux (dn-up) (\f$W m^{-2}\f$)
408! sfcprs - pressure at height zlvl above ground (pascals)
409! prcp - precip rate (\f$kg m^{-2} s^{-1}\f$)
410! sfctmp - air temperature (\f$K\f$) at height zlvl above ground
411! th2 - air potential temperature (\f$K\f$) at height zlvl above ground
412! q2 - mixing ratio at height zlvl above ground (\f$kg kg^{-1}\f$)
413
414 lwdn = dlwflx(i) !..downward lw flux at sfc in w/m2
415 swdn = dswsfc(i) !..downward sw flux at sfc in w/m2
416!net sw rad flx (dn-up) at sfc in w/m2
417 solnet = adjvisbmd(i)*(1-albdvis_lnd(i)) &
418 & +adjnirbmd(i)*(1-albdnir_lnd(i)) &
419 & +adjvisdfd(i)*(1-albivis_lnd(i)) &
420 & +adjnirdfd(i)*(1-albinir_lnd(i))
421
422 sfcems = sfcemis(i)
423
424 sfcprs = prsl1(i)
425 prcp = rhoh2o * tprcp(i) / delt
426 sfctmp = t1(i)
427 th2 = theta1(i)
428 q2 = q0(i)
429
430! - 3. other forcing (input) data (i):
431! sfcspd - wind speed (\f$m s^{-1}\f$) at height zlvl above ground
432! q2sat - sat mixing ratio at height zlvl above ground (\f$kg kg^{-1}\f$)
433! dqsdt2 - slope of sat specific humidity curve at t=sfctmp (\f$kg kg^{-1} k^{-1}\f$)
434
435 sfcspd = wind(i)
436 q2sat = qs1(i)
437 dqsdt2 = q2sat * a23m4/(sfctmp-a4)**2
438
439! - 4. canopy/soil characteristics (s):
440! vegtyp - vegetation type (integer index) -> vtype
441! soiltyp - soil type (integer index) -> stype
442! slopetyp- class of sfc slope (integer index) -> slope
443! shdfac - areal fractional coverage of green vegetation (0.0-1.0)
444! shdmin - minimum areal fractional coverage of green vegetation -> shdmin1d
445! ptu - photo thermal unit (plant phenology for annuals/crops)
446! alb - backround snow-free surface albedo (fraction)
447! snoalb - upper bound on maximum albedo over deep snow -> snoalb1d
448! tbot - bottom soil temperature (local yearly-mean sfc air temp)
449
450 vtype = vegtype(i)
451 stype = soiltyp(i)
452 slope = slopetyp(i)
453 shdfac= sigmaf(i)
454
456! perturb vegetation fraction that goes into sflx, use the same
457! perturbation strategy as for albedo (percentile matching)
458!! Following Gehne et al. (2018) \cite gehne_et_al_2018, a perturbation of vegetation
459!! fraction is added to account for the uncertainty. A percentile matching technique
460!! is applied to guarantee the perturbed vegetation fraction is bounded between 0 and
461!! 1. The standard deviation of the perturbations is 0.25 for vegetation fraction of
462!! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper
463!! or lower bound.
464 vegfp = vegfpert(i) ! sfc-perts, mgehne
465 if (pertvegf>zero) then
466 ! compute beta distribution parameters for vegetation fraction
467 mv = shdfac
468 sv = pertvegf*mv*(one-mv)
469 alphav = mv*mv*(one-mv)/(sv*sv)-mv
470 betav = alphav*(one-mv)/mv
471 ! compute beta distribution value corresponding
472 ! to the given percentile albPpert to use as new albedo
473 call ppfbet(vegfp,alphav,betav,iflag,vegftmp)
474 shdfac = vegftmp
475 endif
476! *** sfc-perts, mgehne
477
478 shdmin1d = shdmin(i)
479 shdmax1d = shdmax(i)
480 snoalb1d = snoalb(i)
481
482 ptu = zero
483 alb = sfalb(i)
484 tbot = tg3(i)
485
486! - 5. history (state) variables (h):
487! cmc - canopy moisture content (\f$m\f$)
488! t1 - ground/canopy/snowpack effective skin temperature (\f$K\f$) -> tsea
489! stc(nsoil) - soil temp (\f$K\f$) -> stsoil
490! smc(nsoil) - total soil moisture content (volumetric fraction) -> smsoil
491! sh2o(nsoil)- unfrozen soil moisture content (volumetric fraction) -> slsoil
492! snowh - actual snow depth (\f$m\f$)
493! sneqv - liquid water-equivalent snow depth (\f$m\f$)
494! albedo - surface albedo including snow effect (unitless fraction)
495! ch - surface exchange coefficient for heat and moisture (\f$m s^{-1}\f$) -> chx
496! cm - surface exchange coefficient for momentum (\f$m s^{-1}\f$) -> cmx
497! z0 - surface roughness (\f$m\f$) -> zorl(\f$cm\f$)
498
499 cmc = canopy(i) * 0.001_kind_phys ! convert from mm to m
500 tsea = tsurf(i) ! clu_q2m_iter
501
502 do k = 1, km
503 stsoil(k) = stc(i,k)
504 smsoil(k) = smc(i,k)
505 slsoil(k) = slc(i,k)
506 enddo
507
508 snowh = snwdph(i) * 0.001_kind_phys ! convert from mm to m
509 sneqv = weasd(i) * 0.001_kind_phys ! convert from mm to m
510 if (sneqv /= zero .and. snowh == zero) then
511 snowh = 10.0_kind_phys * sneqv
512 endif
513
514 chx = ch(i) * wind(i) ! compute conductance
515 cmx = cm(i) * wind(i)
516 chh(i) = chx * rho(i)
517 cmm(i) = cmx
518
519! ---- ... outside sflx, roughness uses cm as unit
520 z0 = zorl(i) * 0.01_kind_phys
521! ---- mgehne, sfc-perts
523 bexpp = bexppert(i) ! sfc perts, mgehne
524 xlaip = xlaipert(i) ! sfc perts, mgehne
526 rhonewsn = rhonewsn1(i)
528
529 call gfssflx & ! ccppdox: these is sflx in mpbl
530! --- inputs:
531 & ( nsoil, couple, ice, ffrozp, delt, zlvl, sldpth, &
532 & swdn, solnet, lwdn, sfcems, sfcprs, sfctmp, &
533 & sfcspd, prcp, q2, q2sat, dqsdt2, th2, ivegsrc, &
534 & vtype, stype, slope, shdmin1d, alb, snoalb1d, &
535 & rhonewsn, exticeden, &
536 & bexpp, xlaip, & ! sfc-perts, mgehne
537 & lheatstrg, &
538! --- input/outputs:
539 & tbot, cmc, tsea, stsoil, smsoil, slsoil, sneqv, chx, cmx, &
540 & z0, &
541! --- outputs:
542 & nroot, shdfac, snowh, albedo, eta, sheat, ec, &
543 & edir, et, ett, esnow, drip, dew, beta, etp, ssoil, &
544 & flx1, flx2, flx3, runoff1, runoff2, runoff3, &
545 & snomlt, sncovr, rc, pc, rsmin, xlai, rcs, rct, rcq, &
546 & rcsoil, soilw, soilm, smcwlt, smcdry, smcref, smcmax, &
547 & errmsg, errflg )
548
550! - 6. output (o):
551! eta - actual latent heat flux (\f$W m^{-2}\f$: positive, if upward from sfc)
552! sheat - sensible heat flux (\f$W m^{-2}\f$: positive, if upward from sfc)
553! beta - ratio of actual/potential evap (dimensionless)
554! etp - potential evaporation (\f$W m^{-2}\f$)
555! ssoil - soil heat flux (\f$W m^{-2}\f$: negative if downward from surface)
556! runoff1 - surface runoff (\f$m s^{-1}\f$), not infiltrating the surface
557! runoff2 - subsurface runoff (\f$m s^{-1}\f$), drainage out bottom
558! xlai - leaf area index (dimensionless)
559! rca - canopy resistance (s/m)
560
561 evap(i) = eta
562 hflx(i) = sheat
563 gflux(i) = ssoil
564
565 evbs(i) = edir
566 evcw(i) = ec
567 trans(i) = ett
568 sbsno(i) = esnow
569 snowc(i) = sncovr
570 stm(i) = soilm * 1000.0_kind_phys ! unit conversion (from m to kg m-2)
571 snohf(i) = flx1 + flx2 + flx3
572
573 smcwlt2(i) = smcwlt
574 smcref2(i) = smcref
575
576 ep(i) = etp
577 tsurf(i) = tsea
578
579 do k = 1, km
580 stc(i,k) = stsoil(k)
581 smc(i,k) = smsoil(k)
582 slc(i,k) = slsoil(k)
583 enddo
584 wet1(i) = smsoil(1) / smcmax !Sarah Lu added 09/09/2010 (for GOCART)
585
586! --- ... unit conversion (from m s-1 to mm s-1 and kg m-2 s-1)
587 runoff(i) = runoff1 * 1000.0_kind_phys
588 drain(i) = runoff2 * 1000.0_kind_phys
589
590! --- ... unit conversion (from m to mm)
591 canopy(i) = cmc * 1000.0_kind_phys
592 snwdph(i) = snowh * 1000.0_kind_phys
593 weasd(i) = sneqv * 1000.0_kind_phys
594 sncovr1(i) = sncovr
595! ---- ... outside sflx, roughness uses cm as unit (update after snow's effect)
596 zorl(i) = z0*100.0_kind_phys
597
598 lai(i) = xlai
599 rca(i) = rc
600
601! - Do not return the following output fields to parent model:
602! ec - canopy water evaporation (m s-1)
603! edir - direct soil evaporation (m s-1)
604! et(nsoil)-plant transpiration from a particular root layer (m s-1)
605! ett - total plant transpiration (m s-1)
606! esnow - sublimation from (or deposition to if <0) snowpack (m s-1)
607! drip - through-fall of precip and/or dew in excess of canopy
608! water-holding capacity (m)
609! dew - dewfall (or frostfall for t<273.15) (m)
610! beta - ratio of actual/potential evap (dimensionless)
611! flx1 - precip-snow sfc (w m-2)
612! flx2 - freezing rain latent heat flux (w m-2)
613! flx3 - phase-change heat flux from snowmelt (w m-2)
614! snomlt - snow melt (m) (water equivalent)
615! sncovr - fractional snow cover (unitless fraction, 0-1)
616! runoff3 - numerical trunctation in excess of porosity (smcmax)
617! for a given soil layer at the end of a time step
618! rc - canopy resistance (s m-1)
619! pc - plant coefficient (unitless fraction, 0-1) where pc*etp
620! = actual transp
621! rsmin - minimum canopy resistance (s m-1)
622! rcs - incoming solar rc factor (dimensionless)
623! rct - air temperature rc factor (dimensionless)
624! rcq - atmos vapor pressure deficit rc factor (dimensionless)
625! rcsoil - soil moisture rc factor (dimensionless)
626! soilw - available soil moisture in root zone (unitless fraction
627! between smcwlt and smcmax)
628! soilm - total soil column moisture content (frozen+unfrozen) (m)
629! smcwlt - wilting point (volumetric)
630! smcdry - dry soil moisture threshold where direct evap frm top
631! layer ends (volumetric)
632! smcref - soil moisture threshold where transpiration begins to
633! stress (volumetric)
634! smcmax - porosity, i.e. saturated value of soil moisture
635! (volumetric)
636! nroot - number of root layers, a function of veg type, determined
637! in subroutine redprm.
638
639! endif ! end if flag_iter and flag
640! enddo ! end do_i_loop
641
643
644 rch(i) = rho(i) * cp * ch(i) * wind(i)
645 qsurf(i) = q1(i) + evap(i) / (elocp * rch(i))
646
649 tem = one / rho(i)
650 hflx(i) = hflx(i) * tem * cpinv
651 evap(i) = evap(i) * tem * hvapi
652
653 endif ! flag_iter & land
654 enddo
655
657
658 do i = 1, im
659 if (land(i)) then
660 if (flag_guess(i)) then
661 weasd(i) = weasd_old(i)
662 snwdph(i) = snwdph_old(i)
663 tskin(i) = tskin_old(i)
664 canopy(i) = canopy_old(i)
665 tprcp(i) = tprcp_old(i)
666 srflag(i) = srflag_old(i)
667
668 do k = 1, km
669 smc(i,k) = smc_old(i,k)
670 stc(i,k) = stc_old(i,k)
671 slc(i,k) = slc_old(i,k)
672 enddo
673 else ! flag_guess = F
674 tskin(i) = tsurf(i)
675 endif ! flag_guess
676 endif ! land
677 enddo
678!
679 return
680!...................................
681 end subroutine lsm_noah_run
682!-----------------------------
684
685 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...