Skip to content

Commit 43f47c0

Browse files
committed
Add the Pleim surface layer scheme to MPAS-A
This EPA_PXsfclay commit will add the Pleim surface layer scheme (Pleim, 2006) to MPAS-A as a new "config_sfclayer_scheme" option called "sf_pxsfclay". The Pleim surface layer scheme code (module_sf_pxsfclay.F) was migrated from WRFV4.4.1 with only minor changes and has been generalized to work with either MPAS or WRF. Note that this implementation of the Pleim surface layer in MPAS-A does not yet support fractional sea ice, in contrast to the other available surface layer schemes. The Pleim surface layer works with any LSM or PBL scheme, but is normally used in conjunction with the PX LSM and the ACM2 PBL. Refer to the description in the WRF-ARW technical document available at https://opensky.ucar.edu/islandora/object/opensky:2898 for an overview of the physics behind this option. New file: src/core_atmosphere/physics/physics_wrf/module_sf_pxsfclay.F Modified files: Makefile src/core_atmosphere/Registry.xml src/core_atmosphere/physics/mpas_atmphys_control.F src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F src/core_atmosphere/physics/physics_wrf/Makefile These EPA_PXsfclay code changes to MPAS-A are based on the 22 August 2022 "develop" branch of MPAS v7.3. Reference: Pleim, J. E., 2006: A simple, efficient solution of flux-profile relationships in the atmospheric surface layer, J. Appl. Meteor. Climatol., 45, 341347, https://doi.org/10.1175/JAM2339.1.
1 parent a0323b9 commit 43f47c0

6 files changed

Lines changed: 704 additions & 10 deletions

File tree

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library
300300
"CC_SERIAL = icc" \
301301
"CXX_SERIAL = icpc" \
302302
"FFLAGS_PROMOTION = -real-size 64" \
303-
"FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
304-
"CFLAGS_OPT = -O3" \
305-
"CXXFLAGS_OPT = -O3" \
303+
"FFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback -no-wrap-margin -convert big_endian -free -align array64byte" \
304+
"CFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
305+
"CXXFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
306306
"LDFLAGS_OPT = -O3" \
307-
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \
307+
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback -no-wrap-margin" \
308308
"CFLAGS_DEBUG = -g -traceback" \
309309
"CXXFLAGS_DEBUG = -g -traceback" \
310310
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
@@ -660,7 +660,7 @@ ifneq "$(LAPACK)" ""
660660
endif
661661

662662
RM = rm -f
663-
CPP = cpp -P -traditional
663+
CPP = ${CXX_SERIAL} -E # Modified for use with the Intel C++ compiler
664664
RANLIB = ranlib
665665

666666
ifdef CORE
@@ -875,7 +875,7 @@ ifeq "$(findstring clean, $(MAKECMDGOALS))" "clean" # CHECK FOR CLEAN TARGET
875875
override AUTOCLEAN=false
876876
endif # END OF CLEAN TARGET CHECK
877877

878-
VER=$(shell git describe --dirty 2> /dev/null)
878+
VER="v7.3.develop.EPA_PXsfclay" # Hard-coded specific version identifier
879879
#override CPPFLAGS += -DMPAS_GIT_VERSION=$(VER)
880880

881881
ifeq "$(findstring v, $(VER))" "v"

src/core_atmosphere/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@
20492049
<nml_option name="config_sfclayer_scheme" type="character" default_value="suite" in_defaults="false"
20502050
units="-"
20512051
description="configuration for surface layer-scheme"
2052-
possible_values="`suite',`sf_monin_obukhov',`sf_mynn',`off'"/>
2052+
possible_values="`suite',`sf_monin_obukhov',`sf_mynn',`sf_pxsfclay',`off'"/>
20532053

20542054
<nml_option name="config_gfconv_closure_deep" type="integer" default_value="0" in_defaults="false"
20552055
units="-"

