Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ intel-mpi: # BUILDTARGET Intel compiler suite with Intel MPI library
"CC_SERIAL = icc" \
"CXX_SERIAL = icpc" \
"FFLAGS_PROMOTION = -real-size 64" \
"FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
"CFLAGS_OPT = -O3" \
"CXXFLAGS_OPT = -O3" \
"FFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback -no-wrap-margin -convert big_endian -free -align array64byte" \
"CFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
"CXXFLAGS_OPT = -O3 -xBROADWELL -fma -fp-model precise -traceback" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback" \
"FFLAGS_DEBUG = -g -convert big_endian -free -CU -CB -check all -fpe0 -traceback -no-wrap-margin" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
Expand Down Expand Up @@ -660,7 +660,7 @@ ifneq "$(LAPACK)" ""
endif

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

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

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

ifeq "$(findstring v, $(VER))" "v"
Expand Down
339 changes: 330 additions & 9 deletions src/core_atmosphere/Registry.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/core_atmosphere/physics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ OBJS = \
mpas_atmphys_driver.o \
mpas_atmphys_driver_cloudiness.o \
mpas_atmphys_driver_convection.o \
mpas_atmphys_fdda.o \
mpas_atmphys_driver_gwdo.o \
mpas_atmphys_driver_lsm.o \
mpas_atmphys_driver_microphysics.o \
Expand Down Expand Up @@ -72,6 +73,7 @@ mpas_atmphys_control.o: \
mpas_atmphys_driver.o: \
mpas_atmphys_driver_cloudiness.o \
mpas_atmphys_driver_convection.o \
mpas_atmphys_fdda.o \
mpas_atmphys_driver_gwdo.o \
mpas_atmphys_driver_lsm.o \
mpas_atmphys_driver_pbl.o \
Expand All @@ -93,6 +95,11 @@ mpas_atmphys_driver_convection.o: \
mpas_atmphys_utilities.o \
mpas_atmphys_vars.o

mpas_atmphys_fdda.o: \
mpas_atmphys_constants.o \
mpas_atmphys_utilities.o \
mpas_atmphys_vars.o

mpas_atmphys_driver_gwdo.o: \
mpas_atmphys_vars.o

Expand Down
48 changes: 46 additions & 2 deletions src/core_atmosphere/physics/mpas_atmphys_control.F
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ module mpas_atmphys_control
! Laura D. Fowler (laura@ucar.edu) / 2016-03-31.
! * added the options sf_mynn and bl_mynn and for the MYNN parameterization from WRF version 3.6.1.
! Laura D. Fowler (laura@ucar.edu) / 2016-04-11.
! * added 'epa_aq_reference' physics suite.
! Hosein Foroutan (foroutan.hosein@epa.gov) / 2016-05-04.
! * added Pleim-Xiu LSM scheme option px and added FDDA analysis nudging option.
! Robert Gilliam (gilliam.robert@epa.gov) / 2016-09-19.
! * added the option cu_ntiedtke for the "new" Tiedtke parameterization of convection from WRF version 3.8.1.
! Laura D. Fowler (laura@ucar.edu) / 2016-09-19.
! * added the physics suite "convection_scale_aware" (see below for the physics options used in the suite).
Expand Down Expand Up @@ -94,7 +98,8 @@ subroutine physics_namelist_check(configs)
config_radt_cld_scheme, &
config_radt_lw_scheme, &
config_radt_sw_scheme, &
config_sfclayer_scheme
config_sfclayer_scheme, &
config_fdda_scheme

!-----------------------------------------------------------------------------------------------------------------
!call mpas_log_write('')
Expand All @@ -110,6 +115,7 @@ subroutine physics_namelist_check(configs)
call mpas_pool_get_config(configs,'config_radt_lw_scheme' ,config_radt_lw_scheme )
call mpas_pool_get_config(configs,'config_radt_sw_scheme' ,config_radt_sw_scheme )
call mpas_pool_get_config(configs,'config_sfclayer_scheme' ,config_sfclayer_scheme )
call mpas_pool_get_config(configs,'config_fdda_scheme' ,config_fdda_scheme )

