Skip to content

Commit

Permalink
Merge pull request #521 from climbfuji/update_master_from_gsd_develop…
Browse files Browse the repository at this point in the history
…_20201120

Update master from gsd/develop 2020/11/20
  • Loading branch information
climbfuji committed Nov 24, 2020
2 parents 8ef88ca + 03942e1 commit 4e39b50
Show file tree
Hide file tree
Showing 33 changed files with 9,463 additions and 818 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 4e39b50

Please sign in to comment.