src/core_atmosphere/physics/mpas_atmphys_control.F

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ module mpas_atmphys_control
5959
! Laura D. Fowler (laura@ucar.edu) / 2016-03-31.
6060
! * added the options sf_mynn and bl_mynn and for the MYNN parameterization from WRF version 3.6.1.
6161
! Laura D. Fowler (laura@ucar.edu) / 2016-04-11.
62+
! * added Pleim surface layer scheme option sf_pxsfclay.
63+
! Robert Gilliam (gilliam.robert@epa.gov) / 2016-09-19.
6264
! * added the option cu_ntiedtke for the "new" Tiedtke parameterization of convection from WRF version 3.8.1.
6365
! Laura D. Fowler (laura@ucar.edu) / 2016-09-19.
6466
! * added the physics suite "convection_scale_aware" (see below for the physics options used in the suite).
@@ -257,12 +259,13 @@ subroutine physics_namelist_check(configs)
257259
!surface-layer scheme:
258260
if(.not. (config_sfclayer_scheme .eq. 'off' .or. &
259261
config_sfclayer_scheme .eq. 'sf_mynn' .or. &
260-
config_sfclayer_scheme .eq. 'sf_monin_obukhov')) then
262+
config_sfclayer_scheme .eq. 'sf_monin_obukhov' .or. &
263+
config_sfclayer_scheme .eq. 'sf_pxsfclay')) then
261264

262265
write(mpas_err_message,'(A,A10)') 'illegal value for surface layer scheme: ', &
263266
trim(config_sfclayer_scheme)
264267
call physics_error_fatal(mpas_err_message)
265-
else
268+
else if(config_sfclayer_scheme .ne. 'sf_pxsfclay') then
266269
if(config_pbl_scheme == 'bl_mynn') then
267270
config_sfclayer_scheme = 'sf_mynn'
268271
elseif(config_pbl_scheme == 'bl_ysu') then

src/core_atmosphere/physics/mpas_atmphys_driver_sfclayer.F

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module mpas_atmphys_driver_sfclayer
1717
!wrf physics:
1818
use module_sf_mynn
1919
use module_sf_sfclay
20+
use module_sf_pxsfclay
2021

2122
implicit none
2223
private
@@ -46,7 +47,8 @@ module mpas_atmphys_driver_sfclayer
4647
!
4748
! WRF physics called from driver_sfclayer:
4849
! ----------------------------------------
49-
! * module_sf_sfclay: Monin-Obukhov surface layer scheme.
50+
! * module_sf_sfclay : Monin-Obukhov surface layer scheme.
51+
! * module_sf_pxsfclay : PX surface layer scheme.
5052
!
5153
! add-ons and modifications to sourcecode:
5254
! ----------------------------------------
@@ -71,6 +73,8 @@ module mpas_atmphys_driver_sfclayer
7173
! Laura D. Fowler (laura@ucar.edu) / 2016-03-25.
7274
! * added the implementation of the MYNN surface layer scheme from WRF 3.6.1.
7375
! Laura D. Fowler (laura@ucar.edu) / 2016-03-30.
76+
! * added PX surface layer (pxsfclay) option.
77+
! Jon Pleim (pleim.jon@epa.gov) and Hosein Foroutan (hosein@vt.edu) / 2016-05-04.
7478
! * added the calculation of surface layer variables over seaice cells when config_frac_seaice is set to true.
7579
! Laura D. Fowler (laura@ucar.edu) / 2016-10-03.
7680
! * changed the definition of dx_p to match that used in other physics parameterizations.
@@ -206,6 +210,8 @@ subroutine allocate_sfclayer(configs)
206210
if(.not.allocated(sh3d_p) ) allocate(sh3d_p(ims:ime,kms:kme,jms:jme) )
207211
if(.not.allocated(elpbl_p) ) allocate(elpbl_p(ims:ime,kms:kme,jms:jme) )
208212

213+
case("sf_pxsfclay")
214+
209215
case default
210216

211217
end select sfclayer_select
@@ -323,6 +329,8 @@ subroutine deallocate_sfclayer(configs)
323329
if(allocated(sh3d_p) ) deallocate(sh3d_p )
324330
if(allocated(elpbl_p) ) deallocate(elpbl_p )
325331

332+
case("sf_pxsfclay")
333+
326334
case default
327335

328336
end select sfclayer_select
@@ -569,6 +577,8 @@ subroutine sfclayer_from_MPAS(configs,mesh,diag_physics,sfc_input,its,ite)
569577
enddo
570578
enddo
571579

580+
case("sf_pxsfclay")
581+
572582
case default
573583

574584
end select sfclayer_select
@@ -774,6 +784,8 @@ subroutine sfclayer_to_MPAS(configs,sfc_input,diag_physics,its,ite)
774784
enddo
775785
endif
776786

787+
case("sf_pxsfclay")
788+
777789
case default
778790

779791
end select sfclayer_select
@@ -803,6 +815,9 @@ subroutine init_sfclayer(configs)
803815
case("sf_mynn")
804816
call mynn_sf_init_driver(allowed_to_read)
805817