call mpas_log_write('')
call mpas_log_write('----- Setting up physics suite '''//trim(config_physics_suite)//''' -----')
Expand All @@ -128,6 +134,7 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_monin_obukhov'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

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

Expand All @@ -140,6 +147,20 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_mynn'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'noah'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

else if (trim(config_physics_suite) == 'epa_aq_reference') then

if (trim(config_microp_scheme) == 'suite') config_microp_scheme = 'mp_wsm6'
if (trim(config_convection_scheme) == 'suite') config_convection_scheme = 'cu_kain_fritsch'
if (trim(config_pbl_scheme) == 'suite') config_pbl_scheme = 'bl_acm'
if (trim(config_gwdo_scheme) == 'suite') config_gwdo_scheme = 'bl_ysu_gwdo'
if (trim(config_radt_lw_scheme) == 'suite') config_radt_lw_scheme = 'rrtmg_lw'
if (trim(config_radt_sw_scheme) == 'suite') config_radt_sw_scheme = 'rrtmg_sw'
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'cld_fraction'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'sf_pxsfclay'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'px'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'analysis'

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

Expand All @@ -152,6 +173,7 @@ subroutine physics_namelist_check(configs)
if (trim(config_radt_cld_scheme) == 'suite') config_radt_cld_scheme = 'off'
if (trim(config_sfclayer_scheme) == 'suite') config_sfclayer_scheme = 'off'
if (trim(config_lsm_scheme) == 'suite') config_lsm_scheme = 'off'
if (trim(config_fdda_scheme) == 'suite') config_fdda_scheme = 'off'

else

Expand All @@ -161,6 +183,17 @@ subroutine physics_namelist_check(configs)

end if

!fdda scheme:
if(.not. (config_fdda_scheme .eq. 'off' .or. &
config_fdda_scheme .eq. 'analysis' .or. &
config_fdda_scheme .eq. 'scaled' )) then

write(mpas_err_message,'(A,A10)') 'illegal value for config_fdda_scheme:', &
trim(config_fdda_scheme)
call physics_error_fatal(mpas_err_message)

endif

!cloud microphysics scheme:
if(.not. (config_microp_scheme .eq. 'off' .or. &
config_microp_scheme .eq. 'mp_kessler' .or. &
Expand Down Expand Up @@ -278,7 +311,8 @@ subroutine physics_namelist_check(configs)
'set config_sfclayer_scheme different than off')

elseif(.not. (config_lsm_scheme .eq. 'off ' .or. &
config_lsm_scheme .eq. 'noah')) then
config_lsm_scheme .eq. 'noah' .or. &
config_lsm_scheme .eq. 'px')) then

