Skip to content

Commit 357a89b

Browse files
ldfowler58mgduda
authored andcommitted
* In ./src/core_atmosphere/physics and ./src/core_atmosphere/physics/physics_wrf,
updated the Noah land surface scheme to that from WRF-v4.5. note that to run this updated version of the Noah LSM, we also need to use the updated versions of GENPARM.TBL, LANDUSE.TBL, SOILPARM.TBL, and VEGPARM.TBL. These updated tables are obtained from the v8.0 tag in the MPAS-Data repository.
1 parent 54d9344 commit 357a89b

17 files changed

Lines changed: 3082 additions & 1212 deletions

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_driver_lsm.F

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ subroutine allocate_lsm(config_frac_seaice)
165165
if(.not.allocated(snowc_p) ) allocate(snowc_p(ims:ime,jms:jme) )
166166
if(.not.allocated(snowh_p) ) allocate(snowh_p(ims:ime,jms:jme) )
167167
if(.not.allocated(sr_p) ) allocate(sr_p(ims:ime,jms:jme) )
168+
if(.not.allocated(swddir_p) ) allocate(swddir_p(ims:ime,jms:jme) )
169+
if(.not.allocated(swddif_p) ) allocate(swddif_p(ims:ime,jms:jme) )
168170
if(.not.allocated(swdown_p) ) allocate(swdown_p(ims:ime,jms:jme) )
169171
if(.not.allocated(tmn_p) ) allocate(tmn_p(ims:ime,jms:jme) )
170172
if(.not.allocated(tsk_p) ) allocate(tsk_p(ims:ime,jms:jme) )
@@ -184,9 +186,6 @@ subroutine allocate_lsm(config_frac_seaice)
184186
if(.not.allocated(frc_urb_p) ) allocate(frc_urb_p(ims:ime,jms:jme) )
185187
if(.not.allocated(ust_urb_p) ) allocate(ust_urb_p(ims:ime,jms:jme) )
186188
if(.not.allocated(utype_urb_p) ) allocate(utype_urb_p(ims:ime,jms:jme) )
187-
if(.not.allocated(infxsrt_p) ) allocate(infxsrt_p(ims:ime,jms:jme) )
188-
if(.not.allocated(sfcheadrt_p) ) allocate(sfcheadrt_p(ims:ime,jms:jme) )
189-
if(.not.allocated(soldrain_p) ) allocate(soldrain_p(ims:ime,jms:jme) )
190189

191190
if(config_frac_seaice) then
192191
if(.not.allocated(tsk_sea) ) allocate(tsk_sea(ims:ime,jms:jme) )
@@ -253,6 +252,8 @@ subroutine deallocate_lsm(config_frac_seaice)
253252
if(allocated(snowc_p) ) deallocate(snowc_p )
254253
if(allocated(snowh_p) ) deallocate(snowh_p )
255254
if(allocated(sr_p) ) deallocate(sr_p )
255+
if(allocated(swddir_p) ) deallocate(swddir_p )
256+
if(allocated(swddif_p) ) deallocate(swddif_p )
256257
if(allocated(swdown_p) ) deallocate(swdown_p )
257258
if(allocated(tmn_p) ) deallocate(tmn_p )
258259
if(allocated(tsk_p) ) deallocate(tsk_p )
@@ -272,9 +273,6 @@ subroutine deallocate_lsm(config_frac_seaice)
272273
if(allocated(frc_urb_p) ) deallocate(frc_urb_p )
273274
if(allocated(ust_urb_p) ) deallocate(ust_urb_p )
274275
if(allocated(utype_urb_p) ) deallocate(utype_urb_p )
275-
if(allocated(infxsrt_p) ) deallocate(infxsrt_p )
276-
if(allocated(sfcheadrt_p) ) deallocate(sfcheadrt_p )
277-
if(allocated(soldrain_p) ) deallocate(soldrain_p )
278276

