Skip to content

Commit

Permalink
Address reviewers comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jul 15, 2024
1 parent 3395bba commit 420317e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
11 changes: 8 additions & 3 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ subroutine GFS_photochemistry_init(oz_phys_2006, oz_phys_2015, h2o_phys, errmsg,
errflg = 0

! If no photchemical scheme is on, but SDF has this module, report an error?
! DJS2024 Asks: If everything in _run() is controlled by these logicals, we probably don't
! need to kill it here, since the run phase will be harmless?
if ((.not. oz_phys_2006) .and. (.not. oz_phys_2015) .and. (.not. h2o_phys)) then
write (errmsg,'(*(a))') 'Logic error: One of [oz_phys_2006, oz_phys_2015, or h2o_phys] must == .true. '
errflg = 1
return
endif


! Only one ozone scheme can be on. Otherwise, return and report error.
if (oz_phys_2006 .and. oz_phys_2015) then
write (errmsg,'(*(a))') 'Logic error: Only one ozone scheme can be enabled at a time'
errflg = 1
return
endif

end subroutine GFS_photochemistry_init

! #########################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,5 @@
units = 1
dimensions = ()
type = integer
intent = out
intent = out

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name = GFS_suite_stateout_update
type = scheme
dependencies = ../../hooks/machine.F

########################################################################
[ccpp-arg-table]
name = GFS_suite_stateout_update_run
Expand Down
13 changes: 6 additions & 7 deletions physics/MP/Thompson/mp_thompson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ module mp_thompson

private

logical :: is_initialized = .False.

integer, parameter :: ext_ndiag3d = 37

contains
Expand All @@ -40,7 +38,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &
nwfa, nifa, tgrs, prsl, phil, area, &
aerfld, mpicomm, mpirank, mpiroot, &
threads, ext_diag, diag3d, &
errmsg, errflg)
is_initialized, errmsg, errflg)

implicit none

Expand All @@ -49,6 +47,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &
integer, intent(in ) :: nlev
real(kind_phys), intent(in ) :: con_g, con_rd, con_eps
logical, intent(in ) :: restart
logical, intent(inout) :: is_initialized
integer, intent(in ) :: imp_physics
integer, intent(in ) :: imp_physics_thompson
! Hydrometeors
Expand Down Expand Up @@ -338,12 +337,12 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, &
spp_prt_list, spp_var_list, &
spp_stddev_cutoff, &
cplchm, pfi_lsan, pfl_lsan, &
errmsg, errflg)
is_initialized, errmsg, errflg)

implicit none

! Interface variables

logical, intent(inout) :: is_initialized
! Dimensions and constants
integer, intent(in ) :: ncol
integer, intent(in ) :: nlev
Expand Down Expand Up @@ -915,10 +914,10 @@ end subroutine mp_thompson_run
!> \section arg_table_mp_thompson_finalize Argument Table
!! \htmlinclude mp_thompson_finalize.html
!!
subroutine mp_thompson_finalize(errmsg, errflg)
subroutine mp_thompson_finalize(is_initialized, errmsg, errflg)

implicit none

logical, intent(inout) :: is_initialized
character(len=*), intent( out) :: errmsg
integer, intent( out) :: errflg

Expand Down
18 changes: 18 additions & 0 deletions physics/MP/Thompson/mp_thompson.meta
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@
kind = kind_phys
intent = in
optional = True
[is_initialized]
standard_name = flag_for_thompson_mp_scheme_initialization
long_name = flag carrying scheme initialization status
units = flag
type = logical
intent = inout
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -782,6 +788,12 @@
kind = kind_phys
intent = inout
optional = True
[is_initialized]
standard_name = flag_for_thompson_mp_scheme_initialization
long_name = flag carrying scheme initialization status
units = flag
type = logical
intent = inout
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand All @@ -802,6 +814,12 @@
[ccpp-arg-table]
name = mp_thompson_finalize
type = scheme
[is_initialized]
standard_name = flag_for_thompson_mp_scheme_initialization
long_name = flag carrying scheme initialization status
units = flag
type = logical
intent = inout
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
3 changes: 2 additions & 1 deletion physics/photochem/module_h2ophys.meta
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
long_name = definition of type ty_h2ophys
units = DDT
dimensions = ()
type = ty_h2ophys
type = ty_h2ophys

0 comments on commit 420317e

Please sign in to comment.