818+
case("sf_pxsfclay")
819+
call pxsfclayinit(allowed_to_read)
820+
806821
case default
807822

808823
end select sfclayer_select
@@ -981,6 +996,59 @@ subroutine driver_sfclayer(itimestep,configs,mesh,diag_physics,sfc_input,its,ite
981996
endif
982997
call mpas_timer_stop('MYNN_sfclay')
983998

999+
case("sf_pxsfclay")
1000+
call mpas_timer_start('PX_sfclay')
1001+
call pxsfclay( &
1002+
p3d = pres_hyd_p , psfc = psfc_p , t3d = t_p , &
1003+
u3d = u_p , v3d = v_p , qv3d = qv_p , &
1004+
dz8w = dz_p , cp = cp , g = gravity , &
1005+
rovcp = rcp , R = R_d , xlv = xlv , &
1006+
chs = chs_p , chs2 = chs2_p , cqs2 = cqs2_p , &
1007+
cpm = cpm_p , znt = znt_p , ust = ust_p , &
1008+
pblh = hpbl_p , mavail = mavail_p , zol = zol_p , &
1009+
mol = mol_p , regime = regime_p , psim = psim_p , &
1010+
psih = psih_p , th3d = th_p , &
1011+
xland = xland_p , hfx = hfx_p , qfx = qfx_p , &
1012+
lh = lh_p , tsk = tsk_p , flhc = flhc_p , &
1013+
ta2 = t2m_p , th2 = th2m_p , qa2 = q2_p , &
1014+
flqc = flqc_p , qgh = qgh_p , qsfc = qsfc_p , &
1015+
rmol = rmol_p , u10 = u10_p , v10 = v10_p , &
1016+
gz1oz0 = gz1oz0_p , wspd = wspd_p , br = br_p , &
1017+
isfflx = isfflx , dx = dx_p , svp1 = svp1 , &
1018+
svp2 = svp2 , svp3 = svp3 , svpt0 = svpt0 , &
1019+
ep1 = ep_1 , ep2 = ep_2 , karman = karman , &
1020+
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
1021+
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
1022+
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
1023+
)
1024+
! Note that fractional sea-ice is currently not supported by PX.
1025+
! if(config_frac_seaice) then
1026+
! call pxsfclay( &
1027+
! p3d = pres_hyd_p , psfc = psfc_p , t3d = t_p , &
1028+
! u3d = u_p , v3d = v_p , qv3d = qv_p , &
1029+
! dz8w = dz_p , cp = cp , g = gravity , &
1030+
! rovcp = rcp , R = R_d , xlv = xlv , &
1031+
! chs = chs_sea , chs2 = chs2_sea , cqs2 = cqs2_sea , &
1032+
! cpm = cpm_sea , znt = znt_sea , ust = ust_sea , &
1033+
! pblh = hpbl_p , mavail = mavail_sea , zol = zol_sea , &
1034+
! mol = mol_sea , regime = regime_sea , psim = psim_sea , &
1035+
! psih = psih_sea , th3d = th_p , &
1036+
! xland = xland_sea , hfx = hfx_sea , qfx = qfx_sea , &
1037+
! lh = lh_sea , tsk = tsk_sea , flhc = flhc_sea , &
1038+
! ta2 = t2m_sea , th2 = th2m_sea , qa2 = q2_sea , &
1039+
! flqc = flqc_sea , qgh = qgh_sea , qsfc = qsfc_sea , &
1040+
! rmol = rmol_sea , u10 = u10_sea , v10 = v10_sea , &
1041+
! gz1oz0 = gz1oz0_sea , wspd = wspd_sea , br = br_sea , &
1042+
! isfflx = isfflx , dx = dx_p , svp1 = svp1 , &
1043+
! svp2 = svp2 , svp3 = svp3 , svpt0 = svpt0 , &
1044+
! ep1 = ep_1 , ep2 = ep_2 , karman = karman , &
1045+
! ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
1046+
! ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
1047+
! its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
1048+
! )
1049+
! endif
1050+
call mpas_timer_stop('PX_sfclay')
1051+
9841052
case default
9851053

9861054
end select sfclayer_select

src/core_atmosphere/physics/physics_wrf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ OBJS = \
3939
module_sf_noah_seaice_drv.o \
4040
module_sf_oml.o \
4141
module_sf_sfclay.o \
42+
module_sf_pxsfclay.o \
4243
module_sf_urban.o
4344

4445
physics_wrf: $(OBJS)

0 commit comments

Comments
 (0)