Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guard to prevent running GFS_MP_generic_pre with Thompson MP #459

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 9 additions & 1 deletion physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ end subroutine GFS_MP_generic_pre_init
!> \section arg_table_GFS_MP_generic_pre_run Argument Table
!! \htmlinclude GFS_MP_generic_pre_run.html
!!
subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, errmsg, errflg)
subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, &
phys_choice, phys_choice_thompson, errmsg, errflg)
!
use machine, only: kind_phys

implicit none
integer, intent(in) :: im, levs, ntcw, nncl, ntrac
integer, intent(in) :: phys_choice, phys_choice_thompson
logical, intent(in) :: ldiag3d, do_aw
real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0
real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0
Expand All @@ -38,6 +40,12 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, g
errmsg = ''
errflg = 0

if (phys_choice==phys_choice_thompson) then
errmsg = 'quak'
errflg = 1
return
endif

if (ldiag3d .or. do_aw) then
do k=1,levs
do i=1,im
Expand Down
16 changes: 16 additions & 0 deletions physics/GFS_MP_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@
kind = kind_phys
intent = inout
optional = F
[phys_choice]
standard_name = flag_for_microphysics_scheme
long_name = choice of microphysics scheme
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[phys_choice_thompson]
standard_name = flag_for_thompson_microphysics_scheme
long_name = choice of Thompson microphysics scheme
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down