Skip to content

Commit

Permalink
Merge branch 'master' into fix_scm_sfc_flux_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Dec 7, 2020
2 parents 9354fd2 + d076cc2 commit 9ccc52f
Show file tree
Hide file tree
Showing 35 changed files with 9,584 additions and 891 deletions.
6 changes: 5 additions & 1 deletion physics/GFS_GWD_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subroutine GFS_GWD_generic_pre_run( &
clx(:,2) = 0.0
clx(:,3) = 0.0
clx(:,4) = 0.0
elseif (nmtvr == 24) then ! GSD_drag_suite
elseif (nmtvr == 24) then ! GSD_drag_suite and unified_ugwp
oc(:) = mntvar(:,2)
oa4(:,1) = mntvar(:,3)
oa4(:,2) = mntvar(:,4)
Expand All @@ -93,6 +93,10 @@ subroutine GFS_GWD_generic_pre_run( &
clx(:,2) = mntvar(:,8)
clx(:,3) = mntvar(:,9)
clx(:,4) = mntvar(:,10)
theta(:) = mntvar(:,11)
gamma(:) = mntvar(:,12)
sigma(:) = mntvar(:,13)
elvmax(:) = mntvar(:,14)
varss(:) = mntvar(:,15)
ocss(:) = mntvar(:,16)
oa4ss(:,1) = mntvar(:,17)
Expand Down
63 changes: 60 additions & 3 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,37 @@ module GFS_diagtoscreen

contains

subroutine GFS_diagtoscreen_init ()
!> \section arg_table_GFS_diagtoscreen_init Argument Table
!! \htmlinclude GFS_diagtoscreen_init.html
!!
subroutine GFS_diagtoscreen_init (Model, Data, Interstitial, errmsg, errflg)

use GFS_typedefs, only: GFS_control_type, GFS_data_type, &
GFS_interstitial_type

implicit none

!--- interface variables
type(GFS_control_type), intent(in) :: Model
type(GFS_data_type), intent(in) :: Data(:)
type(GFS_interstitial_type), intent(in) :: Interstitial(:)
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

!--- local variables
integer :: i

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

do i=1,size(Data)
call GFS_diagtoscreen_run (Model, Data(i)%Statein, Data(i)%Stateout, Data(i)%Sfcprop, &
Data(i)%Coupling, Data(i)%Grid, Data(i)%Tbd, Data(i)%Cldprop, &
Data(i)%Radtend, Data(i)%Intdiag, Interstitial(1), &
size(Interstitial), i, errmsg, errflg)
end do

end subroutine GFS_diagtoscreen_init

subroutine GFS_diagtoscreen_finalize ()
Expand All @@ -330,7 +360,6 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
#ifdef OPENMP
use omp_lib
#endif
use machine, only: kind_phys
use GFS_typedefs, only: GFS_control_type, GFS_statein_type, &
GFS_stateout_type, GFS_sfcprop_type, &
GFS_coupling_type, GFS_grid_type, &
Expand Down Expand Up @@ -831,7 +860,35 @@ module GFS_interstitialtoscreen

contains

subroutine GFS_interstitialtoscreen_init ()
subroutine GFS_interstitialtoscreen_init (Model, Data, Interstitial, errmsg, errflg)

use GFS_typedefs, only: GFS_control_type, GFS_data_type, &
GFS_interstitial_type

implicit none

!--- interface variables
type(GFS_control_type), intent(in) :: Model
type(GFS_data_type), intent(in) :: Data(:)
type(GFS_interstitial_type), intent(in) :: Interstitial(:)
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

!--- local variables
integer :: i

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0


do i=1,size(Interstitial)
call GFS_interstitialtoscreen_run (Model, Data(1)%Statein, Data(1)%Stateout, Data(1)%Sfcprop, &
Data(1)%Coupling, Data(1)%Grid, Data(1)%Tbd, Data(1)%Cldprop, &
Data(1)%Radtend, Data(1)%Intdiag, Interstitial(i), &
size(Interstitial), -999, errmsg, errflg)
end do

end subroutine GFS_interstitialtoscreen_init

subroutine GFS_interstitialtoscreen_finalize ()
Expand Down
92 changes: 92 additions & 0 deletions physics/GFS_debug.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,52 @@
type = scheme
dependencies = machine.F

########################################################################
[ccpp-arg-table]
name = GFS_diagtoscreen_init
type = scheme
[Model]
standard_name = GFS_control_type_instance
long_name = instance of derived type GFS_control_type in FV3
units = DDT
dimensions = ()
type = GFS_control_type
intent = in
optional = F
[Data]
standard_name = GFS_data_type_instance_all_blocks
long_name = instance of derived type GFS_data_type
units = DDT
dimensions = (ccpp_block_count)
type = GFS_data_type
intent = in
optional = F
[Interstitial]
standard_name = GFS_interstitial_type_instance_all_threads
long_name = instance of derived type GFS_interstitial_type
units = DDT
dimensions = (omp_threads)
type = GFS_interstitial_type
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
optional = F
[errflg]
standard_name = ccpp_error_flag
long_name = error flag for error handling in CCPP
units = flag
dimensions = ()
type = integer
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_diagtoscreen_run
Expand Down Expand Up @@ -135,6 +181,52 @@
type = scheme
dependencies = machine.F

########################################################################
[ccpp-arg-table]
name = GFS_interstitialtoscreen_init
type = scheme
[Model]
standard_name = GFS_control_type_instance
long_name = instance of derived type GFS_control_type in FV3
units = DDT
dimensions = ()
type = GFS_control_type
intent = in
optional = F
[Data]
standard_name = GFS_data_type_instance_all_blocks
long_name = instance of derived type GFS_data_type
units = DDT
dimensions = (ccpp_block_count)
type = GFS_data_type
intent = in
optional = F
[Interstitial]
standard_name = GFS_interstitial_type_instance_all_threads
long_name = instance of derived type GFS_interstitial_type
units = DDT
dimensions = (omp_threads)
type = GFS_interstitial_type
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
optional = F
[errflg]
standard_name = ccpp_error_flag
long_name = error flag for error handling in CCPP
units = flag
dimensions = ()
type = integer
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_interstitialtoscreen_run
Expand Down
Loading

0 comments on commit 9ccc52f

Please sign in to comment.