130 ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp,soilcol,&
131 vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, &
132 prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp,&
133 shdmin, shdmax, snoalb, sfalb, flag_iter,con_g, &
134 idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, &
135 iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot,iopt_stc,&
136 iopt_trs,iopt_diag,xlatin, xcoszin, iyrlen, julian, garea, &
137 rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1,&
138 con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, &
139 con_fvirt, con_rd, con_hfus, thsfc_loc, cpllnd, cpllnd2atm,&
142 weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
143 canopy, trans, tsurf, zorl, &
144 rb1, fm1, fh1, ustar1, stress1, fm101, fh21, &
145 rmol1,flhc1,flqc1,do_mynnsfclay, &
149 snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy,&
150 chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy,&
151 waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, &
152 rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, &
153 xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, &
154 albdvis, albdnir, albivis, albinir,emiss, &
157 sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
158 cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,&
159 stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, &
160 ztmax, rca, errmsg, errflg, &
161 canopy_heat_storage_ccpp, &
163 sw_absorbed_total_ccpp, &
164 sw_reflected_total_ccpp, &
165 lw_absorbed_total_ccpp, &
166 temperature_bare_grd_ccpp, &
167 temperature_veg_grd_ccpp, &
168 temperature_veg_2m_ccpp, &
169 temperature_bare_2m_ccpp, &
170 spec_humidity_veg_2m_ccpp, &
171 spec_humidity_bare_2m_ccpp, &
172 sw_absorbed_veg_ccpp, &
173 sw_absorbed_ground_ccpp, &
175 snowmelt_shallow_ccpp, &
176 albedo_direct_snow_ccpp, &
177 albedo_diffuse_snow_ccpp, &
179 ch_bare_ground_ccpp, &
180 sensible_heat_grd_veg_ccpp, &
181 sensible_heat_leaf_ccpp, &
182 sensible_heat_grd_bar_ccpp, &
183 latent_heat_grd_veg_ccpp, &
184 latent_heat_grd_bare_ccpp, &
185 ground_heat_veg_ccpp, &
186 ground_heat_bare_ccpp, &
187 lw_absorbed_grd_veg_ccpp, &
188 lw_absorbed_leaf_ccpp, &
189 lw_absorbed_grd_bare_ccpp, &
190 latent_heat_trans_ccpp, &
191 latent_heat_leaf_ccpp, &
193 ch_below_canopy_ccpp, &
194 ch_vegetated_2m_ccpp, &
195 ch_bare_ground_2m_ccpp, &
196 precip_adv_heat_veg_ccpp, &
197 precip_adv_heat_grd_v_ccpp, &
198 precip_adv_heat_grd_b_ccpp, &
199 spec_humid_sfc_veg_ccpp, &
200 spec_humid_sfc_bare_ccpp &
203 use machine ,
only : kind_phys
204 use funcphys,
only : fpvs
206 use module_sf_noahmplsm,
only : gfs_stability
212 real(kind=kind_phys),
parameter :: a2 = 17.2693882
213 real(kind=kind_phys),
parameter :: a3 = 273.16
214 real(kind=kind_phys),
parameter :: a4 = 35.86
215 real(kind=kind_phys),
parameter :: a23m4 = a2*(a3-a4)
216 real(kind=kind_phys),
intent(in) :: con_g
218 real,
parameter :: undefined = 9.99e20_kind_phys
220 integer,
parameter :: nsoil = 4
221 integer,
parameter :: nsnow = 3
223 integer,
parameter :: iz0tlnd = 0
225 real(kind=kind_phys),
save :: zsoil(nsoil)
226 data zsoil / -0.1, -0.4, -1.0, -2.0 /
232 integer ,
intent(in) :: im
233 integer ,
intent(in) :: km
234 integer ,
intent(in) :: lsnowl
235 integer ,
intent(in) :: itime
236 real(kind=kind_phys),
dimension(:) ,
intent(in) :: ps
237 real(kind=kind_phys),
dimension(:) ,
intent(in) :: u1
238 real(kind=kind_phys),
dimension(:) ,
intent(in) :: v1
239 real(kind=kind_phys),
dimension(:) ,
intent(in) :: t1
240 real(kind=kind_phys),
dimension(:) ,
intent(in) :: q1
241 integer ,
dimension(:) ,
intent(in) :: soiltyp
242 integer ,
dimension(:) ,
intent(in) :: soilcol
243 integer ,
dimension(:) ,
intent(in) :: vegtype
244 real(kind=kind_phys),
dimension(:) ,
intent(in) :: sigmaf
245 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dlwflx
246 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dswsfc
247 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snet
248 real(kind=kind_phys) ,
intent(in) :: delt
249 real(kind=kind_phys),
dimension(:) ,
intent(in) :: tg3
250 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: cm
251 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ch
252 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsl1
253 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslk1
255 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslki
256 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsik1
258 real(kind=kind_phys),
dimension(:) ,
intent(in) :: zf
260 logical ,
intent(in) :: do_mynnsfclay
262 real(kind=kind_phys),
dimension(:) ,
intent(in) :: pblh
263 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rmol1
264 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flhc1
265 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flqc1
268 logical ,
dimension(:) ,
intent(in) :: dry
269 real(kind=kind_phys),
dimension(:) ,
intent(in) :: wind
270 integer ,
dimension(:) ,
intent(in) :: slopetyp
271 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmin
272 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmax
273 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snoalb
274 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: sfalb
275 logical ,
dimension(:) ,
intent(in) :: flag_iter
276 integer ,
intent(in) :: idveg
277 integer ,
intent(in) :: iopt_crs
278 integer ,
intent(in) :: iopt_btr
279 integer ,
intent(in) :: iopt_run
280 integer ,
intent(in) :: iopt_sfc
281 integer ,
intent(in) :: iopt_frz
282 integer ,
intent(in) :: iopt_inf
283 integer ,
intent(in) :: iopt_rad
284 integer ,
intent(in) :: iopt_alb
285 integer ,
intent(in) :: iopt_snf
286 integer ,
intent(in) :: iopt_tbot
287 integer ,
intent(in) :: iopt_stc
288 integer ,
intent(in) :: iopt_trs
289 integer ,
intent(in) :: iopt_diag
290 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xlatin
291 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xcoszin
292 integer ,
intent(in) :: iyrlen
293 real(kind=kind_phys) ,
intent(in) :: julian
294 real(kind=kind_phys),
dimension(:) ,
intent(in) :: garea
295 real(kind=kind_phys),
dimension(:) ,
intent(in),
optional :: rainn_mp
296 real(kind=kind_phys),
dimension(:) ,
intent(in),
optional :: rainc_mp
297 real(kind=kind_phys),
dimension(:) ,
intent(in),
optional :: snow_mp
298 real(kind=kind_phys),
dimension(:) ,
intent(in),
optional :: graupel_mp
299 real(kind=kind_phys),
dimension(:) ,
intent(in),
optional :: ice_mp
300 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rhonewsn1
301 real(kind=kind_phys) ,
intent(in) :: con_hvap
302 real(kind=kind_phys) ,
intent(in) :: con_cp
303 real(kind=kind_phys) ,
intent(in) :: con_jcal
304 real(kind=kind_phys) ,
intent(in) :: rhoh2o
305 real(kind=kind_phys) ,
intent(in) :: con_eps
306 real(kind=kind_phys) ,
intent(in) :: con_epsm1
307 real(kind=kind_phys) ,
intent(in) :: con_fvirt
308 real(kind=kind_phys) ,
intent(in) :: con_rd
309 real(kind=kind_phys) ,
intent(in) :: con_hfus
311 logical ,
intent(in) :: thsfc_loc
313 logical ,
intent(in) :: cpllnd
314 logical ,
intent(in) :: cpllnd2atm
316 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: weasd
317 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: snwdph
318 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tskin
319 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tprcp
320 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: srflag
321 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smc
322 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: stc
323 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: slc
324 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canopy
325 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: trans
326 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tsurf
327 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: zorl
329 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rb1
330 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm1
331 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh1
332 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ustar1
333 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stress1
334 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm101
335 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh21
337 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: snowxy
338 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: tvxy
339 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: tgxy
340 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: canicexy
341 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: canliqxy
342 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: eahxy
343 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: tahxy
344 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: cmxy
345 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: chxy
346 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: fwetxy
347 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: sneqvoxy
348 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: alboldxy
349 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: qsnowxy
350 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: wslakexy
351 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: zwtxy
352 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: waxy
353 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: wtxy
354 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout),
optional :: tsnoxy
355 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout),
optional :: zsnsoxy
356 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout),
optional :: snicexy
357 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout),
optional :: snliqxy
358 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: lfmassxy
359 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: rtmassxy
360 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: stmassxy
361 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: woodxy
362 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: stblcpxy
363 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: fastcpxy
364 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: xlaixy
365 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: xsaixy
366 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: taussxy
367 real(kind=kind_phys),
dimension(:,:) ,
intent(inout),
optional :: smoiseq
368 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: smcwtdxy
369 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: deeprechxy
370 real(kind=kind_phys),
dimension(:) ,
intent(inout),
optional :: rechxy
371 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdvis
372 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdnir
373 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albivis
374 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albinir
375 real(kind=kind_phys),
dimension(:) ,
intent(out) :: emiss
376 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sncovr1
377 real(kind=kind_phys),
dimension(:) ,
intent(out) :: qsurf
378 real(kind=kind_phys),
dimension(:) ,
intent(out) :: gflux
379 real(kind=kind_phys),
dimension(:) ,
intent(out) :: drain
380 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evap
381 real(kind=kind_phys),
dimension(:) ,
intent(out) :: hflx
382 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ep
383 real(kind=kind_phys),
dimension(:) ,
intent(out) :: runoff
384 real(kind=kind_phys),
dimension(:) ,
intent(out) :: cmm
385 real(kind=kind_phys),
dimension(:) ,
intent(out) :: chh
386 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evbs
387 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evcw
388 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sbsno
389 real(kind=kind_phys),
dimension(:) ,
intent(out) :: pah
390 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ecan
391 real(kind=kind_phys),
dimension(:) ,
intent(out) :: etran
392 real(kind=kind_phys),
dimension(:) ,
intent(out) :: edir
393 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snowc
394 real(kind=kind_phys),
dimension(:) ,
intent(out) :: stm
395 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snohf
396 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcwlt2
397 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcref2
398 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: wet1
399 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: t2mmp
400 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: q2mp
401 real(kind=kind_phys),
dimension(:) ,
intent(out) :: zvfun
402 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ztmax
403 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: rca
405 character(len=*) ,
intent(out) :: errmsg
406 integer ,
intent(out) :: errflg
408 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: canopy_heat_storage_ccpp
409 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: rainfall_ccpp
410 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_total_ccpp
411 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_reflected_total_ccpp
412 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_total_ccpp
413 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_grd_ccpp
414 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_grd_ccpp
415 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_2m_ccpp
416 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_2m_ccpp
417 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_veg_2m_ccpp
418 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_bare_2m_ccpp
419 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_veg_ccpp
420 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_ground_ccpp
421 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_out_ccpp
422 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_shallow_ccpp
423 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_direct_snow_ccpp
424 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_diffuse_snow_ccpp
425 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_ccpp
426 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_ccpp
427 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_veg_ccpp
428 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_leaf_ccpp
429 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_bar_ccpp
430 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_veg_ccpp
431 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_bare_ccpp
432 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_veg_ccpp
433 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_bare_ccpp
434 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_veg_ccpp
435 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_leaf_ccpp
436 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_bare_ccpp
437 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_trans_ccpp
438 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_leaf_ccpp
439 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_leaf_ccpp
440 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_below_canopy_ccpp
441 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_2m_ccpp
442 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_2m_ccpp
443 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_veg_ccpp
444 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_v_ccpp
445 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_b_ccpp
446 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_veg_ccpp
447 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_bare_ccpp
453 integer :: iopt_rsf = 4
454 integer :: iopt_soil = 1
455 integer :: iopt_pedo = 1
456 integer :: iopt_crop = 0
457 integer :: iopt_gla = 2
458 integer :: iopt_z0m = 1
464 integer :: i_location
465 integer :: j_location
466 real (kind=kind_phys) :: latitude
467 integer :: year_length
468 real (kind=kind_phys) :: julian_day
469 real (kind=kind_phys) :: cosine_zenith
470 real (kind=kind_phys) :: timestep
471 real (kind=kind_phys) :: spatial_scale
472 real (kind=kind_phys) :: atmosphere_thickness
473 integer :: soil_levels
474 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_interface_depth
475 integer :: max_snow_levels
476 real (kind=kind_phys) :: vegetation_frac
477 real (kind=kind_phys) :: area_grid
478 real (kind=kind_phys) :: max_vegetation_frac
479 integer :: vegetation_category
481 integer :: surface_type
483 real (kind=kind_phys),
dimension( 1:nsoil) :: eq_soil_water_vol
484 real (kind=kind_phys) :: temperature_forcing
485 real (kind=kind_phys) :: air_pressure_surface
486 real (kind=kind_phys) :: air_pressure_forcing
487 real (kind=kind_phys) :: uwind_forcing
488 real (kind=kind_phys) :: vwind_forcing
489 real (kind=kind_phys) :: spec_humidity_forcing
490 real (kind=kind_phys) :: cloud_water_forcing
491 real (kind=kind_phys) :: sw_radiation_forcing
492 real (kind=kind_phys) :: radiation_lw_forcing
493 real (kind=kind_phys) :: precipitation_forcing
494 real (kind=kind_phys) :: precip_convective
495 real (kind=kind_phys) :: precip_non_convective
496 real (kind=kind_phys) :: precip_sh_convective
497 real (kind=kind_phys) :: precip_snow
498 real (kind=kind_phys) :: precip_graupel
499 real (kind=kind_phys) :: precip_hail
500 real (kind=kind_phys) :: temperature_soil_bot
501 real (kind=kind_phys) :: co2_air
502 real (kind=kind_phys) :: o2_air
503 real (kind=kind_phys) :: foliage_nitrogen
504 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_ice_frac_old
505 real (kind=kind_phys) :: forcing_height
506 real (kind=kind_phys) :: snow_albedo_old
507 real (kind=kind_phys) :: snow_water_equiv_old
508 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: temperature_snow_soil
509 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_liquid_vol
510 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_moisture_vol
512 real (kind=kind_phys) :: surface_temperature
514 real (kind=kind_phys) :: temperature_canopy_air
515 real (kind=kind_phys) :: vapor_pres_canopy_air
516 real (kind=kind_phys) :: canopy_wet_fraction
517 real (kind=kind_phys) :: canopy_liquid
518 real (kind=kind_phys) :: canopy_ice
519 real (kind=kind_phys) :: temperature_leaf
520 real (kind=kind_phys) :: temperature_ground
521 real (kind=kind_phys) :: spec_humidity_surface
523 real (kind=kind_phys) :: rainfall
524 integer :: snow_levels
525 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: interface_depth
526 real (kind=kind_phys) :: snow_depth
527 real (kind=kind_phys) :: snow_water_equiv
528 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_ice
529 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_liquid
530 real (kind=kind_phys) :: depth_water_table
531 real (kind=kind_phys) :: aquifer_water
532 real (kind=kind_phys) :: saturated_water
533 real (kind=kind_phys) :: lake_water
534 real (kind=kind_phys) :: leaf_carbon
535 real (kind=kind_phys) :: root_carbon
536 real (kind=kind_phys) :: stem_carbon
537 real (kind=kind_phys) :: wood_carbon
538 real (kind=kind_phys) :: soil_carbon_stable
539 real (kind=kind_phys) :: soil_carbon_fast
540 real (kind=kind_phys) :: leaf_area_index
541 real (kind=kind_phys) :: stem_area_index
542 real (kind=kind_phys) :: cm_noahmp
543 real (kind=kind_phys) :: ch_noahmp
545 real (kind=kind_phys) :: grain_carbon
546 real (kind=kind_phys) :: growing_deg_days
547 integer :: plant_growth_stage
548 real (kind=kind_phys) :: soil_moisture_wtd
549 real (kind=kind_phys) :: deep_recharge
550 real (kind=kind_phys) :: recharge
551 real (kind=kind_phys) :: z0_total
552 real (kind=kind_phys) :: z0h_total
554 real (kind=kind_phys) :: sw_absorbed_total
555 real (kind=kind_phys) :: sw_reflected_total
556 real (kind=kind_phys) :: lw_absorbed_total
557 real (kind=kind_phys) :: sensible_heat_total
558 real (kind=kind_phys) :: ground_heat_total
559 real (kind=kind_phys) :: latent_heat_canopy
560 real (kind=kind_phys) :: latent_heat_ground
561 real (kind=kind_phys) :: transpiration_heat
562 real (kind=kind_phys) :: evaporation_canopy
563 real (kind=kind_phys) :: transpiration
564 real (kind=kind_phys) :: evaporation_soil
565 real (kind=kind_phys) :: temperature_radiative
566 real (kind=kind_phys) :: temperature_bare_grd
567 real (kind=kind_phys) :: temperature_veg_grd
568 real (kind=kind_phys) :: temperature_veg_2m
569 real (kind=kind_phys) :: temperature_bare_2m
570 real (kind=kind_phys) :: spec_humidity_veg_2m
571 real (kind=kind_phys) :: spec_humidity_bare_2m
572 real (kind=kind_phys) :: runoff_surface
573 real (kind=kind_phys) :: runoff_baseflow
574 real (kind=kind_phys) :: par_absorbed
575 real (kind=kind_phys) :: photosynthesis
576 real (kind=kind_phys) :: sw_absorbed_veg
577 real (kind=kind_phys) :: sw_absorbed_ground
578 real (kind=kind_phys) :: snow_cover_fraction
579 real (kind=kind_phys) :: net_eco_exchange
580 real (kind=kind_phys) :: global_prim_prod
581 real (kind=kind_phys) :: net_prim_prod
582 real (kind=kind_phys) :: vegetation_fraction
583 real (kind=kind_phys) :: albedo_total
584 real (kind=kind_phys) :: snowmelt_out
585 real (kind=kind_phys) :: snowmelt_shallow
586 real (kind=kind_phys) :: snowmelt_shallow_1
587 real (kind=kind_phys) :: snowmelt_shallow_2
588 real (kind=kind_phys) :: rs_sunlit
589 real (kind=kind_phys) :: rs_shaded
590 real (kind=kind_phys),
dimension(1:2) :: albedo_direct
591 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse
592 real (kind=kind_phys),
dimension(1:2) :: albedo_direct_snow
593 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse_snow
594 real (kind=kind_phys) :: canopy_gap_fraction
595 real (kind=kind_phys) :: incanopy_gap_fraction
596 real (kind=kind_phys) :: ch_vegetated
597 real (kind=kind_phys) :: ch_bare_ground
598 real (kind=kind_phys) :: emissivity_total
599 real (kind=kind_phys) :: sensible_heat_grd_veg
600 real (kind=kind_phys) :: sensible_heat_leaf
601 real (kind=kind_phys) :: sensible_heat_grd_bar
602 real (kind=kind_phys) :: latent_heat_grd_veg
603 real (kind=kind_phys) :: latent_heat_grd_bare
604 real (kind=kind_phys) :: ground_heat_veg
605 real (kind=kind_phys) :: ground_heat_bare
606 real (kind=kind_phys) :: lw_absorbed_grd_veg
607 real (kind=kind_phys) :: lw_absorbed_leaf
608 real (kind=kind_phys) :: lw_absorbed_grd_bare
609 real (kind=kind_phys) :: latent_heat_trans
610 real (kind=kind_phys) :: latent_heat_leaf
611 real (kind=kind_phys) :: ch_leaf
612 real (kind=kind_phys) :: ch_below_canopy
613 real (kind=kind_phys) :: ch_vegetated_2m
614 real (kind=kind_phys) :: ch_bare_ground_2m
615 real (kind=kind_phys) :: precip_frozen_frac
616 real (kind=kind_phys) :: precip_adv_heat_veg
617 real (kind=kind_phys) :: precip_adv_heat_grd_v
618 real (kind=kind_phys) :: precip_adv_heat_grd_b
619 real (kind=kind_phys) :: precip_adv_heat_total
620 real (kind=kind_phys) :: snow_sublimation
621 real (kind=kind_phys) :: lai_sunlit
622 real (kind=kind_phys) :: lai_shaded
623 real (kind=kind_phys) :: leaf_air_resistance
625 real (kind=kind_phys) :: canopy_heat_storage
626 real (kind=kind_phys) :: spec_humid_sfc_veg
627 real (kind=kind_phys) :: spec_humid_sfc_bare
629 real (kind=kind_phys) :: ustarx
630 real (kind=kind_phys) :: prslkix
631 real (kind=kind_phys) :: prsik1x
632 real (kind=kind_phys) :: prslk1x
634 real (kind=kind_phys) :: ch2
635 real (kind=kind_phys) :: cq2
636 real (kind=kind_phys) :: qfx
637 real (kind=kind_phys) :: wspd1
638 real (kind=kind_phys) :: pblhx
641 real (kind=kind_phys) :: rah_total
642 real (kind=kind_phys) :: cah_total
649 integer :: soil_category(nsoil)
650 integer :: slope_category
651 integer :: soil_color_category
652 character(len=256) :: dataset_identifier
654 real (kind=kind_phys) :: spec_humidity_sat
655 real (kind=kind_phys) :: vapor_pressure_sat
656 real (kind=kind_phys) :: latent_heat_total
657 real (kind=kind_phys) :: density
658 real (kind=kind_phys) :: virtual_temperature
659 real (kind=kind_phys) :: potential_evaporation
660 real (kind=kind_phys) :: potential_temperature
661 real (kind=kind_phys) :: penman_radiation
662 real (kind=kind_phys) :: dqsdt
663 real (kind=kind_phys) :: precip_freeze_frac_in
665 real (kind=kind_phys) :: virtfac1
666 real (kind=kind_phys) :: tvs1
667 real (kind=kind_phys) :: vptemp
669 real(kind=kind_phys) :: tem1,tem2,gdx
670 real(kind=kind_phys),
parameter :: z0lo=0.1, z0up=1.0
672 logical :: is_snowing
673 logical :: is_freeze_rain
695 if (cpllnd .and. cpllnd2atm)
return
699 if (flag_iter(i) .and. dry(i))
then
705 if(vegtype(i) == isice_table )
then
706 if(weasd(i) < 0.1)
then
715 dataset_identifier =
"modified_igbp_modis_noah"
722 cosine_zenith = xcoszin(i)
724 spatial_scale = -9999.0
725 atmosphere_thickness = -9999.0
727 soil_interface_depth = zsoil
728 max_snow_levels = nsnow
729 vegetation_frac = sigmaf(i)
730 max_vegetation_frac = shdmax(i)
731 vegetation_category = vegtype(i)
734 eq_soil_water_vol = smoiseq(i,:)
735 temperature_forcing = t1(i)
736 air_pressure_surface = ps(i)
737 air_pressure_forcing = prsl1(i)
738 uwind_forcing = u1(i)
739 vwind_forcing = v1(i)
748 spec_humidity_forcing = max(q1(i), 1.e-8)
749 virtual_temperature = temperature_forcing * &
750 (1.0 + con_fvirt * spec_humidity_forcing)
751 vapor_pressure_sat = fpvs( temperature_forcing )
752 spec_humidity_sat = con_eps*vapor_pressure_sat / &
753 (prsl1(i) + con_epsm1*vapor_pressure_sat)
754 spec_humidity_sat = max(spec_humidity_sat, 1.e-8)
755 spec_humidity_forcing = min(spec_humidity_sat,spec_humidity_forcing)
757 cloud_water_forcing = -9999.0
758 sw_radiation_forcing = dswsfc(i)
759 radiation_lw_forcing = dlwflx(i)
760 precipitation_forcing = 1000.0 * tprcp(i) / delt
761 precip_convective = rainc_mp(i)
762 precip_non_convective = rainn_mp(i)
763 precip_sh_convective = 0.
764 precip_snow = snow_mp(i)
765 precip_graupel = graupel_mp(i)
766 precip_hail = ice_mp(i)
767 temperature_soil_bot = tg3(i)
768 co2_air = co2_table * air_pressure_forcing
769 o2_air = o2_table * air_pressure_forcing
770 foliage_nitrogen = 1.0
776 forcing_height = zf(i)
777 snow_albedo_old = alboldxy(i)
778 snow_water_equiv_old = sneqvoxy(i)
779 temperature_snow_soil(-2: 0) = tsnoxy(i,:)
780 temperature_snow_soil( 1:km) = stc(i,:)
781 soil_liquid_vol = slc(i,:)
782 soil_moisture_vol = smc(i,:)
783 temperature_canopy_air = tahxy(i)
784 vapor_pres_canopy_air = eahxy(i)
785 canopy_wet_fraction = fwetxy(i)
786 canopy_liquid = canliqxy(i)
787 canopy_ice = canicexy(i)
788 temperature_leaf = tvxy(i)
789 temperature_ground = tgxy(i)
790 spec_humidity_surface = undefined
793 snow_levels = nint(snowxy(i))
794 interface_depth = zsnsoxy(i,:)
795 snow_depth = snwdph(i) * 0.001
796 snow_water_equiv = weasd(i)
797 if (snow_water_equiv /= 0.0 .and. snow_depth == 0.0)
then
798 snow_depth = 10.0 * snow_water_equiv /1000.0
800 snow_level_ice = snicexy(i,:)
801 snow_level_liquid = snliqxy(i,:)
802 depth_water_table = zwtxy(i)
803 aquifer_water = waxy(i)
804 saturated_water = wtxy(i)
805 lake_water = wslakexy(i)
806 leaf_carbon = lfmassxy(i)
807 root_carbon = rtmassxy(i)
808 stem_carbon = stmassxy(i)
809 wood_carbon = woodxy(i)
810 soil_carbon_stable = stblcpxy(i)
811 soil_carbon_fast = fastcpxy(i)
812 leaf_area_index = xlaixy(i)
813 stem_area_index = xsaixy(i)
820 soil_moisture_wtd = smcwtdxy(i)
821 deep_recharge = deeprechxy(i)
826 snow_ice_frac_old = 0.0
827 do k = snow_levels+1, 0
828 if(snow_level_ice(k) > 0.0 ) &
829 snow_ice_frac_old(k) = snow_level_ice(k) /(snow_level_ice(k)+snow_level_liquid(k))
833 if (snow_depth .gt. 0.1 .or. vegetation_category == isice_table )
then
842 density = air_pressure_forcing / (con_rd * virtual_temperature)
843 chh(i) = ch(i) * wind(i) * density
844 cmm(i) = cm(i) * wind(i)
849 soil_category = soiltyp(i)
850 slope_category = slopetyp(i)
851 soil_color_category = soilcol(i)
856 slope_category, soil_color_category, crop_type,parameters)
857 parameters%prcpiceden = rhonewsn1(i)
858 call noahmp_options(idveg ,iopt_crs, iopt_btr , iopt_run, iopt_sfc, &
859 iopt_frz, iopt_inf , iopt_rad, iopt_alb, &
860 iopt_snf, iopt_tbot, iopt_stc, iopt_rsf, &
861 iopt_soil,iopt_pedo, iopt_crop,iopt_trs, &
864 if ( vegetation_category == isice_table )
then
866 if (precipitation_forcing > 0.0)
then
867 if (srflag(i) > 0.0)
then
868 snowfall = srflag(i) * precipitation_forcing
873 temperature_soil_bot = min(temperature_soil_bot,263.15)
875 call noahmp_options_glacier(iopt_alb, iopt_snf, iopt_tbot, iopt_stc, iopt_gla, &
877 vegetation_frac = 0.0
878 call noahmp_glacier ( &
879 i_location ,1 ,cosine_zenith ,nsnow , &
881 temperature_forcing ,air_pressure_forcing ,uwind_forcing ,vwind_forcing , &
882 spec_humidity_forcing,sw_radiation_forcing ,precipitation_forcing,radiation_lw_forcing , &
883 temperature_soil_bot ,forcing_height ,snow_ice_frac_old ,zsoil , &
884 thsfc_loc ,prslkix ,prsik1x ,prslk1x , &
885 air_pressure_surface ,pblhx ,iz0tlnd ,itime , &
886 vegetation_frac ,area_grid ,psi_opt , &
887 con_fvirt ,con_eps ,con_epsm1 ,con_cp , &
888 snowfall ,snow_water_equiv_old ,snow_albedo_old , &
889 cm_noahmp ,ch_noahmp ,snow_levels ,snow_water_equiv , &
890 soil_moisture_vol ,interface_depth ,snow_depth ,snow_level_ice , &
891 snow_level_liquid ,temperature_ground ,temperature_snow_soil,soil_liquid_vol , &
892 snow_age ,spec_humidity_surface,sw_absorbed_total ,sw_reflected_total , &
893 lw_absorbed_total ,sensible_heat_total ,latent_heat_ground ,ground_heat_total , &
894 temperature_radiative,evaporation_soil ,runoff_surface ,runoff_baseflow , &
895 sw_absorbed_ground ,albedo_total ,snowmelt_out ,snowmelt_shallow , &
896 snowmelt_shallow_1 ,snowmelt_shallow_2 ,temperature_bare_2m ,spec_humidity_bare_2m, &
898 emissivity_total ,precip_frozen_frac ,ch_bare_ground_2m ,snow_sublimation , &
900 albedo_direct ,albedo_diffuse, errmsg ,errflg )
902 albedo_direct ,albedo_diffuse)
906 if (errflg /= 0)
return
913 snow_cover_fraction = 1.0
914 temperature_leaf = undefined
915 canopy_ice = undefined
916 canopy_liquid = undefined
917 vapor_pres_canopy_air = undefined
918 temperature_canopy_air = undefined
919 canopy_wet_fraction = undefined
920 lake_water = undefined
921 depth_water_table = undefined
922 aquifer_water = undefined
923 saturated_water = undefined
924 leaf_carbon = undefined
925 root_carbon = undefined
926 stem_carbon = undefined
927 wood_carbon = undefined
928 soil_carbon_stable = undefined
929 soil_carbon_fast = undefined
930 leaf_area_index = undefined
931 stem_area_index = undefined
932 evaporation_canopy = undefined
933 transpiration = undefined
934 aquifer_water = undefined
935 precip_adv_heat_total = undefined
936 soil_moisture_wtd = 0.0
939 eq_soil_water_vol = soil_moisture_vol
940 transpiration_heat = undefined
941 latent_heat_canopy = undefined
943 latent_heat_total = latent_heat_ground
944 t2mmp(i) = temperature_bare_2m
945 q2mp(i) = spec_humidity_bare_2m
947 tskin(i) = temperature_ground
948 surface_temperature = temperature_ground
949 vegetation_fraction = vegetation_frac
951 ch_bare_ground = ch_noahmp
952 canopy_heat_storage = 0.0
963 i_location ,j_location ,latitude , &
964 year_length ,julian_day ,cosine_zenith , &
965 timestep ,spatial_scale ,atmosphere_thickness , &
966 soil_levels ,soil_interface_depth ,max_snow_levels , &
967 vegetation_frac ,max_vegetation_frac ,vegetation_category , &
968 ice_flag ,surface_type ,crop_type , &
969 eq_soil_water_vol ,temperature_forcing ,air_pressure_forcing , &
970 air_pressure_surface ,uwind_forcing ,vwind_forcing , &
971 spec_humidity_forcing ,area_grid ,cloud_water_forcing , &
972 sw_radiation_forcing ,radiation_lw_forcing ,thsfc_loc , &
973 prslkix ,prsik1x ,prslk1x , &
974 pblhx ,iz0tlnd ,itime , &
976 precip_convective , &
977 precip_non_convective ,precip_sh_convective ,precip_snow , &
978 precip_graupel ,precip_hail ,temperature_soil_bot , &
979 co2_air ,o2_air ,foliage_nitrogen , &
980 snow_ice_frac_old ,forcing_height , &
981 con_fvirt ,con_eps, con_epsm1 ,con_cp , &
982 snow_albedo_old ,snow_water_equiv_old , &
983 temperature_snow_soil ,soil_liquid_vol ,soil_moisture_vol , &
984 temperature_canopy_air,vapor_pres_canopy_air ,canopy_wet_fraction , &
985 canopy_liquid ,canopy_ice ,temperature_leaf , &
986 temperature_ground ,spec_humidity_surface ,
snowfall , &
987 rainfall ,snow_levels ,interface_depth , &
988 snow_depth ,snow_water_equiv ,snow_level_ice , &
989 snow_level_liquid ,depth_water_table ,aquifer_water , &
991 lake_water ,leaf_carbon ,root_carbon , &
992 stem_carbon ,wood_carbon ,soil_carbon_stable , &
993 soil_carbon_fast ,leaf_area_index ,stem_area_index , &
995 grain_carbon ,growing_deg_days ,plant_growth_stage , &
996 soil_moisture_wtd ,deep_recharge ,recharge,ustarx , &
997 z0_total ,z0h_total ,surface_temperature , &
998 sw_absorbed_total ,sw_reflected_total , &
999 lw_absorbed_total ,sensible_heat_total ,ground_heat_total , &
1000 latent_heat_canopy ,latent_heat_ground ,transpiration_heat , &
1001 evaporation_canopy ,transpiration ,evaporation_soil , &
1002 temperature_radiative ,temperature_bare_grd ,temperature_veg_grd , &
1003 temperature_veg_2m ,temperature_bare_2m ,spec_humidity_veg_2m , &
1004 spec_humidity_bare_2m ,runoff_surface ,runoff_baseflow , &
1005 par_absorbed ,photosynthesis ,sw_absorbed_veg , &
1006 sw_absorbed_ground ,snow_cover_fraction ,net_eco_exchange , &
1007 global_prim_prod ,net_prim_prod ,vegetation_fraction , &
1008 albedo_total ,snowmelt_out ,snowmelt_shallow , &
1009 snowmelt_shallow_1 ,snowmelt_shallow_2 ,rs_sunlit , &
1010 rs_shaded ,albedo_direct ,albedo_diffuse , &
1011 albedo_direct_snow ,albedo_diffuse_snow , &
1012 canopy_gap_fraction , &
1013 incanopy_gap_fraction ,ch_vegetated ,ch_bare_ground , &
1014 emissivity_total ,sensible_heat_grd_veg ,sensible_heat_leaf , &
1015 sensible_heat_grd_bar ,latent_heat_grd_veg ,latent_heat_grd_bare , &
1016 ground_heat_veg ,ground_heat_bare ,lw_absorbed_grd_veg , &
1017 lw_absorbed_leaf ,lw_absorbed_grd_bare ,latent_heat_trans , &
1018 latent_heat_leaf ,ch_leaf ,ch_below_canopy , &
1019 ch_vegetated_2m ,ch_bare_ground_2m ,precip_frozen_frac , &
1020 precip_adv_heat_veg ,precip_adv_heat_grd_v ,precip_adv_heat_grd_b , &
1021 precip_adv_heat_total ,snow_sublimation ,canopy_heat_storage , &
1022 lai_sunlit ,lai_shaded ,leaf_air_resistance , &
1024 spec_humid_sfc_veg ,spec_humid_sfc_bare , &
1027 spec_humid_sfc_veg ,spec_humid_sfc_bare )
1031 if (errflg /= 0)
return
1034 latent_heat_total = latent_heat_canopy + latent_heat_ground + transpiration_heat
1036 t2mmp(i) = temperature_veg_2m * vegetation_fraction + &
1037 temperature_bare_2m * (1-vegetation_fraction)
1038 q2mp(i) = spec_humidity_veg_2m * vegetation_fraction + &
1039 spec_humidity_bare_2m * (1-vegetation_fraction)
1041 tskin(i) = surface_temperature
1049 tsnoxy(i,:) = temperature_snow_soil(-2: 0)
1050 stc(i,:) = temperature_snow_soil( 1:km)
1051 hflx(i) = sensible_heat_total
1052 evap(i) = latent_heat_total
1053 evbs(i) = latent_heat_ground
1054 evcw(i) = latent_heat_canopy
1055 trans(i) = transpiration_heat
1056 gflux(i) = -1.0*ground_heat_total
1057 snohf(i) = snowmelt_out * con_hfus
1058 sbsno(i) = snow_sublimation
1059 pah(i) = precip_adv_heat_total
1063 zorl(i) = z0_total * 100.0
1064 ztmax(i) = z0h_total
1067 if(rs_sunlit .le. 0.0 .or. rs_shaded .le. 0.0 .or. &
1068 lai_sunlit .eq. 0.0 .or. lai_shaded .eq. 0.0)
then
1069 rca(i) = parameters%rsmax
1071 rca(i) = ((1.0/(rs_sunlit+leaf_air_resistance)*lai_sunlit) + &
1072 ((1.0/(rs_shaded+leaf_air_resistance))*lai_shaded))
1073 rca(i) = max((1.0/rca(i)),parameters%rsmin)
1076 smc(i,:) = soil_moisture_vol
1077 slc(i,:) = soil_liquid_vol
1078 snowxy(i) = float(snow_levels)
1079 weasd(i) = snow_water_equiv
1080 snicexy(i,:) = snow_level_ice
1081 snliqxy(i,:) = snow_level_liquid
1082 snwdph(i) = snow_depth * 1000.0
1083 canopy(i) = canopy_ice + canopy_liquid
1084 canliqxy(i) = canopy_liquid
1085 canicexy(i) = canopy_ice
1086 zwtxy(i) = depth_water_table
1087 waxy(i) = aquifer_water
1088 wtxy(i) = saturated_water
1090 ecan(i) = evaporation_canopy
1091 etran(i) = transpiration
1092 edir(i) = evaporation_soil
1093 drain(i) = runoff_baseflow
1094 runoff(i) = runoff_surface
1096 lfmassxy(i) = leaf_carbon
1097 rtmassxy(i) = root_carbon
1098 stmassxy(i) = stem_carbon
1099 woodxy(i) = wood_carbon
1100 stblcpxy(i) = soil_carbon_stable
1101 fastcpxy(i) = soil_carbon_fast
1102 xlaixy(i) = leaf_area_index
1103 xsaixy(i) = stem_area_index
1105 snowc(i) = snow_cover_fraction
1106 sncovr1(i) = snow_cover_fraction
1108 qsurf(i) = spec_humidity_surface
1111 tvxy(i) = temperature_leaf
1112 tgxy(i) = temperature_ground
1113 tahxy(i) = temperature_canopy_air
1114 eahxy(i) = vapor_pres_canopy_air
1115 emiss(i) = emissivity_total
1117 if(albedo_total > 0.0)
then
1118 sfalb(i) = albedo_total
1119 albdvis(i) = albedo_direct(1)
1120 albdnir(i) = albedo_direct(2)
1121 albivis(i) = albedo_diffuse(1)
1122 albinir(i) = albedo_diffuse(2)
1125 zsnsoxy(i,:) = interface_depth
1127 if(
present(canopy_heat_storage_ccpp )) canopy_heat_storage_ccpp(i) = canopy_heat_storage
1128 if(
present(rainfall_ccpp )) rainfall_ccpp(i) = rainfall
1129 if(
present(sw_absorbed_total_ccpp )) sw_absorbed_total_ccpp(i) = sw_absorbed_total
1130 if(
present(sw_reflected_total_ccpp )) sw_reflected_total_ccpp(i) = sw_reflected_total
1131 if(
present(lw_absorbed_total_ccpp )) lw_absorbed_total_ccpp(i) = lw_absorbed_total
1132 if(
present(temperature_bare_grd_ccpp )) temperature_bare_grd_ccpp(i) = temperature_bare_grd
1133 if(
present(temperature_veg_grd_ccpp )) temperature_veg_grd_ccpp(i) = temperature_veg_grd
1134 if(
present(temperature_veg_2m_ccpp )) temperature_veg_2m_ccpp(i) = temperature_veg_2m
1135 if(
present(temperature_bare_2m_ccpp )) temperature_bare_2m_ccpp(i) = temperature_bare_2m
1136 if(
present(spec_humidity_veg_2m_ccpp )) spec_humidity_veg_2m_ccpp(i) = spec_humidity_veg_2m
1137 if(
present(spec_humidity_bare_2m_ccpp)) spec_humidity_bare_2m_ccpp(i) = spec_humidity_bare_2m
1138 if(
present(sw_absorbed_veg_ccpp )) sw_absorbed_veg_ccpp(i) = sw_absorbed_veg
1139 if(
present(sw_absorbed_ground_ccpp )) sw_absorbed_ground_ccpp(i) = sw_absorbed_ground
1140 if(
present(snowmelt_out_ccpp )) snowmelt_out_ccpp(i) = snowmelt_out
1141 if(
present(snowmelt_shallow_ccpp )) snowmelt_shallow_ccpp(i) = snowmelt_shallow
1142 if(
present(albedo_direct_snow_ccpp )) albedo_direct_snow_ccpp(i,:) = albedo_direct_snow
1143 if(
present(albedo_diffuse_snow_ccpp )) albedo_diffuse_snow_ccpp(i,:) = albedo_diffuse_snow
1144 if(
present(ch_vegetated_ccpp )) ch_vegetated_ccpp(i) = ch_vegetated
1145 if(
present(ch_bare_ground_ccpp )) ch_bare_ground_ccpp(i) = ch_bare_ground
1146 if(
present(sensible_heat_grd_veg_ccpp)) sensible_heat_grd_veg_ccpp(i) = sensible_heat_grd_veg
1147 if(
present(sensible_heat_leaf_ccpp )) sensible_heat_leaf_ccpp(i) = sensible_heat_leaf
1148 if(
present(sensible_heat_grd_bar_ccpp)) sensible_heat_grd_bar_ccpp(i) = sensible_heat_grd_bar
1149 if(
present(latent_heat_grd_veg_ccpp )) latent_heat_grd_veg_ccpp(i) = latent_heat_grd_veg
1150 if(
present(latent_heat_grd_bare_ccpp )) latent_heat_grd_bare_ccpp(i) = latent_heat_grd_bare
1151 if(
present(ground_heat_veg_ccpp )) ground_heat_veg_ccpp(i) = ground_heat_veg
1152 if(
present(ground_heat_bare_ccpp )) ground_heat_bare_ccpp(i) = ground_heat_bare
1153 if(
present(lw_absorbed_grd_veg_ccpp )) lw_absorbed_grd_veg_ccpp(i) = lw_absorbed_grd_veg
1154 if(
present(lw_absorbed_leaf_ccpp )) lw_absorbed_leaf_ccpp(i) = lw_absorbed_leaf
1155 if(
present(lw_absorbed_grd_bare_ccpp )) lw_absorbed_grd_bare_ccpp(i) = lw_absorbed_grd_bare
1156 if(
present(latent_heat_trans_ccpp )) latent_heat_trans_ccpp(i) = latent_heat_trans
1157 if(
present(latent_heat_leaf_ccpp )) latent_heat_leaf_ccpp(i) = latent_heat_leaf
1158 if(
present(ch_leaf_ccpp )) ch_leaf_ccpp(i) = ch_leaf
1159 if(
present(ch_below_canopy_ccpp )) ch_below_canopy_ccpp(i) = ch_below_canopy
1160 if(
present(ch_vegetated_2m_ccpp )) ch_vegetated_2m_ccpp(i) = ch_vegetated_2m
1161 if(
present(ch_bare_ground_2m_ccpp )) ch_bare_ground_2m_ccpp(i) = ch_bare_ground_2m
1162 if(
present(precip_adv_heat_veg_ccpp )) precip_adv_heat_veg_ccpp(i) = precip_adv_heat_veg
1163 if(
present(precip_adv_heat_grd_v_ccpp)) precip_adv_heat_grd_v_ccpp(i) = precip_adv_heat_grd_v
1164 if(
present(precip_adv_heat_grd_b_ccpp)) precip_adv_heat_grd_b_ccpp(i) = precip_adv_heat_grd_b
1165 if(
present(spec_humid_sfc_veg_ccpp )) spec_humid_sfc_veg_ccpp(i) = spec_humid_sfc_veg
1166 if(
present(spec_humid_sfc_bare_ccpp )) spec_humid_sfc_bare_ccpp(i) = spec_humid_sfc_bare
1168 wslakexy(i) = lake_water
1169 fwetxy(i) = canopy_wet_fraction
1171 alboldxy(i) = snow_albedo_old
1172 sneqvoxy(i) = snow_water_equiv_old
1174 smcwtdxy(i) = soil_moisture_wtd
1175 deeprechxy(i) = deep_recharge
1176 rechxy(i) = recharge
1177 smoiseq(i,:) = eq_soil_water_vol
1179 stm(i) = (0.1*soil_moisture_vol(1) + &
1180 0.3*soil_moisture_vol(2) + &
1181 0.6*soil_moisture_vol(3) + &
1182 1.0*soil_moisture_vol(4))*1000.0
1184 wet1(i) = soil_moisture_vol(1) / smcmax_table(soil_category(1))
1185 smcwlt2(i) = smcdry_table(soil_category(1))
1186 smcref2(i) = smcref_table(soil_category(1))
1188 virtfac1 = 1.0 + con_fvirt * max(q1(i), 1.e-8)
1191 vptemp =temperature_forcing * prslki(i)*virtfac1
1193 vptemp =temperature_forcing /prslk1(i) * virtfac1
1197 tvs1 = tskin(i) * virtfac1
1199 tvs1 = tskin(i)/prsik1(i) * virtfac1
1202 z0_total = max(min(z0_total,forcing_height),1.0e-6)
1203 z0h_total = max(z0h_total,1.0e-6)
1206 tem1 = (z0_total - z0lo) / (z0up - z0lo)
1207 tem1 = min(max(tem1, 0.0_kind_phys), 1.0_kind_phys)
1208 tem2 = max(vegetation_fraction, 0.1_kind_phys)
1209 zvfun(i) = sqrt(tem1 * tem2)
1213 if ( iopt_sfc .ne. 4 )
then
1215 call gfs_stability &
1216 (zf(i), zvfun(i), gdx, virtual_temperature, vptemp,wind(i), z0_total, z0h_total, &
1217 tvs1, con_g, thsfc_loc, &
1218 rb1(i), fm1(i), fh1(i), fm101(i), fh21(i), cm(i), ch(i), stress1(i), ustar1(i))
1220 rmol1(i) = undefined
1221 flhc1(i) = undefined
1222 flqc1(i) = undefined
1224 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1225 cah_total = density * con_cp /rah_total
1232 qfx = evap(i) / con_hvap
1234 call sfcdif4(i_location ,j_location ,uwind_forcing ,vwind_forcing , &
1235 temperature_forcing, air_pressure_forcing ,air_pressure_surface , &
1236 pblhx,gdx,z0_total,con_fvirt,con_eps,con_cp,itime,snwdph(i),mnice, &
1237 psi_opt,surface_temperature, &
1238 spec_humidity_forcing,forcing_height,iz0tlnd,spec_humidity_surface,&
1239 sensible_heat_total,qfx,cm(i),ch(i),ch2,cq2,rmol1(i),ustar1(i), &
1240 rb1(i),fm1(i),fh1(i),stress1(i),fm101(i),fh21(i),wspd1,flhc1(i), &
1246 ch(i) = ch_vegetated * vegetation_fraction + ch_bare_ground*(1.0-vegetation_fraction)
1248 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1249 cah_total = density * con_cp /rah_total
1260 chh(i) = chxy(i) * wind(i) * density
1261 cmm(i) = cmxy(i) * wind(i)
1263 snwdph(i) = snow_depth * 1000.0
1269 hflx(i) = hflx(i) / density / con_cp
1270 evap(i) = evap(i) / density / con_hvap
1275 potential_temperature = temperature_forcing * prslki(i)
1276 virtual_temperature = temperature_forcing * (1.0 + 0.61*spec_humidity_forcing)
1277 penman_radiation = sw_absorbed_total + radiation_lw_forcing
1278 dqsdt = spec_humidity_sat * a23m4/(temperature_forcing-a4)**2
1280 precip_freeze_frac_in = srflag(i)
1281 is_snowing = .false.
1282 is_freeze_rain = .false.
1283 if (precipitation_forcing > 0.0)
then
1284 if (precip_freeze_frac_in > 0.0)
then
1287 if (temperature_forcing <= 275.15) is_freeze_rain = .true.
1294 ch_noahmp = chxy(i) * wind(i)
1296 call penman (temperature_forcing, air_pressure_forcing , ch_noahmp , &
1297 virtual_temperature, potential_temperature, precipitation_forcing, &
1298 penman_radiation , ground_heat_total , spec_humidity_forcing, &
1299 spec_humidity_sat , potential_evaporation, is_snowing , &
1300 is_freeze_rain , precip_freeze_frac_in, dqsdt , &
1301 emissivity_total , snow_cover_fraction )
1303 ep(i) = potential_evaporation
subroutine noahmpdrv_run(im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp, soilcol, vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, prsl1, prslk1, prslki, prsik1, zf, pblh, dry, wind, slopetyp, shdmin, shdmax, snoalb, sfalb, flag_iter, con_g, idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot, iopt_stc, iopt_trs, iopt_diag, xlatin, xcoszin, iyrlen, julian, garea, rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1, con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, con_fvirt, con_rd, con_hfus, thsfc_loc, cpllnd, cpllnd2atm, weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, canopy, trans, tsurf, zorl, rb1, fm1, fh1, ustar1, stress1, fm101, fh21, rmol1, flhc1, flqc1, do_mynnsfclay, snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy, waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, albdvis, albdnir, albivis, albinir, emiss, sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc, stm, snohf, smcwlt2, smcref2, wet1, t2mmp, q2mp, zvfun, ztmax, rca, errmsg, errflg, canopy_heat_storage_ccpp, rainfall_ccpp, sw_absorbed_total_ccpp, sw_reflected_total_ccpp, lw_absorbed_total_ccpp, temperature_bare_grd_ccpp, temperature_veg_grd_ccpp, temperature_veg_2m_ccpp, temperature_bare_2m_ccpp, spec_humidity_veg_2m_ccpp, spec_humidity_bare_2m_ccpp, sw_absorbed_veg_ccpp, sw_absorbed_ground_ccpp, snowmelt_out_ccpp, snowmelt_shallow_ccpp, albedo_direct_snow_ccpp, albedo_diffuse_snow_ccpp, ch_vegetated_ccpp, ch_bare_ground_ccpp, sensible_heat_grd_veg_ccpp, sensible_heat_leaf_ccpp, sensible_heat_grd_bar_ccpp, latent_heat_grd_veg_ccpp, latent_heat_grd_bare_ccpp, ground_heat_veg_ccpp, ground_heat_bare_ccpp, lw_absorbed_grd_veg_ccpp, lw_absorbed_leaf_ccpp, lw_absorbed_grd_bare_ccpp, latent_heat_trans_ccpp, latent_heat_leaf_ccpp, ch_leaf_ccpp, ch_below_canopy_ccpp, ch_vegetated_2m_ccpp, ch_bare_ground_2m_ccpp, precip_adv_heat_veg_ccpp, precip_adv_heat_grd_v_ccpp, precip_adv_heat_grd_b_ccpp, spec_humid_sfc_veg_ccpp, spec_humid_sfc_bare_ccpp)
This subroutine is the main CCPP entry point for the NoahMP LSM.