Skip to content

Commit 89f7eaf

Browse files
committed
Merge branch 'MPAS-v8.0/sf_noah' into develop (PR #1049)
This merge updates the Noah land surface model to match what is available in the WRF v4.5 release. Specifically, this merge makes the following changes: * The variables swddir, swddni, and swddif from module_ra_rrtmg_sw.F are now output; these variables are only used for the urban option BEP+BEM and not the Noah LSM itself. * In the namelist.atmosphere file, the namelist option config_lsm_scheme now uses "sf_noah" rather than "noah" to select the Noah LSM. * All code modules needed to run the Noah LSM have been updated to match what is available in the WRF v4.5 release. As part of this update, various code used only by urban options has also been introduced.
2 parents da19bff + 357a89b commit 89f7eaf

22 files changed

Lines changed: 3158 additions & 1225 deletions

src/core_atmosphere/Registry.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,15 @@
26692669
<var name="acswuptc" type="real" dimensions="nCells Time" units="W m^{-2}"
26702670
description="accumulated clear-sky upward top-of-atmosphere shortwave radiation flux"/>
26712671

2672+
<var name="swddir" type="real" dimensions="nCells Time" units="W m^{-2}"
2673+
description="shortwave surface downward direct irradiance"/>
2674+
2675+
<var name="swddni" type="real" dimensions="nCells Time" units="W m^{-2}"
2676+
description="shortwave surface downward direct normal irradiance"/>
2677+
2678+
<var name="swddif" type="real" dimensions="nCells Time" units="W m^{-2}"
2679+
description="shortwave surface downward diffuse irradiance"/>
2680+
26722681
<var name="gsw" type="real" dimensions="nCells Time" units="W m^{-2}"
26732682
description="net surface shortwave radiation flux"/>
26742683

src/core_atmosphere/physics/checkout_data_files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
################################################################################
2424

2525

26-
mpas_vers="7.0"
26+
mpas_vers="8.0"
2727

2828
github_org="MPAS-Dev" # GitHub organization where the MPAS-Data repository is found.
2929
# For physics development, it can be helpful for a developer

src/core_atmosphere/physics/mpas_atmphys_control.F

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ module mpas_atmphys_control
7474
! Laura D. Fowler (laura@ucar.edu) / 2016-12-30.
7575
! * added the option sf_monin_obukhov_rev to run the revised surface layer scheme with the YSU PBL scheme.
7676
! Laura D. Fowler (laura@ucar.edu) / 2023-05-15.
77+
! * replaced the option "noah" with "sf_noah" to run the NOAH land surface scheme.
78+
! Laura D. Fowler (laura@ucar.edu) / 2022-02-18.
7779

7880

7981
contains
@@ -129,7 +131,7 @@ subroutine physics_namelist_check(configs)
129131
if (trim(config_radt_sw_scheme) == 'suite') config_radt_sw_scheme = 'rrtmg_sw'
130132
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
131133
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_monin_obukhov'
132-
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
134+
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'sf_noah'
133135

134136
else if (trim(config_physics_suite) == 'convection_permitting') then
135137

@@ -141,7 +143,7 @@ subroutine physics_namelist_check(configs)
141143
if (trim(config_radt_sw_scheme) == 'suite') config_radt_sw_scheme = 'rrtmg_sw'
142144
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
143145
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_mynn'
144-
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
146+
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'sf_noah'
145147

146148
else if (trim(config_physics_suite) == 'none') then
147149

@@ -286,7 +288,7 @@ subroutine physics_namelist_check(configs)
286288
'set config_sfclayer_scheme different than off')
287289

288290
elseif(.not. (config_lsm_scheme .eq. 'off ' .or. &
289-
config_lsm_scheme .eq. 'noah')) then
291+
config_lsm_scheme .eq. 'sf_noah')) then
290292

291293
write(mpas_err_message,'(A,A10)') 'illegal value for land surface scheme: ', &
292294
trim(config_lsm_scheme)
@@ -357,7 +359,7 @@ subroutine physics_registry_init(mesh,configs,sfc_input)
357359

358360
lsm_select: select case(trim(config_lsm_scheme))
359361

360-
case("noah")
362+
case("sf_noah")
361363
!initialize the thickness of the soil layers for the Noah scheme:
362364
do iCell = 1, nCells
363365
dzs(1,iCell) = 0.10_RKIND

src/core_atmosphere/physics/mpas_atmphys_driver_lsm.F

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -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
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
! Copyright (c) 2013, Los Alamos National Security, LLC (LANS)
2+
! and the University Corporation for Atmospheric Research (UCAR).
3+
!
4+
! Unless noted otherwise source code is licensed under the BSD license.
5+
! Additional copyright and license information can be found in the LICENSE file
6+
! distributed with this code, or at http://mpas-dev.github.com/license.html
7+
!
8+
!=================================================================================================================
9+
module mpas_atmphys_driver_lsm_shared
10+
use mpas_kind_types
11+
12+
13+
implicit none
14+
private
15+
public:: correct_tsk_over_seaice
16+
17+
18+
contains
19+
20+
21+
!=================================================================================================================
22+
subroutine correct_tsk_over_seaice(ims,ime,jms,jme,its,ite,jts,jte,xice_thresh,xice,tsk,tsk_sea,tsk_ice)
23+
!=================================================================================================================
24+
25+
!input arguments:
26+
integer,intent(in):: ims,ime,its,ite,jms,jme,jts,jte
27+
real(kind=RKIND),intent(in):: xice_thresh
28+
real(kind=RKIND),intent(in),dimension(ims:ime,jms:jme):: tsk,xice
29+
30+
!inout arguments:
31+
real(kind=RKIND),intent(inout),dimension(ims:ime,jms:jme):: tsk_sea,tsk_ice
32+
33+
!local variables:
34+
integer:: i,j
35+
36+
!-----------------------------------------------------------------------------------------------------------------
37+
38+
!initialize the local sea-surface temperature and local sea-ice temperature to the local surface
39+
!temperature:
40+
do j = jts,jte
41+
do i = its,ite
42+
tsk_sea(i,j) = tsk(i,j)
43+
tsk_ice(i,j) = tsk(i,j)
44+
45+
if(xice(i,j).ge.xice_thresh .and. xice(i,j).le.1._RKIND) then
46+
!over sea-ice grid cells, limit sea-surface temperatures to temperatures warmer than 271.4:
47+
tsk_sea(i,j) = max(tsk_sea(i,j),271.4_RKIND)
48+
49+
!over sea-ice grid cells, avoids unphysically too cold sea-ice temperatures for grid cells
50+
!with small sea-ice fractions:
51+
if(xice(i,j).lt.0.2_RKIND .and. tsk_ice(i,j).lt.253.15_RKIND) tsk_ice(i,j) = 253.15_RKIND
52+
if(xice(i,j).lt.0.1_RKIND .and. tsk_ice(i,j).lt.263.15_RKIND) tsk_ice(i,j) = 263.15_RKIND
53+
endif
54+
enddo
55+
enddo
56+
57+
end subroutine correct_tsk_over_seaice
58+
59+
!=================================================================================================================
60+
end module mpas_atmphys_driver_lsm_shared
61+
!=================================================================================================================
62+
63+
64+
65+

0 commit comments

Comments
 (0)