Skip to content

Commit

Permalink
Shared physics sfclayrev (#1997)
Browse files Browse the repository at this point in the history
TYPE: enhancement, new feature

KEYWORDS: shared physics, revised MM5 sfclay scheme

SOURCE: internal

DESCRIPTION OF CHANGES:
Add revised MM5 surface layer scheme from the shared physics directory, which is ccpp-compliant. Also added salinity effect in the shared physics subroutine. It also includes change made in [PR-1924.](#1924)

The CCPP-compliant revised MM5 surface layer code will be residing in phys/physics_mmm/ directory. Currently it is a copy of the code from the future MMM-physics repo, plus the salinity change made recently in WRF.

LIST OF MODIFIED FILES: 
M       arch/postamble
M       arch/preamble
M       clean
M       main/depend.common
M       phys/Makefile
M       phys/module_physics_init.F
M       phys/module_sf_sfclayrev.F
M       phys/module_surface_driver.F
A       phys/physics_mmm/sf_sfclayrev.F90

TESTS CONDUCTED: 
1. The runs before and after this change produce bit-for-bit results when compiled with -d option.
2. The Jenkins tests are all passing.

RELEASE NOTE: Add revised MM5 surface layer scheme from the future shared MMM-physics repository.
  • Loading branch information
weiwangncar committed Feb 2, 2024
1 parent c6cc0c5 commit cb5fb2f
Show file tree
Hide file tree
Showing 6 changed files with 1,489 additions and 1,331 deletions.
10 changes: 10 additions & 0 deletions main/depend.common
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,11 @@ module_sf_pxlsm.o: \
module_sf_pxlsm_data.o


module_sf_sfclayrev.o: \
ccpp_kind_types.o \
physics_mmm/sf_sfclayrev.o


module_ra_rrtmg_sw.o: \
../share/module_model_constants.o \
module_ra_clWRF_support.o \
Expand Down Expand Up @@ -924,6 +929,7 @@ module_physics_init.o: \
module_ra_flg.o \
module_sf_sfclay.o \
module_sf_sfclayrev.o \
physics_mmm/sf_sfclayrev.o \
module_sf_slab.o \
module_sf_myjsfc.o \
module_sf_mynn.o \
Expand Down Expand Up @@ -1491,6 +1497,10 @@ module_mp_gsfcgce_4ice_nuwrf.o: \
module_mp_radar.o \


physics_mmm/sf_sfclayrev.o: \
ccpp_kind_types.o


physics_mmm/cu_ntiedtke.o: \
ccpp_kind_types.o

Expand Down
4 changes: 2 additions & 2 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ DIAGNOSTIC_MODULES_EM = \
module_diag_solar.o

PHYSMMM_MODULES = \
physics_mmm/sf_sfclayrev.o \
physics_mmm/cu_ntiedtke.o \
physics_mmm/module_libmassv.o \
physics_mmm/mp_wsm6.o \
Expand All @@ -248,14 +249,13 @@ LIBTARGET = physics
TARGETDIR = ./

$(LIBTARGET) :
$(MAKE) $(J) non_nmm shared_phys ; \
$(MAKE) $(J) non_nmm ; \
$(AR) $(ARFLAGS) ../main/$(LIBWRFLIB) $(MODULES) $(OBJS) \
$(FIRE_MODULES) $(DIAGNOSTIC_MODULES_EM) $(PHYSMMM_MODULES)

include ../configure.wrf

non_nmm : $(MODULES) $(FIRE_MODULES) $(OBJS) $(DIAGNOSTIC_MODULES_EM)
shared_phys : $(PHYSMMM_MODULES)

submodules :
@if [ \( ! -f module_sf_noahmpdrv.F \) -o \( ! -f module_sf_noahmp_glacier.F \) -o \
Expand Down
11 changes: 7 additions & 4 deletions phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
) !Optional oml
!--------------------------------------------------------------------
USE module_sf_sfclay
USE module_sf_sfclayrev
USE sf_sfclayrev
USE module_sf_slab
USE module_sf_pxsfclay
USE module_bl_ysu
Expand Down Expand Up @@ -3089,6 +3089,10 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
INTEGER,OPTIONAL,INTENT(OUT), DIMENSION( ims:ime,jms:jme):: irr_rand_field
INTEGER,OPTIONAL :: irr_ph,irr_freq
! To accommodate shared physics
character*256 :: errmsg
integer :: errflg
#if ( EM_CORE == 1 )
!local mynn
INTEGER :: mynn_closure_level
Expand Down Expand Up @@ -3137,7 +3141,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
CALL sfclayinit( allowed_to_read )
isfc = 1
CASE (SFCLAYREVSCHEME)
CALL sfclayrevinit
CALL sf_sfclayrev_init(errmsg,errflg)
IF ( shalwater_z0 .EQ. 1 ) THEN
CALL shalwater_init(ims,ime,jms,jme, &
its,ite,jts,jte, &
Expand Down Expand Up @@ -5675,9 +5679,8 @@ SUBROUTINE shalwater_init(ims,ime,jms,jme, &
! Local
LOGICAL :: overwrite_water_depth
overwrite_water_depth = .False.
IF ( bathymetry_flag .eq. 1 ) THEN
IF ( shalwater_depth .LE. 0.0 ) THEN
IF ( LakeModel .ge. 1 ) THEN
Expand Down

0 comments on commit cb5fb2f

Please sign in to comment.