Skip to content

Commit

Permalink
Merge remote-tracking branch 'Consortium/master' into feature/updcice
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Jun 24, 2021
2 parents f3b2652 + 995f3af commit 9057817
Show file tree
Hide file tree
Showing 54 changed files with 6,056 additions and 2,541 deletions.
45 changes: 32 additions & 13 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module ice_diagnostics
print_global ! if true, print global data

integer (kind=int_kind), public :: &
debug_model_step = 999999999 ! begin printing at istep1=debug_model_step
debug_model_step = 0 ! begin printing at istep1=debug_model_step

integer (kind=int_kind), parameter, public :: &
npnt = 2 ! total number of points to be printed
Expand Down Expand Up @@ -73,6 +73,12 @@ module ice_diagnostics
integer (kind=int_kind), dimension(npnt), public :: &
piloc, pjloc, pbloc, pmloc ! location of diagnostic points

integer (kind=int_kind), public :: &
debug_model_i = -1, & ! location of debug_model point, local i index
debug_model_j = -1, & ! location of debug_model point, local j index
debug_model_iblk = -1, & ! location of debug_model point, local block number
debug_model_task = -1 ! location of debug_model point, local task number

! for hemispheric water and heat budgets
real (kind=dbl_kind) :: &
totmn , & ! total ice/snow water mass (nh)
Expand Down Expand Up @@ -1432,9 +1438,9 @@ subroutine init_diags
write(nu_diag,*) ' Find indices of diagnostic points '
endif

piloc(:) = 0
pjloc(:) = 0
pbloc(:) = 0
piloc(:) = -1
pjloc(:) = -1
pbloc(:) = -1
pmloc(:) = -999
plat(:) = -999._dbl_kind
plon(:) = -999._dbl_kind
Expand Down Expand Up @@ -1535,16 +1541,29 @@ subroutine debug_ice(iblk, plabeld)
integer (kind=int_kind) :: i, j, m
character(len=*), parameter :: subname='(debug_ice)'

! tcraig, do this only on one point, the first point
! do m = 1, npnt
m = 1
if (istep1 >= debug_model_step .and. &
iblk == pbloc(m) .and. my_task == pmloc(m)) then
i = piloc(m)
j = pjloc(m)
call print_state(plabeld,i,j,iblk)
if (istep1 >= debug_model_step) then

! set debug point to 1st global point if not set as local values
if (debug_model_i < 0 .and. debug_model_j < 0 .and. &
debug_model_iblk < 0 .and. debug_model_task < 0) then
debug_model_i = piloc(1)
debug_model_j = pjloc(1)
debug_model_task = pmloc(1)
debug_model_iblk = pbloc(1)
endif

! if debug point is messed up, abort
if (debug_model_i < 0 .or. debug_model_j < 0 .or. &
debug_model_iblk < 0 .or. debug_model_task < 0) then
call abort_ice (subname//'ERROR: debug_model_[i,j,iblk,mytask] not set correctly')
endif
! enddo

! write out debug info
if (debug_model_iblk == iblk .and. debug_model_task == my_task) then
call print_state(plabeld,debug_model_i,debug_model_j,debug_model_iblk)
endif

endif

end subroutine debug_ice

Expand Down
6 changes: 2 additions & 4 deletions cicecore/cicedynB/general/ice_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,8 @@ subroutine init_coupler_flux
ffep (:,:,:,:)= c0
ffed (:,:,:,:)= c0

if (send_i2x_per_cat) then
allocate(fswthrun_ai(nx_block,ny_block,ncat,max_blocks))
fswthrun_ai(:,:,:,:) = c0
endif
allocate(fswthrun_ai(nx_block,ny_block,ncat,max_blocks))
fswthrun_ai(:,:,:,:) = c0

!-----------------------------------------------------------------
! derived or computed fields
Expand Down
Loading

0 comments on commit 9057817

Please sign in to comment.