write(mpas_err_message,'(A,A10)') 'illegal value for land surface scheme: ', &
trim(config_lsm_scheme)
Expand Down Expand Up @@ -307,6 +341,7 @@ subroutine physics_namelist_check(configs)
call mpas_log_write(' config_radt_sw_scheme = '//trim(config_radt_sw_scheme))
call mpas_log_write(' config_sfclayer_scheme = '//trim(config_sfclayer_scheme))
call mpas_log_write(' config_lsm_scheme = '//trim(config_lsm_scheme))
call mpas_log_write(' config_fdda_scheme = '//trim(config_fdda_scheme))
call mpas_log_write('')

end subroutine physics_namelist_check
Expand Down Expand Up @@ -358,6 +393,15 @@ subroutine physics_registry_init(mesh,configs,sfc_input)
dzs(4,iCell) = 1.00_RKIND
enddo

case("px")
!initialize the thickness of the soil layers for the PX scheme:
do iCell = 1, nCells
if(landmask(iCell) == 1) then
dzs(1,iCell) = 0.01_RKIND
dzs(2,iCell) = 0.99_RKIND
endif
enddo

case default

end select lsm_select
Expand Down
26 changes: 22 additions & 4 deletions src/core_atmosphere/physics/mpas_atmphys_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module mpas_atmphys_driver
use mpas_atmphys_driver_radiation_sw
use mpas_atmphys_driver_sfclayer
use mpas_atmphys_driver_oml
use mpas_atmphys_fdda
use mpas_atmphys_constants
use mpas_atmphys_interface
use mpas_atmphys_update
Expand Down Expand Up @@ -68,6 +69,7 @@ module mpas_atmphys_driver
! driver_radiation_sw : driver for short wave radiation schemes.
! driver_radiation_lw : driver for long wave radiation schemes.
! driver_sfclayer : driver for surface layer scheme.
! apply_fdda : applies four-dimensional data assimilation.
! update_convection_step1 : updates lifetime of deep convective clouds in Kain-Fritsch scheme.
! update_convection_step2 : updates accumulated precipitation output from convection schemes.
! update_radiation_diagnostics: updates accumualted radiation diagnostics from radiation schemes.
Expand All @@ -85,13 +87,13 @@ module mpas_atmphys_driver
! Laura D. Fowler (laura@ucar.edu) / 2014-05-15.
! * renamed config_conv_deep_scheme to config_convection_scheme.
! Laura D. Fowler (laura@ucar.edu) / 2014-09-18.
! * in the call to driver_convection, added block%configs needed for the implementation of the
! Grell-Freitas convection scheme.
! Laura D. Fowler (laura@ucar.edu) / 2016-03-30.
! * modified the call to the subroutines driver_sfclayer and driver_pbl for the implementation
! of the MYNN surface layer scheme and PBL schemes. itimestep and block%configs are added to
! the argument list.
! Laura D. Fowler (laura@ucar.edu) / 2015-01-06.
! * in the call to driver_convection, added block%configs needed for the implementation of the
! Grell-Freitas convection scheme.
! Laura D. Fowler (laura@ucar.edu) / 2016-03-30.
! * now only call subroutine update_convection_step2 when config_convection_scheme is not off.
! Laura D. Fowler (laura@ucar.edu) / 2016-04-13.
! * modified call to driver_cloudiness to accomodate the calculation of the cloud fraction with the Thompson
Expand All @@ -117,6 +119,7 @@ subroutine physics_driver(domain,itimestep,xtime_s)
type(mpas_pool_type),pointer:: configs, &
mesh, &
state, &
fdda, &
diag, &
diag_physics, &
tend_physics, &
Expand All @@ -127,6 +130,7 @@ subroutine physics_driver(domain,itimestep,xtime_s)

character(len=StrKIND),pointer:: config_bucket_update, &
config_convection_scheme, &
config_fdda_scheme, &
config_gwdo_scheme, &
config_lsm_scheme, &
config_pbl_scheme, &
Expand All @@ -153,6 +157,7 @@ subroutine physics_driver(domain,itimestep,xtime_s)
call mpas_timer_start('physics driver')

call mpas_pool_get_config(domain%configs,'config_convection_scheme',config_convection_scheme)
call mpas_pool_get_config(domain%configs,'config_fdda_scheme' ,config_fdda_scheme )
call mpas_pool_get_config(domain%configs,'config_gwdo_scheme' ,config_gwdo_scheme )
call mpas_pool_get_config(domain%configs,'config_lsm_scheme' ,config_lsm_scheme )
call mpas_pool_get_config(domain%configs,'config_pbl_scheme' ,config_pbl_scheme )
Expand All @@ -169,13 +174,15 @@ subroutine physics_driver(domain,itimestep,xtime_s)
config_pbl_scheme .ne. 'off' .or. &
config_radt_lw_scheme .ne. 'off' .or. &
config_radt_sw_scheme .ne. 'off' .or. &
config_sfclayer_scheme .ne. 'off') then
config_sfclayer_scheme .ne. 'off' .or. &
config_fdda_scheme .ne. 'off') then

block => domain % blocklist
do while(associated(block))

call mpas_pool_get_subpool(block%structs,'mesh' ,mesh )
call mpas_pool_get_subpool(block%structs,'state' ,state )
call mpas_pool_get_subpool(block%structs,'fdda' ,fdda )
call mpas_pool_get_subpool(block%structs,'diag' ,diag )
call mpas_pool_get_subpool(block%structs,'diag_physics',diag_physics)
call mpas_pool_get_subpool(block%structs,'atm_input' ,atm_input )
Expand Down Expand Up @@ -332,6 +339,17 @@ subroutine physics_driver(domain,itimestep,xtime_s)
!$OMP END PARALLEL DO
end if

!call to FDDA scheme within MPAS physics (not WRF physics)
if(config_fdda_scheme .ne. 'off') then
time_lev = 1
!$OMP PARALLEL DO
do thread=1,nThreads
call apply_fdda(xtime_s,block%configs,mesh,state,time_lev,fdda,diag,diag_physics,tend_physics, &
cellSolveThreadStart(thread), cellSolveThreadEnd(thread))
end do
!$OMP END PARALLEL DO
endif

!deallocate arrays shared by all physics parameterizations:
call deallocate_forall_physics(block%configs)

Expand Down
Loading