279277
if(config_frac_seaice) then
280278
if(allocated(chs_sea) ) deallocate(chs_sea )
@@ -317,8 +315,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
317315
real(kind=RKIND),dimension(:),pointer :: acsnom,acsnow,canwat,chs,chs2,chklowq,cpm,cqs2,glw, &
318316
grdflx,gsw,hfx,lai,lh,noahres,potevp,qfx,qgh,qsfc, &
319317
br,sfc_albedo,sfc_albedo_seaice,sfc_emibck,sfc_emiss, &
320-
sfcrunoff,smstav,smstot,snotime,snopcx,sr,udrunoff, &
321-
z0,znt
318+
sfcrunoff,smstav,smstot,snotime,snopcx,sr,swddif, &
319+
swddir,udrunoff,z0,znt
322320
real(kind=RKIND),dimension(:),pointer :: shdmin,shdmax,snoalb,sfc_albbck,snow,snowc,snowh,tmn, &
323321
skintemp,vegfra,xice,xland
324322
real(kind=RKIND),dimension(:),pointer :: t2m,th2m,q2
@@ -365,6 +363,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
365363
call mpas_pool_get_array(diag_physics,'smstot' ,smstot )
366364
call mpas_pool_get_array(diag_physics,'snotime' ,snotime )
367365
call mpas_pool_get_array(diag_physics,'snopcx' ,snopcx )
366+
call mpas_pool_get_array(diag_physics,'swddif' ,swddif )
367+
call mpas_pool_get_array(diag_physics,'swddir' ,swddir )
368368
call mpas_pool_get_array(diag_physics,'udrunoff' ,udrunoff )
369369
call mpas_pool_get_array(diag_physics,'z0' ,z0 )
370370
call mpas_pool_get_array(diag_physics,'znt' ,znt )
@@ -439,6 +439,8 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
439439
smstot_p(i,j) = smstot(i)
440440
snotime_p(i,j) = snotime(i)
441441
snopcx_p(i,j) = snopcx(i)
442+
swddif_p(i,j) = swddif(i)
443+
swddir_p(i,j) = swddir(i)
442444
udrunoff_p(i,j) = udrunoff(i)
443445
z0_p(i,j) = z0(i)
444446
znt_p(i,j) = znt(i)
@@ -472,13 +474,9 @@ subroutine lsm_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
472474
!initialization of arrays to run the Noah LSM urban parameterization (not currently
473475
frc_urb_p(i,j) = 0._RKIND
474476
ust_urb_p(i,j) = 0._RKIND
475-
utype_urb_p(i,j) = low_density_residential
477+
utype_urb_p(i,j) = 0
476478

477-
!initialization of arrays to run the Noah LSM hydrological parameterization (not currently
478-
!implemented in MPAS):
479-
infxsrt_p(i,j) = 0._RKIND
480-
sfcheadrt_p(i,j) = 0._RKIND
481-
soldrain_p(i,j) = 0._RKIND
479+
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)/))
482480
enddo
483481
enddo
484482

@@ -838,18 +836,21 @@ subroutine driver_lsm(itimestep,configs,mesh,diag_physics,sfc_input,its,ite)
838836
opt_thcnd = opt_thcnd , ua_phys = ua_phys , flx4_2d = flxsnow_p , &
839837
fvb_2d = fvbsnow_p , fbur_2d = fbursnow_p , fgsn_2d = fgsnsnow_p , &
840838
utype_urb2d = utype_urb_p , frc_urb2d = frc_urb_p , ust_urb2d = ust_urb_p , &
841-
infxsrt = infxsrt_p , sfcheadrt = sfcheadrt_p , soldrain = soldrain_p , &
842-
fasdas = fasdas , julian = 0 , julyr = 0 , &
839+
swddir = swddir_p , swddif = swddif_p , fasdas = fasdas , &
840+
julian = 0 , julyr = 0 , &
841+
num_soil_layers = num_soils , &
843842
xice_threshold = xice_threshold , &
844843
usemonalb = config_sfc_albedo , &
845-
mminlu = mminlu , &
846-
num_soil_layers = num_soils , &
847-
num_roof_layers = num_soils , &
848-
num_wall_layers = num_soils , &
849-
num_road_layers = num_soils , &
850-
num_urban_layers = num_soils , &
851-
num_urban_hi = num_soils , &
852-
sf_urban_physics = sf_urban_physics , &
844+
mminlu = mminlu , &
845+
sf_urban_physics = sf_urban_physics , &
846+
num_roof_layers = nurb , num_wall_layers = nurb , &
847+
num_road_layers = nurb , num_urban_hi = nurb , &
848+
num_urban_ndm = nurb , urban_map_zrd = nurb , &
849+
urban_map_zwd = nurb , urban_map_gd = nurb , &
850+
urban_map_zd = nurb , urban_map_zdf = nurb , &
851+
urban_map_bd = nurb , urban_map_wd = nurb , &
852+
urban_map_gbd = nurb , urban_map_fbd = nurb , &
853+
urban_map_zgrd = nurb , &
853854
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
854855
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
855856
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
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+

