Skip to content

Commit

Permalink
Merge pull request #423 from climbfuji/man_hafs_sas_for_master
Browse files Browse the repository at this point in the history
master: merge HWRF version of saSAS with GFS version
  • Loading branch information
climbfuji authored Jun 4, 2020
2 parents e913eed + 4fcdf2f commit 6a6dd2c
Show file tree
Hide file tree
Showing 5 changed files with 443 additions and 210 deletions.
26 changes: 26 additions & 0 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module GFS_diagtoscreen

interface print_var
module procedure print_logic_0d
module procedure print_logic_1d
module procedure print_int_0d
module procedure print_int_1d
module procedure print_real_0d
Expand Down Expand Up @@ -116,6 +117,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
do impi=0,mpisize-1
do iomp=0,ompsize-1
if (mpirank==impi .and. omprank==iomp) then
call print_var(mpirank,omprank, blkno, 'Model%kdt' , Model%kdt)
! Sfcprop
call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk)
call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac)
Expand Down Expand Up @@ -552,6 +554,30 @@ subroutine print_int_0d(mpirank,omprank,blkno,name,var)

end subroutine print_int_0d

subroutine print_logic_1d(mpirank,omprank,blkno,name,var)

use machine, only: kind_phys

implicit none

integer, intent(in) :: mpirank, omprank, blkno
character(len=*), intent(in) :: name
logical, intent(in) :: var(:)

integer :: i

#ifdef PRINT_SUM
write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var)
#elif defined(PRINT_CHKSUM)
write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var)
#else
do i=ISTART,min(IEND,size(var(:)))
write(0,'(2a,3i6,i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i)
end do
#endif

end subroutine print_logic_1d

subroutine print_int_1d(mpirank,omprank,blkno,name,var)

use machine, only: kind_phys
Expand Down
Loading

0 comments on commit 6a6dd2c

Please sign in to comment.