Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
15 changes: 8 additions & 7 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -2117,9 +2117,10 @@ rconfig real vmax_ratio namelist,tc max_bogus -999. i
rconfig real rankine_lid namelist,tc 1 -999. irh "top pressure limit for the tc bogus scheme"

# Physics
rconfig character physics_suite namelist,physics 1 "continental_convection" rh "Physics suite selection" "physics suite to use for all domains: continental_convection or tropical_convection" "character string"
rconfig logical force_read_thompson namelist,physics 1 .false.
rconfig logical write_thompson_tables namelist,physics 1 .true.
rconfig integer mp_physics namelist,physics max_domains 0 irh "mp_physics" "" ""
rconfig integer mp_physics namelist,physics max_domains -1 irh "mp_physics" "" ""
#rconfig integer milbrandt_ccntype namelist,physics max_domains 0 rh "milbrandt select maritime(1)/continental(2)" "" ""
rconfig real nssl_cccn namelist,physics max_domains 0.5e9 rh "Base CCN concentration for NSSL microphysics" "" ""
rconfig real nssl_alphah namelist,physics max_domains 0 rh "Graupel PSD shape paramter" "" ""
Expand Down Expand Up @@ -2151,13 +2152,13 @@ rconfig real aitken_mode namelist,physics 1 30
rconfig real coarse_mode namelist,physics 1 0.2e6 rh "coarse_mode" "" ""
rconfig integer do_radar_ref namelist,physics 1 0 rh "compute radar reflectivity for a number of schemes" "" ""
rconfig integer compute_radar_ref derived 1 0 - "compute_radar_ref" "0/1 flag: compute radar reflectivity, either do_radar_ref=1 .or. (milbrandt or NSSL schemes)"
rconfig integer ra_lw_physics namelist,physics max_domains 0 rh "ra_lw_physics" "" ""
rconfig integer ra_sw_physics namelist,physics max_domains 0 rh "ra_sw_physics" "" ""
rconfig integer ra_lw_physics namelist,physics max_domains -1 rh "ra_lw_physics" "" ""
rconfig integer ra_sw_physics namelist,physics max_domains -1 rh "ra_sw_physics" "" ""
rconfig real radt namelist,physics max_domains 0 h "RADT" "" ""
rconfig real naer namelist,physics max_domains 1e9 rh "NAER" "" ""
rconfig integer sf_sfclay_physics namelist,physics max_domains 0 rh "sf_sfclay_physics" "" ""
rconfig integer sf_surface_physics namelist,physics max_domains 0 rh "sf_surface_physics" "" ""
rconfig integer bl_pbl_physics namelist,physics max_domains 0 rh "bl_pbl_physics" "" ""
rconfig integer sf_sfclay_physics namelist,physics max_domains -1 rh "sf_sfclay_physics" "" ""
rconfig integer sf_surface_physics namelist,physics max_domains -1 rh "sf_surface_physics" "" ""
rconfig integer bl_pbl_physics namelist,physics max_domains -1 rh "bl_pbl_physics" "" ""
rconfig integer bl_mynn_tkebudget namelist,physics max_domains 0 rh "bl_mynn_tkebudget" "" ""
rconfig integer ysu_topdown_pblmix namelist,physics 1 0 rh "ysu_topdown_pblmix" "" ""
rconfig integer shinhong_tke_diag namelist,physics max_domains 0 rh "shinhong_tke_diag" "" ""
Expand All @@ -2174,7 +2175,7 @@ rconfig integer icloud_bl namelist,physics 1 1
rconfig integer mfshconv namelist,physics max_domains 1 rh "mfshconv" "To activate mass flux scheme with qnse, 1=true or 0=false" ""
rconfig integer sf_urban_physics namelist,physics max_domains 0 rh "sf_urban_physics" "activate urban model 0=no, 1=Noah_UCM 2=BEP_UCM" ""
rconfig real BLDT namelist,physics max_domains 0 h "BLDT" "" ""
rconfig integer cu_physics namelist,physics max_domains 0 rh "cu_physics" "" ""
rconfig integer cu_physics namelist,physics max_domains -1 rh "cu_physics" "" ""
rconfig integer shcu_physics namelist,physics max_domains 0 rh "shcu_physics" "" ""
rconfig integer cu_diag namelist,physics max_domains 0 rh "cu_diag" "additional t-averaged stuff for cuphys" ""
rconfig integer kf_edrates namelist,physics max_domains 0 rh "kf_edrates" "output entrainment/detrainment rates and convective timescale for KF schemes" ""
Expand Down
1 change: 1 addition & 0 deletions main/module_wrf_top.F
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ SUBROUTINE wrf_init( no_init1 )