src/core_atmosphere/physics/mpas_atmphys_landuse.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ subroutine landuse_init_forMPAS(dminfo,julday,mesh,configs,diag_physics,sfc_inpu
210210
therin(ic,is),scfx(ic,is),sfhc(ic,is)
211211
enddo
212212
! do ic = 1, lucats
213-
! call mpas_log_write('$i $r $r $r $r $r $r $r $r', intArgs=(/ic/), &
213+
! call mpas_log_write('$i $r $r $r $r $r $r $r', intArgs=(/ic/), &
214214
! realArgs=(/albd(ic,is),slmo(ic,is),sfem(ic,is),sfz0(ic,is), &
215215
! therin(ic,is),scfx(ic,is),sfhc(ic,is)/))
216216
! enddo

src/core_atmosphere/physics/mpas_atmphys_lsm_noahinit.F

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,13 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
215215
character(len=*),intent(inout):: mminlu, mminsl
216216

217217
!local variables:
218-
character*128:: mess , message
218+
character*128:: mess,message
219+
character*128:: astring
219220

220-
integer,parameter:: open_ok = 0
221+
integer,parameter:: open_ok = 0
222+
integer,parameter:: loop_max = 10
221223
integer:: lumatch,iindex,lc,num_slope
222-
integer:: read_unit, istat
224+
integer:: istat,loop_count,read_unit
223225

224226
!-----SPECIFY VEGETATION RELATED CHARACTERISTICS :
225227
!ALBBCK: SFC albedo (in percentage)
@@ -261,8 +263,10 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
261263
'failure opening VEGPARM.TBL')
262264

263265
lumatch=0
266+
267+
loop_count = 0
268+
read(read_unit,fmt='(A)',end=2002) astring
264269
find_lutype : do while (lumatch == 0)
265-
read(read_unit,*,end=2002)
266270
read(read_unit,*,end=2002) lutype
267271
read(read_unit,*) lucats,iindex
268272

@@ -272,10 +276,17 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
272276
call physics_message(mess)
273277
lumatch=1
274278
else
279+
loop_count = loop_count + 1
275280
call physics_message(' skipping over lutype = ' // trim ( lutype ))
276-
do lc = 1, lucats+20
277-
read(read_unit,*)
278-
enddo
281+
282+
find_vegetation_parameter_flag: do
283+
read(read_unit,fmt='(A)',end=2002) astring
284+
if(astring(1:21) .eq. 'Vegetation Parameters') then
285+
exit find_vegetation_parameter_flag
286+
elseif(loop_count .ge. loop_max) then
287+
call physics_error_fatal('too many loops in VEGPARM.TBL')
288+
endif
289+
enddo find_vegetation_parameter_flag
279290
endif
280291
enddo find_lutype
281292

@@ -307,6 +318,7 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
307318
albedomintbl(lc),albedomaxtbl(lc),z0mintbl(lc),z0maxtbl(lc),ztopvtbl(lc), &
308319
zbotvtbl(lc)
309320
enddo
321+
310322
read (read_unit,*)
311323
read (read_unit,*)topt_data
312324
read (read_unit,*)
@@ -322,11 +334,27 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
322334
read (read_unit,*)
323335
read (read_unit,*)
324336
read (read_unit,*)
325-
read (read_unit,*)low_density_residential
337+
read (read_unit,*)lcz_1
338+
read (read_unit,*)
339+
read (read_unit,*)lcz_2
340+
read (read_unit,*)
341+
read (read_unit,*)lcz_3
342+
read (read_unit,*)
343+
read (read_unit,*)lcz_4
344+
read (read_unit,*)
345+
read (read_unit,*)lcz_5
346+
read (read_unit,*)
347+
read (read_unit,*)lcz_6
348+
read (read_unit,*)
349+
read (read_unit,*)lcz_7
350+
read (read_unit,*)
351+
read (read_unit,*)lcz_8
352+
read (read_unit,*)
353+
read (read_unit,*)lcz_9
326354
read (read_unit,*)
327-
read (read_unit,*)high_density_residential
355+
read (read_unit,*)lcz_10
328356
read (read_unit,*)
329-
read (read_unit,*)high_intensity_industrial
357+
read (read_unit,*)lcz_11
330358
endif
331359

332360
2002 continue
@@ -364,9 +392,17 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
364392
DM_BCAST_REAL(rsmax_data)
365393
DM_BCAST_INTEGER(bare)
366394
DM_BCAST_INTEGER(natural)
367-
DM_BCAST_INTEGER(low_density_residential)
368-
DM_BCAST_INTEGER(high_density_residential)
369-
DM_BCAST_INTEGER(high_intensity_industrial)
395+
DM_BCAST_INTEGER(lcz_1)
396+
DM_BCAST_INTEGER(lcz_2)
397+
DM_BCAST_INTEGER(lcz_3)
398+
DM_BCAST_INTEGER(lcz_4)
399+
DM_BCAST_INTEGER(lcz_5)
400+
DM_BCAST_INTEGER(lcz_6)
401+
DM_BCAST_INTEGER(lcz_7)
402+
DM_BCAST_INTEGER(lcz_8)
403+
DM_BCAST_INTEGER(lcz_9)
404+
DM_BCAST_INTEGER(lcz_10)
405+
DM_BCAST_INTEGER(lcz_11)
370406

371407
!call mpas_log_write(' LUTYPE = '//trim(lutype))
372408
!call mpas_log_write(' LUCATS = $i',intArgs=(/lucats/))
@@ -379,16 +415,24 @@ subroutine soil_veg_gen_parm(dminfo,mminlu,mminsl)
379415
!call mpas_log_write(' RSMAX_DATA = $r',realArgs=(/rsmax_data/))
380416
!call mpas_log_write(' BARE = $i',intArgs=(/bare/))
381417
!call mpas_log_write(' NATURAL = $i',intArgs=(/natural/))
382-
!call mpas_log_write(' LOW_DENSITY_RESIDENTIAL = $i , intArgs=(/low_density_residential/))
383-
!call mpas_log_write(' HIGH_DENSITY_RESIDENTIAL = $i , intArgs=(/high_density_residential/))
384-
!call mpas_log_write(' HIGH_DENSITY_INDUSTRIAL = $i , intArgs=(/high_density_industrial/))
418+
!call mpas_log_write(' LCZ_1 = $i', intArgs=(/lcz_1/))
419+
!call mpas_log_write(' LCZ_2 = $i', intArgs=(/lcz_2/))
420+
!call mpas_log_write(' LCZ_3 = $i', intArgs=(/lcz_3/))
421+
!call mpas_log_write(' LCZ_4 = $i', intArgs=(/lcz_4/))
422+
!call mpas_log_write(' LCZ_5 = $i', intArgs=(/lcz_5/))
423+
!call mpas_log_write(' LCZ_6 = $i', intArgs=(/lcz_6/))
424+
!call mpas_log_write(' LCZ_7 = $i', intArgs=(/lcz_7/))
425+
!call mpas_log_write(' LCZ_8 = $i', intArgs=(/lcz_8/))
426+
!call mpas_log_write(' LCZ_9 = $i', intArgs=(/lcz_9/))
427+
!call mpas_log_write(' LCZ_10 = $i', intArgs=(/lcz_10/))
428+
!call mpas_log_write(' LCZ_11 = $i', intArgs=(/lcz_11/))
385429
!call mpas_log_write('')
386430
!do lc = 1, lucats
387431
! call mpas_log_write('$i $r $r $r $r $r $r $r $r $r $r $r $r $r $r $r $r $r', intArgs=(/lc/), &
388432
! realArgs=(/shdtbl(lc),float(nrotbl(lc)),rstbl(lc),rgltbl(lc),hstbl(lc),snuptbl(lc), &
389433
! maxalb(lc),laimintbl(lc),laimaxtbl(lc),emissmintbl(lc),emissmaxtbl(lc), &
390434
! albedomintbl(lc),albedomaxtbl(lc),z0mintbl(lc),z0maxtbl(lc),ztopvtbl(lc), &
391-
! zbottvtbl(lc)/))
435+
! zbotvtbl(lc)/))
392436
!enddo
393437
call mpas_log_write(' end read VEGPARM.TBL')
394438

src/core_atmosphere/physics/mpas_atmphys_vars.F

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ module mpas_atmphys_vars
649649
!=================================================================================================================
650650

651651
logical,parameter:: &
652-
ua_phys=.false. !option to activate UA Noah changes: a different snow-cover physics in the land-surface
652+
ua_phys = .false. !option to activate UA Noah changes: a different snow-cover physics in the land-surface
653653
!scheme. That option is not currently implemented in MPAS.
654654

655655
integer,parameter:: &
@@ -660,6 +660,9 @@ module mpas_atmphys_vars
660660
integer,parameter:: &
661661
fasdas = 0 !for WRF surface data assimilation system (not used in MPAS).
662662

663+
integer,parameter:: &
664+
nurb = 1 !generic dimension for all dimensions needed to run the urban physics.
665+
663666
integer,public:: &
664667
sf_surface_physics !used to define the land surface scheme by a number instead of name. It
665668
!is only needed in module_ra_rrtmg_sw.F to define the spectral surface
@@ -728,13 +731,6 @@ module mpas_atmphys_vars
728731
frc_urb_p, &!urban fraction [-]
729732
ust_urb_p !urban u* in similarity theory [m/s]
730733

731-
!.. arrays needed in the argument list in the call to the Noah LSM hydrology model: note that these arrays are
732-
!.. initialized to zero since we do not run a hydrology model:
733-
real(kind=RKIND),dimension(:,:),allocatable:: &
734-
infxsrt_p, &!timestep infiltration excess [mm]
735-
sfcheadrt_p, &!surface water detph [mm]
736-
soldrain_p !soil column drainage [mm]
737-
738734
!=================================================================================================================
739735
!.. variables and arrays related to surface characteristics:
740736
!=================================================================================================================

src/core_atmosphere/physics/physics_wrf/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dummy:
77

88
OBJS = \
99
libmassv.o \
10+
module_bep_bem_helper.o \
1011
module_bl_gwdo.o \
1112
module_bl_mynn.o \
1213
module_bl_ysu.o \
@@ -69,9 +70,11 @@ module_ra_rrtmg_sw.o: \
6970
module_ra_rrtmg_vinterp.o
7071

7172
module_sf_bep.o: \
73+
module_bep_bem_helper.o \
7274
module_sf_urban.o
7375

7476
module_sf_bep_bem.o: \
77+
module_bep_bem_helper.o \
7578
module_sf_bem.o \
7679
module_sf_urban.o
7780

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MODULE module_bep_bem_helper
2+
integer, save :: nurbm ! Maximum number of urban classes
3+
CONTAINS
4+
END MODULE module_bep_bem_helper

0 commit comments

Comments
 (0)