@@ -96,6 +96,8 @@ module mpas_atmphys_driver_lsm
9696! * the initialization of the variable albsi_p is switched from sfc_albedo_seaice (which is originally
9797! initialized to albbck to seaice_albedo_default. Note that albsi_p is not used if seaice_albedo_opt = 0 .
9898! Laura D. Fowler (laura@ucar.edu) / 2020-05-10 .
99+ ! * replaced the option " noah" with " sf_noah" to run the NOAH land surface scheme.
100+ ! Laura D. Fowler (laura@ucar.edu) / 2022-02-18 .
99101
100102
101103!
@@ -166,6 +168,8 @@ subroutine allocate_lsm(config_frac_seaice)
166168 if (.not. allocated(snowc_p) ) allocate(snowc_p(ims:ime,jms:jme) )
167169 if (.not. allocated(snowh_p) ) allocate(snowh_p(ims:ime,jms:jme) )
168170 if (.not. allocated(sr_p) ) allocate(sr_p(ims:ime,jms:jme) )
171+ if (.not. allocated(swddir_p) ) allocate(swddir_p(ims:ime,jms:jme) )
172+ if (.not. allocated(swddif_p) ) allocate(swddif_p(ims:ime,jms:jme) )
169173 if (.not. allocated(swdown_p) ) allocate(swdown_p(ims:ime,jms:jme) )
170174 if (.not. allocated(tmn_p) ) allocate(tmn_p(ims:ime,jms:jme) )
171175 if (.not. allocated(tsk_p) ) allocate(tsk_p(ims:ime,jms:jme) )
@@ -185,9 +189,6 @@ subroutine allocate_lsm(config_frac_seaice)
185189 if (.not. allocated(frc_urb_p) ) allocate(frc_urb_p(ims:ime,jms:jme) )
186190 if (.not. allocated(ust_urb_p) ) allocate(ust_urb_p(ims:ime,jms:jme) )
187191 if (.not. allocated(utype_urb_p) ) allocate(utype_urb_p(ims:ime,jms:jme) )
188- if (.not. allocated(infxsrt_p) ) allocate(infxsrt_p(ims:ime,jms:jme) )
189- if (.not. allocated(sfcheadrt_p) ) allocate(sfcheadrt_p(ims:ime,jms:jme) )
190- if (.not. allocated(soldrain_p) ) allocate(soldrain_p(ims:ime,jms:jme) )
191192
192193 if (config_frac_seaice) then
193194 if (.not. allocated(tsk_sea) ) allocate(tsk_sea(ims:ime,jms:jme) )
@@ -254,6 +255,8 @@ subroutine deallocate_lsm(config_frac_seaice)
254255 if (allocated(snowc_p) ) deallocate(snowc_p )
255256 if (allocated(snowh_p) ) deallocate(snowh_p )
256257 if (allocated(sr_p) ) deallocate(sr_p )
258+ if (allocated(swddir_p) ) deallocate(swddir_p )
259+ if (allocated(swddif_p) ) deallocate(swddif_p )
257260 if (allocated(swdown_p) ) deallocate(swdown_p )
258261 if (allocated(tmn_p) ) deallocate(tmn_p )
259262 if (allocated(tsk_p) ) deallocate(tsk_p )
@@ -273,9 +276,6 @@ subroutine deallocate_lsm(config_frac_seaice)
273276 if (allocated(frc_urb_p) ) deallocate(frc_urb_p )
274277 if (allocated(ust_urb_p) ) deallocate(ust_urb_p )
275278 if (allocated(utype_urb_p) ) deallocate(utype_urb_p )
276- if (allocated(infxsrt_p) ) deallocate(infxsrt_p )
277- if (allocated(sfcheadrt_p) ) deallocate(sfcheadrt_p )
278- if (allocated(soldrain_p) ) deallocate(soldrain_p )
279279
280280 if (config_frac_seaice) then
281281 if (allocated(chs_sea) ) deallocate(chs_sea )
@@ -318,7 +318,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
318318 real (kind= RKIND),dimension (:),pointer :: acsnom,acsnow,canwat,chs,chs2,chklowq,cpm,cqs2,glw, &
319319 grdflx,gsw,hfx,lai,lh,noahres,potevp,qfx,qgh,qsfc, &
320320 br,sfc_albedo,sfc_emibck,sfc_emiss,sfcrunoff,smstav, &
321- smstot,snotime,snopcx,sr,udrunoff,z0,znt
321+ smstot,snotime,snopcx,sr,swddif,swddir,udrunoff, &
322+ z0,znt
322323 real (kind= RKIND),dimension (:),pointer :: shdmin,shdmax,snoalb,sfc_albbck,snow,snowc,snowh,tmn, &
323324 skintemp,vegfra,xice,xland
324325 real (kind= RKIND),dimension (:),pointer :: t2m,th2m,q2
@@ -364,6 +365,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
364365 call mpas_pool_get_array(diag_physics,' smstot' ,smstot )
365366 call mpas_pool_get_array(diag_physics,' snotime' ,snotime )
366367 call mpas_pool_get_array(diag_physics,' snopcx' ,snopcx )
368+ call mpas_pool_get_array(diag_physics,' swddif' ,swddif )
369+ call mpas_pool_get_array(diag_physics,' swddir' ,swddir )
367370 call mpas_pool_get_array(diag_physics,' udrunoff' ,udrunoff )
368371 call mpas_pool_get_array(diag_physics,' z0' ,z0 )
369372 call mpas_pool_get_array(diag_physics,' znt' ,znt )
@@ -438,6 +441,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
438441 smstot_p(i,j) = smstot(i)
439442 snotime_p(i,j) = snotime(i)
440443 snopcx_p(i,j) = snopcx(i)
444+ swddif_p(i,j) = swddif(i)
445+ swddir_p(i,j) = swddir(i)
441446 udrunoff_p(i,j) = udrunoff(i)
442447 z0_p(i,j) = z0(i)
443448 znt_p(i,j) = znt(i)
@@ -471,13 +476,9 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
471476 !initialization of arrays to run the Noah LSM urban parameterization (not currently
472477 frc_urb_p(i,j) = 0._RKIND
473478 ust_urb_p(i,j) = 0._RKIND
474- utype_urb_p(i,j) = low_density_residential
479+ utype_urb_p(i,j) = 0
475480
476- !initialization of arrays to run the Noah LSM hydrological parameterization (not currently
477- !implemented in MPAS):
478- infxsrt_p(i,j) = 0._RKIND
479- sfcheadrt_p(i,j) = 0._RKIND
480- soldrain_p(i,j) = 0._RKIND
481+ if (swddir_p(i,j).gt. 0 .) call mpas_log_write(' --- sw: $i $r $r' ,intArgs= (/ i/ ),realArgs= (/ swddir_p(i,j),swddif_p(i,j)/ ))
481482 enddo
482483 enddo
483484
@@ -762,7 +763,7 @@ subroutine init_lsm(dminfo,mesh,configs,diag_physics,sfc_input)
762763
763764 lsm_select: select case (trim (lsm_scheme))
764765
765- case (" noah " )
766+ case (" sf_noah " )
766767 call noah_init_forMPAS(dminfo,mesh,configs,diag_physics,sfc_input)
767768
768769 case default
@@ -809,8 +810,8 @@ subroutine driver_lsm(itimestep,configs,mesh,diag_physics,sfc_input,its,ite)
809810!call to land- surface scheme:
810811 lsm_select: select case (trim (lsm_scheme))
811812
812- case(" noah " )
813- call mpas_timer_start(' Noah ' )
813+ case(" sf_noah " )
814+ call mpas_timer_start(' sf_noah ' )
814815 call lsm( &
815816 dz8w = dz_p , p8w3d = pres2_hyd_p , t3d = t_p , &
816817 qv3d = qv_p , xland = xland_p , xice = xice_p , &
@@ -837,18 +838,21 @@ subroutine driver_lsm(itimestep,configs,mesh,diag_physics,sfc_input,its,ite)
837838 opt_thcnd = opt_thcnd , ua_phys = ua_phys , flx4_2d = flxsnow_p , &
838839 fvb_2d = fvbsnow_p , fbur_2d = fbursnow_p , fgsn_2d = fgsnsnow_p , &
839840 utype_urb2d = utype_urb_p , frc_urb2d = frc_urb_p , ust_urb2d = ust_urb_p , &
840- infxsrt = infxsrt_p , sfcheadrt = sfcheadrt_p , soldrain = soldrain_p , &
841- fasdas = fasdas , julian = 0 , julyr = 0 , &
841+ swddir = swddir_p , swddif = swddif_p , fasdas = fasdas , &
842+ julian = 0 , julyr = 0 , &
843+ num_soil_layers = num_soils , &
842844 xice_threshold = xice_threshold , &
843845 usemonalb = config_sfc_albedo , &
844- mminlu = mminlu , &
845- num_soil_layers = num_soils , &
846- num_roof_layers = num_soils , &
847- num_wall_layers = num_soils , &
848- num_road_layers = num_soils , &
849- num_urban_layers = num_soils , &
850- num_urban_hi = num_soils , &
851- sf_urban_physics = sf_urban_physics , &
846+ mminlu = mminlu , &
847+ sf_urban_physics = sf_urban_physics , &
848+ num_roof_layers = nurb , num_wall_layers = nurb , &
849+ num_road_layers = nurb , num_urban_hi = nurb , &
850+ num_urban_ndm = nurb , urban_map_zrd = nurb , &
851+ urban_map_zwd = nurb , urban_map_gd = nurb , &
852+ urban_map_zd = nurb , urban_map_zdf = nurb , &
853+ urban_map_bd = nurb , urban_map_wd = nurb , &
854+ urban_map_gbd = nurb , urban_map_fbd = nurb , &
855+ urban_map_zgrd = nurb , &
852856 ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
853857 ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
854858 its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
@@ -895,7 +899,7 @@ subroutine driver_lsm(itimestep,configs,mesh,diag_physics,sfc_input,its,ite)
895899 ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
896900 its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
897901 )
898- call mpas_timer_stop(' Noah ' )
902+ call mpas_timer_stop(' sf_noah ' )
899903
900904
901905 case default
0 commit comments