CALL set_derived_rconfigs
CALL check_nml_consistency
CALL setup_physics_suite
CALL set_physics_rconfigs

#ifdef _ACCEL
Expand Down
1 change: 1 addition & 0 deletions main/real_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ END SUBROUTINE Setup_Timekeeping
CALL nl_set_use_wps_input ( 1 , REALONLY )

CALL check_nml_consistency
CALL setup_physics_suite
CALL set_physics_rconfigs

CALL nl_get_debug_level ( 1, debug_level )
Expand Down
162 changes: 162 additions & 0 deletions share/module_check_a_mundo.F
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,168 @@ SUBROUTINE check_nml_consistency

END SUBROUTINE

!=======================================================================

SUBROUTINE setup_physics_suite

!<DESCRIPTION>
!
! Based on the selection of physics suite provided in the namelist, sets the
! values of other namelist options (mp_physics, cu_physics, ra_lw_physics,
! ra_sw_physics, bl_pbl_physics, sf_sfclay_physics, and sf_surface_physics)
! to reflect that suite.
!
!</DESCRIPTION>

IMPLICIT NONE
#if ( ( EM_CORE == 1 ) && ( DA_CORE != 1 ) )

INTEGER :: i
INTEGER :: max_dom
LOGICAL :: have_mods
INTEGER, DIMENSION( max_domains ) :: orig_mp_physics, orig_cu_physics, orig_ra_lw_physics, orig_ra_sw_physics, orig_bl_pbl_physics, orig_sf_sfclay_physics, orig_sf_surface_physics
CHARACTER, DIMENSION( max_domains ) :: modified_mp_option, modified_cu_option, modified_ra_lw_option, modified_ra_sw_option, modified_bl_pbl_option, modified_sf_sfclay_option, modified_sf_surface_option

max_dom = model_config_rec % max_dom

!
! Save physics selections as given by the user to later determine if the
! user has overridden any options
!
modified_mp_option(1:max_dom) = ' '
orig_mp_physics(1:max_dom) = model_config_rec % mp_physics(1:max_dom)

modified_cu_option(1:max_dom) = ' '
orig_cu_physics(1:max_dom) = model_config_rec % cu_physics(1:max_dom)

modified_ra_lw_option(1:max_dom) = ' '
orig_ra_lw_physics(1:max_dom) = model_config_rec % ra_lw_physics(1:max_dom)

modified_ra_sw_option(1:max_dom) = ' '
orig_ra_sw_physics(1:max_dom) = model_config_rec % ra_sw_physics(1:max_dom)

modified_bl_pbl_option(1:max_dom) = ' '
orig_bl_pbl_physics(1:max_dom) = model_config_rec % bl_pbl_physics(1:max_dom)

modified_sf_sfclay_option(1:max_dom) = ' '
orig_sf_sfclay_physics(1:max_dom) = model_config_rec % sf_sfclay_physics(1:max_dom)

modified_sf_surface_option(1:max_dom) = ' '
orig_sf_surface_physics(1:max_dom) = model_config_rec % sf_surface_physics(1:max_dom)

