430 ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp,soilcol,&
431 vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, &
432 prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp,&
433 shdmin, shdmax, snoalb, sfalb, flag_iter,con_g, &
434 idveg, iopt_crs, iopt_btr, iopt_run, iopt_sfc, iopt_frz, &
435 iopt_inf, iopt_rad, iopt_alb, iopt_snf, iopt_tbot,iopt_stc,&
436 iopt_trs,iopt_diag,xlatin, xcoszin, iyrlen, julian, garea, &
437 rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1,&
438 con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, &
439 con_fvirt, con_rd, con_hfus, thsfc_loc, cpllnd, cpllnd2atm,&
442 weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
443 canopy, trans, tsurf, zorl, &
444 rb1, fm1, fh1, ustar1, stress1, fm101, fh21, &
445 rmol1,flhc1,flqc1,do_mynnsfclay, &
449 snowxy, tvxy, tgxy, canicexy, canliqxy, eahxy, tahxy, cmxy,&
450 chxy, fwetxy, sneqvoxy, alboldxy, qsnowxy, wslakexy, zwtxy,&
451 waxy, wtxy, tsnoxy, zsnsoxy, snicexy, snliqxy, lfmassxy, &
452 rtmassxy, stmassxy, woodxy, stblcpxy, fastcpxy, xlaixy, &
453 xsaixy, taussxy, smoiseq, smcwtdxy, deeprechxy, rechxy, &
454 albdvis, albdnir, albivis, albinir,emiss, &
457 sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
458 cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,&
459 stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, &
460 ztmax, rca, errmsg, errflg, &
461 canopy_heat_storage_ccpp, &
463 sw_absorbed_total_ccpp, &
464 sw_reflected_total_ccpp, &
465 lw_absorbed_total_ccpp, &
466 temperature_bare_grd_ccpp, &
467 temperature_veg_grd_ccpp, &
468 temperature_veg_2m_ccpp, &
469 temperature_bare_2m_ccpp, &
470 spec_humidity_veg_2m_ccpp, &
471 spec_humidity_bare_2m_ccpp, &
472 sw_absorbed_veg_ccpp, &
473 sw_absorbed_ground_ccpp, &
475 snowmelt_shallow_ccpp, &
476 albedo_direct_snow_ccpp, &
477 albedo_diffuse_snow_ccpp, &
479 ch_bare_ground_ccpp, &
480 sensible_heat_grd_veg_ccpp, &
481 sensible_heat_leaf_ccpp, &
482 sensible_heat_grd_bar_ccpp, &
483 latent_heat_grd_veg_ccpp, &
484 latent_heat_grd_bare_ccpp, &
485 ground_heat_veg_ccpp, &
486 ground_heat_bare_ccpp, &
487 lw_absorbed_grd_veg_ccpp, &
488 lw_absorbed_leaf_ccpp, &
489 lw_absorbed_grd_bare_ccpp, &
490 latent_heat_trans_ccpp, &
491 latent_heat_leaf_ccpp, &
493 ch_below_canopy_ccpp, &
494 ch_vegetated_2m_ccpp, &
495 ch_bare_ground_2m_ccpp, &
496 precip_adv_heat_veg_ccpp, &
497 precip_adv_heat_grd_v_ccpp, &
498 precip_adv_heat_grd_b_ccpp, &
499 spec_humid_sfc_veg_ccpp, &
500 spec_humid_sfc_bare_ccpp &
503 use machine ,
only : kind_phys
504 use funcphys,
only : fpvs
506 use module_sf_noahmplsm,
only : gfs_stability
512 real(kind=kind_phys),
parameter :: a2 = 17.2693882
513 real(kind=kind_phys),
parameter :: a3 = 273.16
514 real(kind=kind_phys),
parameter :: a4 = 35.86
515 real(kind=kind_phys),
parameter :: a23m4 = a2*(a3-a4)
516 real(kind=kind_phys),
intent(in) :: con_g
518 real,
parameter :: undefined = 9.99e20_kind_phys
520 integer,
parameter :: nsoil = 4
521 integer,
parameter :: nsnow = 3
523 integer,
parameter :: iz0tlnd = 0
525 real(kind=kind_phys),
save :: zsoil(nsoil)
526 data zsoil / -0.1, -0.4, -1.0, -2.0 /
532 integer ,
intent(in) :: im
533 integer ,
intent(in) :: km
534 integer ,
intent(in) :: lsnowl
535 integer ,
intent(in) :: itime
536 real(kind=kind_phys),
dimension(:) ,
intent(in) :: ps
537 real(kind=kind_phys),
dimension(:) ,
intent(in) :: u1
538 real(kind=kind_phys),
dimension(:) ,
intent(in) :: v1
539 real(kind=kind_phys),
dimension(:) ,
intent(in) :: t1
540 real(kind=kind_phys),
dimension(:) ,
intent(in) :: q1
541 integer ,
dimension(:) ,
intent(in) :: soiltyp
542 integer ,
dimension(:) ,
intent(in) :: soilcol
543 integer ,
dimension(:) ,
intent(in) :: vegtype
544 real(kind=kind_phys),
dimension(:) ,
intent(in) :: sigmaf
545 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dlwflx
546 real(kind=kind_phys),
dimension(:) ,
intent(in) :: dswsfc
547 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snet
548 real(kind=kind_phys) ,
intent(in) :: delt
549 real(kind=kind_phys),
dimension(:) ,
intent(in) :: tg3
550 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: cm
551 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ch
552 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsl1
553 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslk1
555 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prslki
556 real(kind=kind_phys),
dimension(:) ,
intent(in) :: prsik1
558 real(kind=kind_phys),
dimension(:) ,
intent(in) :: zf
560 logical ,
intent(in) :: do_mynnsfclay
562 real(kind=kind_phys),
dimension(:) ,
intent(in) :: pblh
563 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rmol1
564 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flhc1
565 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: flqc1
568 logical ,
dimension(:) ,
intent(in) :: dry
569 real(kind=kind_phys),
dimension(:) ,
intent(in) :: wind
570 integer ,
dimension(:) ,
intent(in) :: slopetyp
571 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmin
572 real(kind=kind_phys),
dimension(:) ,
intent(in) :: shdmax
573 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snoalb
574 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: sfalb
575 logical ,
dimension(:) ,
intent(in) :: flag_iter
576 integer ,
intent(in) :: idveg
577 integer ,
intent(in) :: iopt_crs
578 integer ,
intent(in) :: iopt_btr
579 integer ,
intent(in) :: iopt_run
580 integer ,
intent(in) :: iopt_sfc
581 integer ,
intent(in) :: iopt_frz
582 integer ,
intent(in) :: iopt_inf
583 integer ,
intent(in) :: iopt_rad
584 integer ,
intent(in) :: iopt_alb
585 integer ,
intent(in) :: iopt_snf
586 integer ,
intent(in) :: iopt_tbot
587 integer ,
intent(in) :: iopt_stc
588 integer ,
intent(in) :: iopt_trs
589 integer ,
intent(in) :: iopt_diag
590 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xlatin
591 real(kind=kind_phys),
dimension(:) ,
intent(in) :: xcoszin
592 integer ,
intent(in) :: iyrlen
593 real(kind=kind_phys) ,
intent(in) :: julian
594 real(kind=kind_phys),
dimension(:) ,
intent(in) :: garea
595 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rainn_mp
596 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rainc_mp
597 real(kind=kind_phys),
dimension(:) ,
intent(in) :: snow_mp
598 real(kind=kind_phys),
dimension(:) ,
intent(in) :: graupel_mp
599 real(kind=kind_phys),
dimension(:) ,
intent(in) :: ice_mp
600 real(kind=kind_phys),
dimension(:) ,
intent(in) :: rhonewsn1
601 real(kind=kind_phys) ,
intent(in) :: con_hvap
602 real(kind=kind_phys) ,
intent(in) :: con_cp
603 real(kind=kind_phys) ,
intent(in) :: con_jcal
604 real(kind=kind_phys) ,
intent(in) :: rhoh2o
605 real(kind=kind_phys) ,
intent(in) :: con_eps
606 real(kind=kind_phys) ,
intent(in) :: con_epsm1
607 real(kind=kind_phys) ,
intent(in) :: con_fvirt
608 real(kind=kind_phys) ,
intent(in) :: con_rd
609 real(kind=kind_phys) ,
intent(in) :: con_hfus
611 logical ,
intent(in) :: thsfc_loc
613 logical ,
intent(in) :: cpllnd
614 logical ,
intent(in) :: cpllnd2atm
616 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: weasd
617 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: snwdph
618 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tskin
619 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tprcp
620 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: srflag
621 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smc
622 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: stc
623 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: slc
624 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canopy
625 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: trans
626 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tsurf
627 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: zorl
629 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rb1
630 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm1
631 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh1
632 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: ustar1
633 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stress1
634 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fm101
635 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fh21
637 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: snowxy
638 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tvxy
639 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tgxy
640 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canicexy
641 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: canliqxy
642 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: eahxy
643 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: tahxy
644 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: cmxy
645 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: chxy
646 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fwetxy
647 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: sneqvoxy
648 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: alboldxy
649 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: qsnowxy
650 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: wslakexy
651 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: zwtxy
652 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: waxy
653 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: wtxy
654 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: tsnoxy
655 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: zsnsoxy
656 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: snicexy
657 real(kind=kind_phys),
dimension(:,lsnowl:),
intent(inout) :: snliqxy
658 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: lfmassxy
659 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rtmassxy
660 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stmassxy
661 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: woodxy
662 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: stblcpxy
663 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: fastcpxy
664 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: xlaixy
665 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: xsaixy
666 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: taussxy
667 real(kind=kind_phys),
dimension(:,:) ,
intent(inout) :: smoiseq
668 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: smcwtdxy
669 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: deeprechxy
670 real(kind=kind_phys),
dimension(:) ,
intent(inout) :: rechxy
671 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdvis
672 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albdnir
673 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albivis
674 real(kind=kind_phys),
dimension(:) ,
intent(out) :: albinir
675 real(kind=kind_phys),
dimension(:) ,
intent(out) :: emiss
676 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sncovr1
677 real(kind=kind_phys),
dimension(:) ,
intent(out) :: qsurf
678 real(kind=kind_phys),
dimension(:) ,
intent(out) :: gflux
679 real(kind=kind_phys),
dimension(:) ,
intent(out) :: drain
680 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evap
681 real(kind=kind_phys),
dimension(:) ,
intent(out) :: hflx
682 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ep
683 real(kind=kind_phys),
dimension(:) ,
intent(out) :: runoff
684 real(kind=kind_phys),
dimension(:) ,
intent(out) :: cmm
685 real(kind=kind_phys),
dimension(:) ,
intent(out) :: chh
686 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evbs
687 real(kind=kind_phys),
dimension(:) ,
intent(out) :: evcw
688 real(kind=kind_phys),
dimension(:) ,
intent(out) :: sbsno
689 real(kind=kind_phys),
dimension(:) ,
intent(out) :: pah
690 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ecan
691 real(kind=kind_phys),
dimension(:) ,
intent(out) :: etran
692 real(kind=kind_phys),
dimension(:) ,
intent(out) :: edir
693 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snowc
694 real(kind=kind_phys),
dimension(:) ,
intent(out) :: stm
695 real(kind=kind_phys),
dimension(:) ,
intent(out) :: snohf
696 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcwlt2
697 real(kind=kind_phys),
dimension(:) ,
intent(out) :: smcref2
698 real(kind=kind_phys),
dimension(:) ,
intent(out) :: wet1
699 real(kind=kind_phys),
dimension(:) ,
intent(out) :: t2mmp
700 real(kind=kind_phys),
dimension(:) ,
intent(out) :: q2mp
701 real(kind=kind_phys),
dimension(:) ,
intent(out) :: zvfun
702 real(kind=kind_phys),
dimension(:) ,
intent(out) :: ztmax
703 real(kind=kind_phys),
dimension(:) ,
intent(out) :: rca
705 character(len=*) ,
intent(out) :: errmsg
706 integer ,
intent(out) :: errflg
708 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: canopy_heat_storage_ccpp
709 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: rainfall_ccpp
710 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_total_ccpp
711 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_reflected_total_ccpp
712 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_total_ccpp
713 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_grd_ccpp
714 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_grd_ccpp
715 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_veg_2m_ccpp
716 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: temperature_bare_2m_ccpp
717 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_veg_2m_ccpp
718 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humidity_bare_2m_ccpp
719 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_veg_ccpp
720 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sw_absorbed_ground_ccpp
721 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_out_ccpp
722 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: snowmelt_shallow_ccpp
723 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_direct_snow_ccpp
724 real(kind=kind_phys),
dimension(:,:),
intent(out),
optional :: albedo_diffuse_snow_ccpp
725 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_ccpp
726 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_ccpp
727 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_veg_ccpp
728 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_leaf_ccpp
729 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: sensible_heat_grd_bar_ccpp
730 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_veg_ccpp
731 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_grd_bare_ccpp
732 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_veg_ccpp
733 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ground_heat_bare_ccpp
734 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_veg_ccpp
735 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_leaf_ccpp
736 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: lw_absorbed_grd_bare_ccpp
737 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_trans_ccpp
738 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: latent_heat_leaf_ccpp
739 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_leaf_ccpp
740 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_below_canopy_ccpp
741 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_vegetated_2m_ccpp
742 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: ch_bare_ground_2m_ccpp
743 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_veg_ccpp
744 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_v_ccpp
745 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: precip_adv_heat_grd_b_ccpp
746 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_veg_ccpp
747 real(kind=kind_phys),
dimension(:) ,
intent(out),
optional :: spec_humid_sfc_bare_ccpp
753 integer :: iopt_rsf = 4
754 integer :: iopt_soil = 1
755 integer :: iopt_pedo = 1
756 integer :: iopt_crop = 0
757 integer :: iopt_gla = 2
758 integer :: iopt_z0m = 1
764 integer :: i_location
765 integer :: j_location
766 real (kind=kind_phys) :: latitude
767 integer :: year_length
768 real (kind=kind_phys) :: julian_day
769 real (kind=kind_phys) :: cosine_zenith
770 real (kind=kind_phys) :: timestep
771 real (kind=kind_phys) :: spatial_scale
772 real (kind=kind_phys) :: atmosphere_thickness
773 integer :: soil_levels
774 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_interface_depth
775 integer :: max_snow_levels
776 real (kind=kind_phys) :: vegetation_frac
777 real (kind=kind_phys) :: area_grid
778 real (kind=kind_phys) :: max_vegetation_frac
779 integer :: vegetation_category
781 integer :: surface_type
783 real (kind=kind_phys),
dimension( 1:nsoil) :: eq_soil_water_vol
784 real (kind=kind_phys) :: temperature_forcing
785 real (kind=kind_phys) :: air_pressure_surface
786 real (kind=kind_phys) :: air_pressure_forcing
787 real (kind=kind_phys) :: uwind_forcing
788 real (kind=kind_phys) :: vwind_forcing
789 real (kind=kind_phys) :: spec_humidity_forcing
790 real (kind=kind_phys) :: cloud_water_forcing
791 real (kind=kind_phys) :: sw_radiation_forcing
792 real (kind=kind_phys) :: radiation_lw_forcing
793 real (kind=kind_phys) :: precipitation_forcing
794 real (kind=kind_phys) :: precip_convective
795 real (kind=kind_phys) :: precip_non_convective
796 real (kind=kind_phys) :: precip_sh_convective
797 real (kind=kind_phys) :: precip_snow
798 real (kind=kind_phys) :: precip_graupel
799 real (kind=kind_phys) :: precip_hail
800 real (kind=kind_phys) :: temperature_soil_bot
801 real (kind=kind_phys) :: co2_air
802 real (kind=kind_phys) :: o2_air
803 real (kind=kind_phys) :: foliage_nitrogen
804 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_ice_frac_old
805 real (kind=kind_phys) :: forcing_height
806 real (kind=kind_phys) :: snow_albedo_old
807 real (kind=kind_phys) :: snow_water_equiv_old
808 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: temperature_snow_soil
809 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_liquid_vol
810 real (kind=kind_phys),
dimension( 1:nsoil) :: soil_moisture_vol
812 real (kind=kind_phys) :: surface_temperature
814 real (kind=kind_phys) :: temperature_canopy_air
815 real (kind=kind_phys) :: vapor_pres_canopy_air
816 real (kind=kind_phys) :: canopy_wet_fraction
817 real (kind=kind_phys) :: canopy_liquid
818 real (kind=kind_phys) :: canopy_ice
819 real (kind=kind_phys) :: temperature_leaf
820 real (kind=kind_phys) :: temperature_ground
821 real (kind=kind_phys) :: spec_humidity_surface
823 real (kind=kind_phys) :: rainfall
824 integer :: snow_levels
825 real (kind=kind_phys),
dimension(-nsnow+1:nsoil) :: interface_depth
826 real (kind=kind_phys) :: snow_depth
827 real (kind=kind_phys) :: snow_water_equiv
828 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_ice
829 real (kind=kind_phys),
dimension(-nsnow+1: 0) :: snow_level_liquid
830 real (kind=kind_phys) :: depth_water_table
831 real (kind=kind_phys) :: aquifer_water
832 real (kind=kind_phys) :: saturated_water
833 real (kind=kind_phys) :: lake_water
834 real (kind=kind_phys) :: leaf_carbon
835 real (kind=kind_phys) :: root_carbon
836 real (kind=kind_phys) :: stem_carbon
837 real (kind=kind_phys) :: wood_carbon
838 real (kind=kind_phys) :: soil_carbon_stable
839 real (kind=kind_phys) :: soil_carbon_fast
840 real (kind=kind_phys) :: leaf_area_index
841 real (kind=kind_phys) :: stem_area_index
842 real (kind=kind_phys) :: cm_noahmp
843 real (kind=kind_phys) :: ch_noahmp
845 real (kind=kind_phys) :: grain_carbon
846 real (kind=kind_phys) :: growing_deg_days
847 integer :: plant_growth_stage
848 real (kind=kind_phys) :: soil_moisture_wtd
849 real (kind=kind_phys) :: deep_recharge
850 real (kind=kind_phys) :: recharge
851 real (kind=kind_phys) :: z0_total
852 real (kind=kind_phys) :: z0h_total
854 real (kind=kind_phys) :: sw_absorbed_total
855 real (kind=kind_phys) :: sw_reflected_total
856 real (kind=kind_phys) :: lw_absorbed_total
857 real (kind=kind_phys) :: sensible_heat_total
858 real (kind=kind_phys) :: ground_heat_total
859 real (kind=kind_phys) :: latent_heat_canopy
860 real (kind=kind_phys) :: latent_heat_ground
861 real (kind=kind_phys) :: transpiration_heat
862 real (kind=kind_phys) :: evaporation_canopy
863 real (kind=kind_phys) :: transpiration
864 real (kind=kind_phys) :: evaporation_soil
865 real (kind=kind_phys) :: temperature_radiative
866 real (kind=kind_phys) :: temperature_bare_grd
867 real (kind=kind_phys) :: temperature_veg_grd
868 real (kind=kind_phys) :: temperature_veg_2m
869 real (kind=kind_phys) :: temperature_bare_2m
870 real (kind=kind_phys) :: spec_humidity_veg_2m
871 real (kind=kind_phys) :: spec_humidity_bare_2m
872 real (kind=kind_phys) :: runoff_surface
873 real (kind=kind_phys) :: runoff_baseflow
874 real (kind=kind_phys) :: par_absorbed
875 real (kind=kind_phys) :: photosynthesis
876 real (kind=kind_phys) :: sw_absorbed_veg
877 real (kind=kind_phys) :: sw_absorbed_ground
878 real (kind=kind_phys) :: snow_cover_fraction
879 real (kind=kind_phys) :: net_eco_exchange
880 real (kind=kind_phys) :: global_prim_prod
881 real (kind=kind_phys) :: net_prim_prod
882 real (kind=kind_phys) :: vegetation_fraction
883 real (kind=kind_phys) :: albedo_total
884 real (kind=kind_phys) :: snowmelt_out
885 real (kind=kind_phys) :: snowmelt_shallow
886 real (kind=kind_phys) :: snowmelt_shallow_1
887 real (kind=kind_phys) :: snowmelt_shallow_2
888 real (kind=kind_phys) :: rs_sunlit
889 real (kind=kind_phys) :: rs_shaded
890 real (kind=kind_phys),
dimension(1:2) :: albedo_direct
891 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse
892 real (kind=kind_phys),
dimension(1:2) :: albedo_direct_snow
893 real (kind=kind_phys),
dimension(1:2) :: albedo_diffuse_snow
894 real (kind=kind_phys) :: canopy_gap_fraction
895 real (kind=kind_phys) :: incanopy_gap_fraction
896 real (kind=kind_phys) :: ch_vegetated
897 real (kind=kind_phys) :: ch_bare_ground
898 real (kind=kind_phys) :: emissivity_total
899 real (kind=kind_phys) :: sensible_heat_grd_veg
900 real (kind=kind_phys) :: sensible_heat_leaf
901 real (kind=kind_phys) :: sensible_heat_grd_bar
902 real (kind=kind_phys) :: latent_heat_grd_veg
903 real (kind=kind_phys) :: latent_heat_grd_bare
904 real (kind=kind_phys) :: ground_heat_veg
905 real (kind=kind_phys) :: ground_heat_bare
906 real (kind=kind_phys) :: lw_absorbed_grd_veg
907 real (kind=kind_phys) :: lw_absorbed_leaf
908 real (kind=kind_phys) :: lw_absorbed_grd_bare
909 real (kind=kind_phys) :: latent_heat_trans
910 real (kind=kind_phys) :: latent_heat_leaf
911 real (kind=kind_phys) :: ch_leaf
912 real (kind=kind_phys) :: ch_below_canopy
913 real (kind=kind_phys) :: ch_vegetated_2m
914 real (kind=kind_phys) :: ch_bare_ground_2m
915 real (kind=kind_phys) :: precip_frozen_frac
916 real (kind=kind_phys) :: precip_adv_heat_veg
917 real (kind=kind_phys) :: precip_adv_heat_grd_v
918 real (kind=kind_phys) :: precip_adv_heat_grd_b
919 real (kind=kind_phys) :: precip_adv_heat_total
920 real (kind=kind_phys) :: snow_sublimation
921 real (kind=kind_phys) :: lai_sunlit
922 real (kind=kind_phys) :: lai_shaded
923 real (kind=kind_phys) :: leaf_air_resistance
925 real (kind=kind_phys) :: canopy_heat_storage
926 real (kind=kind_phys) :: spec_humid_sfc_veg
927 real (kind=kind_phys) :: spec_humid_sfc_bare
929 real (kind=kind_phys) :: ustarx
930 real (kind=kind_phys) :: prslkix
931 real (kind=kind_phys) :: prsik1x
932 real (kind=kind_phys) :: prslk1x
934 real (kind=kind_phys) :: ch2
935 real (kind=kind_phys) :: cq2
936 real (kind=kind_phys) :: qfx
937 real (kind=kind_phys) :: wspd1
938 real (kind=kind_phys) :: pblhx
941 real (kind=kind_phys) :: rah_total
942 real (kind=kind_phys) :: cah_total
949 integer :: soil_category(nsoil)
950 integer :: slope_category
951 integer :: soil_color_category
952 character(len=256) :: dataset_identifier
954 real (kind=kind_phys) :: spec_humidity_sat
955 real (kind=kind_phys) :: vapor_pressure_sat
956 real (kind=kind_phys) :: latent_heat_total
957 real (kind=kind_phys) :: density
958 real (kind=kind_phys) :: virtual_temperature
959 real (kind=kind_phys) :: potential_evaporation
960 real (kind=kind_phys) :: potential_temperature
961 real (kind=kind_phys) :: penman_radiation
962 real (kind=kind_phys) :: dqsdt
963 real (kind=kind_phys) :: precip_freeze_frac_in
965 real (kind=kind_phys) :: virtfac1
966 real (kind=kind_phys) :: tflux
967 real (kind=kind_phys) :: tvs1
968 real (kind=kind_phys) :: vptemp
970 real(kind=kind_phys) :: tem1,tem2,gdx
971 real(kind=kind_phys),
parameter :: z0lo=0.1, z0up=1.0
973 logical :: is_snowing
974 logical :: is_freeze_rain
996 if (cpllnd .and. cpllnd2atm)
return
1000 if (flag_iter(i) .and. dry(i))
then
1006 if(vegtype(i) == isice_table )
then
1007 if(weasd(i) < 0.1)
then
1016 dataset_identifier =
"modified_igbp_modis_noah"
1020 latitude = xlatin(i)
1021 year_length = iyrlen
1023 cosine_zenith = xcoszin(i)
1025 spatial_scale = -9999.0
1026 atmosphere_thickness = -9999.0
1028 soil_interface_depth = zsoil
1029 max_snow_levels = nsnow
1030 vegetation_frac = sigmaf(i)
1031 max_vegetation_frac = shdmax(i)
1032 vegetation_category = vegtype(i)
1035 eq_soil_water_vol = smoiseq(i,:)
1036 temperature_forcing = t1(i)
1037 air_pressure_surface = ps(i)
1038 air_pressure_forcing = prsl1(i)
1039 uwind_forcing = u1(i)
1040 vwind_forcing = v1(i)
1041 area_grid = garea(i)
1049 spec_humidity_forcing = max(q1(i), 1.e-8)
1050 virtual_temperature = temperature_forcing * &
1051 (1.0 + con_fvirt * spec_humidity_forcing)
1052 vapor_pressure_sat = fpvs( temperature_forcing )
1053 spec_humidity_sat = con_eps*vapor_pressure_sat / &
1054 (prsl1(i) + con_epsm1*vapor_pressure_sat)
1055 spec_humidity_sat = max(spec_humidity_sat, 1.e-8)
1056 spec_humidity_forcing = min(spec_humidity_sat,spec_humidity_forcing)
1058 cloud_water_forcing = -9999.0
1059 sw_radiation_forcing = dswsfc(i)
1060 radiation_lw_forcing = dlwflx(i)
1061 precipitation_forcing = 1000.0 * tprcp(i) / delt
1062 precip_convective = rainc_mp(i)
1063 precip_non_convective = rainn_mp(i)
1064 precip_sh_convective = 0.
1065 precip_snow = snow_mp(i)
1066 precip_graupel = graupel_mp(i)
1067 precip_hail = ice_mp(i)
1068 temperature_soil_bot = tg3(i)
1069 co2_air = co2_table * air_pressure_forcing
1070 o2_air = o2_table * air_pressure_forcing
1071 foliage_nitrogen = 1.0
1077 forcing_height = zf(i)
1078 snow_albedo_old = alboldxy(i)
1079 snow_water_equiv_old = sneqvoxy(i)
1080 temperature_snow_soil(-2: 0) = tsnoxy(i,:)
1081 temperature_snow_soil( 1:km) = stc(i,:)
1082 soil_liquid_vol = slc(i,:)
1083 soil_moisture_vol = smc(i,:)
1084 temperature_canopy_air = tahxy(i)
1085 vapor_pres_canopy_air = eahxy(i)
1086 canopy_wet_fraction = fwetxy(i)
1087 canopy_liquid = canliqxy(i)
1088 canopy_ice = canicexy(i)
1089 temperature_leaf = tvxy(i)
1090 temperature_ground = tgxy(i)
1091 spec_humidity_surface = undefined
1094 snow_levels = nint(snowxy(i))
1095 interface_depth = zsnsoxy(i,:)
1096 snow_depth = snwdph(i) * 0.001
1097 snow_water_equiv = weasd(i)
1098 if (snow_water_equiv /= 0.0 .and. snow_depth == 0.0)
then
1099 snow_depth = 10.0 * snow_water_equiv /1000.0
1101 snow_level_ice = snicexy(i,:)
1102 snow_level_liquid = snliqxy(i,:)
1103 depth_water_table = zwtxy(i)
1104 aquifer_water = waxy(i)
1105 saturated_water = wtxy(i)
1106 lake_water = wslakexy(i)
1107 leaf_carbon = lfmassxy(i)
1108 root_carbon = rtmassxy(i)
1109 stem_carbon = stmassxy(i)
1110 wood_carbon = woodxy(i)
1111 soil_carbon_stable = stblcpxy(i)
1112 soil_carbon_fast = fastcpxy(i)
1113 leaf_area_index = xlaixy(i)
1114 stem_area_index = xsaixy(i)
1121 soil_moisture_wtd = smcwtdxy(i)
1122 deep_recharge = deeprechxy(i)
1123 recharge = rechxy(i)
1127 snow_ice_frac_old = 0.0
1128 do k = snow_levels+1, 0
1129 if(snow_level_ice(k) > 0.0 ) &
1130 snow_ice_frac_old(k) = snow_level_ice(k) /(snow_level_ice(k)+snow_level_liquid(k))
1134 if (snow_depth .gt. 0.1 .or. vegetation_category == isice_table )
then
1143 density = air_pressure_forcing / (con_rd * virtual_temperature)
1144 chh(i) = ch(i) * wind(i) * density
1145 cmm(i) = cm(i) * wind(i)
1150 soil_category = soiltyp(i)
1151 slope_category = slopetyp(i)
1152 soil_color_category = soilcol(i)
1157 slope_category, soil_color_category, crop_type,parameters)
1158 parameters%prcpiceden = rhonewsn1(i)
1159 call noahmp_options(idveg ,iopt_crs, iopt_btr , iopt_run, iopt_sfc, &
1160 iopt_frz, iopt_inf , iopt_rad, iopt_alb, &
1161 iopt_snf, iopt_tbot, iopt_stc, iopt_rsf, &
1162 iopt_soil,iopt_pedo, iopt_crop,iopt_trs, &
1165 if ( vegetation_category == isice_table )
then
1167 if (precipitation_forcing > 0.0)
then
1168 if (srflag(i) > 0.0)
then
1169 snowfall = srflag(i) * precipitation_forcing
1174 temperature_soil_bot = min(temperature_soil_bot,263.15)
1176 call noahmp_options_glacier(iopt_alb, iopt_snf, iopt_tbot, iopt_stc, iopt_gla, &
1178 vegetation_frac = 0.0
1179 call noahmp_glacier ( &
1180 i_location ,1 ,cosine_zenith ,nsnow , &
1182 temperature_forcing ,air_pressure_forcing ,uwind_forcing ,vwind_forcing , &
1183 spec_humidity_forcing,sw_radiation_forcing ,precipitation_forcing,radiation_lw_forcing , &
1184 temperature_soil_bot ,forcing_height ,snow_ice_frac_old ,zsoil , &
1185 thsfc_loc ,prslkix ,prsik1x ,prslk1x , &
1186 air_pressure_surface ,pblhx ,iz0tlnd ,itime , &
1187 vegetation_frac ,area_grid ,psi_opt , &
1188 con_fvirt ,con_eps ,con_epsm1 ,con_cp , &
1189 snowfall ,snow_water_equiv_old ,snow_albedo_old , &
1190 cm_noahmp ,ch_noahmp ,snow_levels ,snow_water_equiv , &
1191 soil_moisture_vol ,interface_depth ,snow_depth ,snow_level_ice , &
1192 snow_level_liquid ,temperature_ground ,temperature_snow_soil,soil_liquid_vol , &
1193 snow_age ,spec_humidity_surface,sw_absorbed_total ,sw_reflected_total , &
1194 lw_absorbed_total ,sensible_heat_total ,latent_heat_ground ,ground_heat_total , &
1195 temperature_radiative,evaporation_soil ,runoff_surface ,runoff_baseflow , &
1196 sw_absorbed_ground ,albedo_total ,snowmelt_out ,snowmelt_shallow , &
1197 snowmelt_shallow_1 ,snowmelt_shallow_2 ,temperature_bare_2m ,spec_humidity_bare_2m, &
1199 emissivity_total ,precip_frozen_frac ,ch_bare_ground_2m ,snow_sublimation , &
1201 albedo_direct ,albedo_diffuse, errmsg ,errflg )
1203 albedo_direct ,albedo_diffuse)
1207 if (errflg /= 0)
return
1214 snow_cover_fraction = 1.0
1215 temperature_leaf = temperature_radiative
1218 vapor_pres_canopy_air = 2000.0
1219 temperature_canopy_air = temperature_radiative
1220 canopy_wet_fraction = 0.0
1222 depth_water_table = 0.0
1224 saturated_water = 0.0
1229 soil_carbon_stable = 0.0
1230 soil_carbon_fast = 0.0
1231 leaf_area_index = 0.0
1232 stem_area_index = 0.0
1233 evaporation_canopy = 0.0
1236 precip_adv_heat_total = 0.0
1237 soil_moisture_wtd = 0.0
1240 eq_soil_water_vol = soil_moisture_vol
1241 transpiration_heat = 0.0
1242 latent_heat_canopy = 0.0
1244 latent_heat_total = latent_heat_ground
1245 t2mmp(i) = temperature_bare_2m
1246 q2mp(i) = spec_humidity_bare_2m
1248 tskin(i) = temperature_radiative
1249 tflux = temperature_ground
1250 surface_temperature = temperature_ground
1251 vegetation_fraction = vegetation_frac
1253 ch_bare_ground = ch_noahmp
1254 canopy_heat_storage = 0.0
1265 i_location ,j_location ,latitude , &
1266 year_length ,julian_day ,cosine_zenith , &
1267 timestep ,spatial_scale ,atmosphere_thickness , &
1268 soil_levels ,soil_interface_depth ,max_snow_levels , &
1269 vegetation_frac ,max_vegetation_frac ,vegetation_category , &
1270 ice_flag ,surface_type ,crop_type , &
1271 eq_soil_water_vol ,temperature_forcing ,air_pressure_forcing , &
1272 air_pressure_surface ,uwind_forcing ,vwind_forcing , &
1273 spec_humidity_forcing ,area_grid ,cloud_water_forcing , &
1274 sw_radiation_forcing ,radiation_lw_forcing ,thsfc_loc , &
1275 prslkix ,prsik1x ,prslk1x , &
1276 pblhx ,iz0tlnd ,itime , &
1278 precip_convective , &
1279 precip_non_convective ,precip_sh_convective ,precip_snow , &
1280 precip_graupel ,precip_hail ,temperature_soil_bot , &
1281 co2_air ,o2_air ,foliage_nitrogen , &
1282 snow_ice_frac_old ,forcing_height , &
1283 con_fvirt ,con_eps, con_epsm1 ,con_cp , &
1284 snow_albedo_old ,snow_water_equiv_old , &
1285 temperature_snow_soil ,soil_liquid_vol ,soil_moisture_vol , &
1286 temperature_canopy_air,vapor_pres_canopy_air ,canopy_wet_fraction , &
1287 canopy_liquid ,canopy_ice ,temperature_leaf , &
1288 temperature_ground ,spec_humidity_surface ,
snowfall , &
1289 rainfall ,snow_levels ,interface_depth , &
1290 snow_depth ,snow_water_equiv ,snow_level_ice , &
1291 snow_level_liquid ,depth_water_table ,aquifer_water , &
1293 lake_water ,leaf_carbon ,root_carbon , &
1294 stem_carbon ,wood_carbon ,soil_carbon_stable , &
1295 soil_carbon_fast ,leaf_area_index ,stem_area_index , &
1297 grain_carbon ,growing_deg_days ,plant_growth_stage , &
1298 soil_moisture_wtd ,deep_recharge ,recharge,ustarx , &
1299 z0_total ,z0h_total ,surface_temperature , &
1300 sw_absorbed_total ,sw_reflected_total , &
1301 lw_absorbed_total ,sensible_heat_total ,ground_heat_total , &
1302 latent_heat_canopy ,latent_heat_ground ,transpiration_heat , &
1303 evaporation_canopy ,transpiration ,evaporation_soil , &
1304 temperature_radiative ,temperature_bare_grd ,temperature_veg_grd , &
1305 temperature_veg_2m ,temperature_bare_2m ,spec_humidity_veg_2m , &
1306 spec_humidity_bare_2m ,runoff_surface ,runoff_baseflow , &
1307 par_absorbed ,photosynthesis ,sw_absorbed_veg , &
1308 sw_absorbed_ground ,snow_cover_fraction ,net_eco_exchange , &
1309 global_prim_prod ,net_prim_prod ,vegetation_fraction , &
1310 albedo_total ,snowmelt_out ,snowmelt_shallow , &
1311 snowmelt_shallow_1 ,snowmelt_shallow_2 ,rs_sunlit , &
1312 rs_shaded ,albedo_direct ,albedo_diffuse , &
1313 albedo_direct_snow ,albedo_diffuse_snow , &
1314 canopy_gap_fraction , &
1315 incanopy_gap_fraction ,ch_vegetated ,ch_bare_ground , &
1316 emissivity_total ,sensible_heat_grd_veg ,sensible_heat_leaf , &
1317 sensible_heat_grd_bar ,latent_heat_grd_veg ,latent_heat_grd_bare , &
1318 ground_heat_veg ,ground_heat_bare ,lw_absorbed_grd_veg , &
1319 lw_absorbed_leaf ,lw_absorbed_grd_bare ,latent_heat_trans , &
1320 latent_heat_leaf ,ch_leaf ,ch_below_canopy , &
1321 ch_vegetated_2m ,ch_bare_ground_2m ,precip_frozen_frac , &
1322 precip_adv_heat_veg ,precip_adv_heat_grd_v ,precip_adv_heat_grd_b , &
1323 precip_adv_heat_total ,snow_sublimation ,canopy_heat_storage , &
1324 lai_sunlit ,lai_shaded ,leaf_air_resistance , &
1326 spec_humid_sfc_veg ,spec_humid_sfc_bare , &
1329 spec_humid_sfc_veg ,spec_humid_sfc_bare )
1333 if (errflg /= 0)
return
1336 latent_heat_total = latent_heat_canopy + latent_heat_ground + transpiration_heat
1338 t2mmp(i) = temperature_veg_2m * vegetation_fraction + &
1339 temperature_bare_2m * (1-vegetation_fraction)
1340 q2mp(i) = spec_humidity_veg_2m * vegetation_fraction + &
1341 spec_humidity_bare_2m * (1-vegetation_fraction)
1343 tskin(i) = temperature_radiative
1344 tflux = surface_temperature
1352 tsnoxy(i,:) = temperature_snow_soil(-2: 0)
1353 stc(i,:) = temperature_snow_soil( 1:km)
1354 hflx(i) = sensible_heat_total
1355 evap(i) = latent_heat_total
1356 evbs(i) = latent_heat_ground
1357 evcw(i) = latent_heat_canopy
1358 trans(i) = transpiration_heat
1359 gflux(i) = -1.0*ground_heat_total
1360 snohf(i) = snowmelt_out * con_hfus
1361 sbsno(i) = snow_sublimation
1362 pah(i) = precip_adv_heat_total
1366 zorl(i) = z0_total * 100.0
1367 ztmax(i) = z0h_total
1370 if(rs_sunlit .le. 0.0 .or. rs_shaded .le. 0.0 .or. &
1371 lai_sunlit .eq. 0.0 .or. lai_shaded .eq. 0.0)
then
1372 rca(i) = parameters%rsmax
1374 rca(i) = ((1.0/(rs_sunlit+leaf_air_resistance)*lai_sunlit) + &
1375 ((1.0/(rs_shaded+leaf_air_resistance))*lai_shaded))
1376 rca(i) = max((1.0/rca(i)),parameters%rsmin)
1379 smc(i,:) = soil_moisture_vol
1380 slc(i,:) = soil_liquid_vol
1381 snowxy(i) = float(snow_levels)
1382 weasd(i) = snow_water_equiv
1383 snicexy(i,:) = snow_level_ice
1384 snliqxy(i,:) = snow_level_liquid
1385 snwdph(i) = snow_depth * 1000.0
1386 canopy(i) = canopy_ice + canopy_liquid
1387 canliqxy(i) = canopy_liquid
1388 canicexy(i) = canopy_ice
1389 zwtxy(i) = depth_water_table
1390 waxy(i) = aquifer_water
1391 wtxy(i) = saturated_water
1393 ecan(i) = evaporation_canopy
1394 etran(i) = transpiration
1395 edir(i) = evaporation_soil
1396 drain(i) = runoff_baseflow
1397 runoff(i) = runoff_surface
1399 lfmassxy(i) = leaf_carbon
1400 rtmassxy(i) = root_carbon
1401 stmassxy(i) = stem_carbon
1402 woodxy(i) = wood_carbon
1403 stblcpxy(i) = soil_carbon_stable
1404 fastcpxy(i) = soil_carbon_fast
1405 xlaixy(i) = leaf_area_index
1406 xsaixy(i) = stem_area_index
1408 snowc(i) = snow_cover_fraction
1409 sncovr1(i) = snow_cover_fraction
1411 qsurf(i) = spec_humidity_surface
1414 tvxy(i) = temperature_leaf
1415 tgxy(i) = temperature_ground
1416 tahxy(i) = temperature_canopy_air
1417 eahxy(i) = vapor_pres_canopy_air
1418 emiss(i) = emissivity_total
1420 if(albedo_total > 0.0)
then
1421 sfalb(i) = albedo_total
1422 albdvis(i) = albedo_direct(1)
1423 albdnir(i) = albedo_direct(2)
1424 albivis(i) = albedo_diffuse(1)
1425 albinir(i) = albedo_diffuse(2)
1428 zsnsoxy(i,:) = interface_depth
1430 if(
present(canopy_heat_storage_ccpp )) canopy_heat_storage_ccpp(i) = canopy_heat_storage
1431 if(
present(rainfall_ccpp )) rainfall_ccpp(i) = rainfall
1432 if(
present(sw_absorbed_total_ccpp )) sw_absorbed_total_ccpp(i) = sw_absorbed_total
1433 if(
present(sw_reflected_total_ccpp )) sw_reflected_total_ccpp(i) = sw_reflected_total
1434 if(
present(lw_absorbed_total_ccpp )) lw_absorbed_total_ccpp(i) = lw_absorbed_total
1435 if(
present(temperature_bare_grd_ccpp )) temperature_bare_grd_ccpp(i) = temperature_bare_grd
1436 if(
present(temperature_veg_grd_ccpp )) temperature_veg_grd_ccpp(i) = temperature_veg_grd
1437 if(
present(temperature_veg_2m_ccpp )) temperature_veg_2m_ccpp(i) = temperature_veg_2m
1438 if(
present(temperature_bare_2m_ccpp )) temperature_bare_2m_ccpp(i) = temperature_bare_2m
1439 if(
present(spec_humidity_veg_2m_ccpp )) spec_humidity_veg_2m_ccpp(i) = spec_humidity_veg_2m
1440 if(
present(spec_humidity_bare_2m_ccpp)) spec_humidity_bare_2m_ccpp(i) = spec_humidity_bare_2m
1441 if(
present(sw_absorbed_veg_ccpp )) sw_absorbed_veg_ccpp(i) = sw_absorbed_veg
1442 if(
present(sw_absorbed_ground_ccpp )) sw_absorbed_ground_ccpp(i) = sw_absorbed_ground
1443 if(
present(snowmelt_out_ccpp )) snowmelt_out_ccpp(i) = snowmelt_out
1444 if(
present(snowmelt_shallow_ccpp )) snowmelt_shallow_ccpp(i) = snowmelt_shallow
1445 if(
present(albedo_direct_snow_ccpp )) albedo_direct_snow_ccpp(i,:) = albedo_direct_snow
1446 if(
present(albedo_diffuse_snow_ccpp )) albedo_diffuse_snow_ccpp(i,:) = albedo_diffuse_snow
1447 if(
present(ch_vegetated_ccpp )) ch_vegetated_ccpp(i) = ch_vegetated
1448 if(
present(ch_bare_ground_ccpp )) ch_bare_ground_ccpp(i) = ch_bare_ground
1449 if(
present(sensible_heat_grd_veg_ccpp)) sensible_heat_grd_veg_ccpp(i) = sensible_heat_grd_veg
1450 if(
present(sensible_heat_leaf_ccpp )) sensible_heat_leaf_ccpp(i) = sensible_heat_leaf
1451 if(
present(sensible_heat_grd_bar_ccpp)) sensible_heat_grd_bar_ccpp(i) = sensible_heat_grd_bar
1452 if(
present(latent_heat_grd_veg_ccpp )) latent_heat_grd_veg_ccpp(i) = latent_heat_grd_veg
1453 if(
present(latent_heat_grd_bare_ccpp )) latent_heat_grd_bare_ccpp(i) = latent_heat_grd_bare
1454 if(
present(ground_heat_veg_ccpp )) ground_heat_veg_ccpp(i) = ground_heat_veg
1455 if(
present(ground_heat_bare_ccpp )) ground_heat_bare_ccpp(i) = ground_heat_bare
1456 if(
present(lw_absorbed_grd_veg_ccpp )) lw_absorbed_grd_veg_ccpp(i) = lw_absorbed_grd_veg
1457 if(
present(lw_absorbed_leaf_ccpp )) lw_absorbed_leaf_ccpp(i) = lw_absorbed_leaf
1458 if(
present(lw_absorbed_grd_bare_ccpp )) lw_absorbed_grd_bare_ccpp(i) = lw_absorbed_grd_bare
1459 if(
present(latent_heat_trans_ccpp )) latent_heat_trans_ccpp(i) = latent_heat_trans
1460 if(
present(latent_heat_leaf_ccpp )) latent_heat_leaf_ccpp(i) = latent_heat_leaf
1461 if(
present(ch_leaf_ccpp )) ch_leaf_ccpp(i) = ch_leaf
1462 if(
present(ch_below_canopy_ccpp )) ch_below_canopy_ccpp(i) = ch_below_canopy
1463 if(
present(ch_vegetated_2m_ccpp )) ch_vegetated_2m_ccpp(i) = ch_vegetated_2m
1464 if(
present(ch_bare_ground_2m_ccpp )) ch_bare_ground_2m_ccpp(i) = ch_bare_ground_2m
1465 if(
present(precip_adv_heat_veg_ccpp )) precip_adv_heat_veg_ccpp(i) = precip_adv_heat_veg
1466 if(
present(precip_adv_heat_grd_v_ccpp)) precip_adv_heat_grd_v_ccpp(i) = precip_adv_heat_grd_v
1467 if(
present(precip_adv_heat_grd_b_ccpp)) precip_adv_heat_grd_b_ccpp(i) = precip_adv_heat_grd_b
1468 if(
present(spec_humid_sfc_veg_ccpp )) spec_humid_sfc_veg_ccpp(i) = spec_humid_sfc_veg
1469 if(
present(spec_humid_sfc_bare_ccpp )) spec_humid_sfc_bare_ccpp(i) = spec_humid_sfc_bare
1471 wslakexy(i) = lake_water
1472 fwetxy(i) = canopy_wet_fraction
1474 alboldxy(i) = snow_albedo_old
1475 sneqvoxy(i) = snow_water_equiv_old
1477 smcwtdxy(i) = soil_moisture_wtd
1478 deeprechxy(i) = deep_recharge
1479 rechxy(i) = recharge
1480 smoiseq(i,:) = eq_soil_water_vol
1482 stm(i) = (0.1*soil_moisture_vol(1) + &
1483 0.3*soil_moisture_vol(2) + &
1484 0.6*soil_moisture_vol(3) + &
1485 1.0*soil_moisture_vol(4))*1000.0
1487 wet1(i) = soil_moisture_vol(1) / smcmax_table(soil_category(1))
1488 smcwlt2(i) = smcdry_table(soil_category(1))
1489 smcref2(i) = smcref_table(soil_category(1))
1491 virtfac1 = 1.0 + con_fvirt * max(q1(i), 1.e-8)
1494 vptemp =temperature_forcing * prslki(i)*virtfac1
1496 vptemp =temperature_forcing /prslk1(i) * virtfac1
1500 tvs1 = tflux * virtfac1
1502 tvs1 = tflux/prsik1(i) * virtfac1
1505 z0_total = max(min(z0_total,forcing_height),1.0e-6)
1506 z0h_total = max(z0h_total,1.0e-6)
1509 tem1 = (z0_total - z0lo) / (z0up - z0lo)
1510 tem1 = min(max(tem1, 0.0_kind_phys), 1.0_kind_phys)
1511 tem2 = max(vegetation_fraction, 0.1_kind_phys)
1512 zvfun(i) = sqrt(tem1 * tem2)
1516 if ( iopt_sfc .ne. 4 )
then
1518 call gfs_stability &
1519 (zf(i), zvfun(i), gdx, virtual_temperature, vptemp,wind(i), z0_total, z0h_total, &
1520 tvs1, con_g, thsfc_loc, &
1521 rb1(i), fm1(i), fh1(i), fm101(i), fh21(i), cm(i), ch(i), stress1(i), ustar1(i))
1523 rmol1(i) = undefined
1524 flhc1(i) = undefined
1525 flqc1(i) = undefined
1527 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1528 cah_total = density * con_cp /rah_total
1535 qfx = evap(i) / con_hvap
1537 call sfcdif4(i_location ,j_location ,uwind_forcing ,vwind_forcing , &
1538 temperature_forcing, air_pressure_forcing ,air_pressure_surface , &
1539 pblhx,gdx,z0_total,con_fvirt,con_eps,con_cp,itime,snwdph(i),mnice, &
1540 psi_opt,surface_temperature, &
1541 spec_humidity_forcing,forcing_height,iz0tlnd,spec_humidity_surface,&
1542 sensible_heat_total,qfx,cm(i),ch(i),ch2,cq2,rmol1(i),ustar1(i), &
1543 rb1(i),fm1(i),fh1(i),stress1(i),fm101(i),fh21(i),wspd1,flhc1(i), &
1549 ch(i) = ch_vegetated * vegetation_fraction + ch_bare_ground*(1.0-vegetation_fraction)
1551 rah_total = max(1.0,1.0/( ch(i)*wind(i)) )
1552 cah_total = density * con_cp /rah_total
1563 chh(i) = chxy(i) * wind(i) * density
1564 cmm(i) = cmxy(i) * wind(i)
1566 snwdph(i) = snow_depth * 1000.0
1572 hflx(i) = hflx(i) / density / con_cp
1573 evap(i) = evap(i) / density / con_hvap
1578 potential_temperature = temperature_forcing * prslki(i)
1579 virtual_temperature = temperature_forcing * (1.0 + 0.61*spec_humidity_forcing)
1580 penman_radiation = sw_absorbed_total + radiation_lw_forcing
1581 dqsdt = spec_humidity_sat * a23m4/(temperature_forcing-a4)**2
1583 precip_freeze_frac_in = srflag(i)
1584 is_snowing = .false.
1585 is_freeze_rain = .false.
1586 if (precipitation_forcing > 0.0)
then
1587 if (precip_freeze_frac_in > 0.0)
then
1590 if (temperature_forcing <= 275.15) is_freeze_rain = .true.
1597 ch_noahmp = chxy(i) * wind(i)
1599 call penman (temperature_forcing, air_pressure_forcing , ch_noahmp , &
1600 virtual_temperature, potential_temperature, precipitation_forcing, &
1601 penman_radiation , ground_heat_total , spec_humidity_forcing, &
1602 spec_humidity_sat , potential_evaporation, is_snowing , &
1603 is_freeze_rain , precip_freeze_frac_in, dqsdt , &
1604 emissivity_total , snow_cover_fraction )
1606 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.