CALL wrf_message ('*************************************')
CALL wrf_message ('Configuring physics suite '''//trim(model_config_rec % physics_suite)//'''')
CALL wrf_message ('')

!
! Set options based on the suite selection
!
SELECT CASE ( trim(model_config_rec % physics_suite) )

CASE ('continental_convection')
DO i = 1, max_dom

IF ( model_config_rec % cu_physics(i) == -1 ) model_config_rec % cu_physics(i) = 6 ! Tiedtke
IF ( model_config_rec % mp_physics(i) == -1 ) model_config_rec % mp_physics(i) = 8 ! Thompson
IF ( model_config_rec % ra_lw_physics(i) == -1 ) model_config_rec % ra_lw_physics(i) = 4 ! RRTMG LW
IF ( model_config_rec % ra_sw_physics(i) == -1 ) model_config_rec % ra_sw_physics(i) = 4 ! RRTMG SW
IF ( model_config_rec % bl_pbl_physics(i) == -1 ) model_config_rec % bl_pbl_physics(i) = 2 ! MYJ
IF ( model_config_rec % sf_sfclay_physics(i) == -1 ) model_config_rec % sf_sfclay_physics(i) = 2 ! MYJ
IF ( model_config_rec % sf_surface_physics(i) == -1 ) model_config_rec % sf_surface_physics(i) = 2 ! Noah

END DO

CASE ('tropical_convection')
DO i = 1, max_dom

IF ( model_config_rec % cu_physics(i) == -1 ) model_config_rec % cu_physics(i) = 16 ! New Tiedtke
IF ( model_config_rec % mp_physics(i) == -1 ) model_config_rec % mp_physics(i) = 6 ! WSM6
IF ( model_config_rec % ra_lw_physics(i) == -1 ) model_config_rec % ra_lw_physics(i) = 4 ! RRTMG LW
IF ( model_config_rec % ra_sw_physics(i) == -1 ) model_config_rec % ra_sw_physics(i) = 4 ! RRTMG SW
IF ( model_config_rec % bl_pbl_physics(i) == -1 ) model_config_rec % bl_pbl_physics(i) = 1 ! YSU
IF ( model_config_rec % sf_sfclay_physics(i) == -1 ) model_config_rec % sf_sfclay_physics(i) = 91 ! MM5
IF ( model_config_rec % sf_surface_physics(i) == -1 ) model_config_rec % sf_surface_physics(i) = 2 ! Noah

END DO

CASE ('none')

CASE DEFAULT
CALL wrf_error_fatal ( 'Unrecognized physics suite' )

END SELECT

!
! Print microphysics options
!
WHERE (model_config_rec % mp_physics(1:max_dom) == orig_mp_physics(1:max_dom)) modified_mp_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'mp_physics: ', (model_config_rec % mp_physics(i), modified_mp_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print cumulus options
!
WHERE (model_config_rec % cu_physics(1:max_dom) == orig_cu_physics(1:max_dom)) modified_cu_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'cu_physics: ', (model_config_rec % cu_physics(i), modified_cu_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print LW radiation options
!
WHERE (model_config_rec % ra_lw_physics(1:max_dom) == orig_ra_lw_physics(1:max_dom)) modified_ra_lw_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'ra_lw_physics: ', (model_config_rec % ra_lw_physics(i), modified_ra_lw_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print SW radiation options
!
WHERE (model_config_rec % ra_sw_physics(1:max_dom) == orig_ra_sw_physics(1:max_dom)) modified_ra_sw_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'ra_sw_physics: ', (model_config_rec % ra_sw_physics(i), modified_ra_sw_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print boundary layer options
!
WHERE (model_config_rec % bl_pbl_physics(1:max_dom) == orig_bl_pbl_physics(1:max_dom)) modified_bl_pbl_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'bl_pbl_physics: ', (model_config_rec % bl_pbl_physics(i), modified_bl_pbl_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print surface layer options
!
WHERE (model_config_rec % sf_sfclay_physics(1:max_dom) == orig_sf_sfclay_physics(1:max_dom)) modified_sf_sfclay_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'sf_sfclay_physics: ', (model_config_rec % sf_sfclay_physics(i), modified_sf_sfclay_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print surface options
!
WHERE (model_config_rec % sf_surface_physics(1:max_dom) == orig_sf_surface_physics(1:max_dom)) modified_sf_surface_option(1:max_dom) = '*'
WRITE (wrf_err_message, FMT='(A21,*(I6,A1))') 'sf_surface_physics: ', (model_config_rec % sf_surface_physics(i), modified_sf_surface_option(i), i=1,max_dom)
CALL wrf_message (wrf_err_message)

!
! Print footnote if any physics schemes were overridden by the user
!
have_mods = ANY (modified_mp_option(1:max_dom) == '*') &
.OR. ANY (modified_cu_option(1:max_dom) == '*') &
.OR. ANY (modified_ra_lw_option(1:max_dom) == '*') &
.OR. ANY (modified_ra_sw_option(1:max_dom) == '*') &
.OR. ANY (modified_bl_pbl_option(1:max_dom) == '*') &
.OR. ANY (modified_sf_sfclay_option(1:max_dom) == '*') &
.OR. ANY (modified_sf_surface_option(1:max_dom) == '*')

IF (have_mods) THEN
CALL wrf_message ('')
CALL wrf_message ('(* = option overrides suite setting)')
END IF

CALL wrf_message ('*************************************')

#endif

END SUBROUTINE

!=======================================================================

SUBROUTINE set_physics_rconfigs
Expand Down
8 changes: 1 addition & 7 deletions test/em_real/namelist.input
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,9 @@
/

&physics
mp_physics = 3, 3, 3,
ra_lw_physics = 1, 1, 1,
ra_sw_physics = 1, 1, 1,
physics_suite = 'continental_convection'
radt = 30, 30, 30,
sf_sfclay_physics = 1, 1, 1,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 1, 1, 1,
bldt = 0, 0, 0,
cu_physics = 1, 1, 0,
cudt = 5, 5, 5,
isfflx = 1,
ifsnow = 1,
Expand Down