Skip to content

Commit

Permalink
trunk:
Browse files Browse the repository at this point in the history
Merge r1132:1133 from rasm_colpkg branch - use iceumask instead of icetmask for 
dynamics halo masking, to fix occasional exact restart problem and rare and 
intermittent error in halo update in the dynamics.  BFB in one-year tests in 
the standard gx3 configuration. Thanks to Tony Craig for this.
  • Loading branch information
eclare108213 committed Jul 29, 2016
1 parent 7f96824 commit ac5d481
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
18 changes: 13 additions & 5 deletions cice/source/ice_dyn_eap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ subroutine eap (dt)
strtmp ! stress combinations for momentum equation

integer (kind=int_kind), dimension (nx_block,ny_block,max_blocks) :: &
icetmask ! ice extent mask (T-cell)
icetmask, & ! ice extent mask (T-cell)
halomask ! ice mask for halo update

type (ice_halo) :: &
halo_info_mask ! ghost cell update info for masked halo
Expand Down Expand Up @@ -320,6 +321,7 @@ subroutine eap (dt)
! velocities may have changed in evp_prep2
call ice_HaloUpdate (fld2, halo_info, &
field_loc_NEcorner, field_type_vector)
call ice_timer_stop(timer_bound)

! unload
!$OMP PARALLEL DO PRIVATE(iblk)
Expand All @@ -329,9 +331,15 @@ subroutine eap (dt)
enddo
!$OMP END PARALLEL DO

if (maskhalo_dyn) &
call ice_HaloMask(halo_info_mask, halo_info, icetmask)
call ice_timer_stop(timer_bound)
if (maskhalo_dyn) then
call ice_timer_start(timer_bound)
halomask = 0
where (iceumask) halomask = 1
call ice_HaloUpdate (halomask, halo_info, &
field_loc_center, field_type_scalar)
call ice_timer_stop(timer_bound)
call ice_HaloMask(halo_info_mask, halo_info, halomask)
endif

do ksub = 1,ndte ! subcycling

Expand Down Expand Up @@ -433,6 +441,7 @@ subroutine eap (dt)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_NEcorner, field_type_vector)
endif
call ice_timer_stop(timer_bound)

! unload
!$OMP PARALLEL DO PRIVATE(iblk)
Expand All @@ -441,7 +450,6 @@ subroutine eap (dt)
vvel(:,:,iblk) = fld2(:,:,2,iblk)
enddo
!$OMP END PARALLEL DO
call ice_timer_stop(timer_bound)

enddo ! subcycling

Expand Down
15 changes: 11 additions & 4 deletions cice/source/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ subroutine evp (dt)
! velocities may have changed in evp_prep2
call ice_HaloUpdate (fld2, halo_info, &
field_loc_NEcorner, field_type_vector)
call ice_timer_stop(timer_bound)

! unload
!$OMP PARALLEL DO PRIVATE(iblk)
Expand All @@ -301,9 +302,15 @@ subroutine evp (dt)
enddo
!$OMP END PARALLEL DO

if (maskhalo_dyn) &
call ice_HaloMask(halo_info_mask, halo_info, icetmask)
call ice_timer_stop(timer_bound)
if (maskhalo_dyn) then
call ice_timer_start(timer_bound)
halomask = 0
where (iceumask) halomask = 1
call ice_HaloUpdate (halomask, halo_info, &
field_loc_center, field_type_scalar)
call ice_timer_stop(timer_bound)
call ice_HaloMask(halo_info_mask, halo_info, halomask)
endif

do ksub = 1,ndte ! subcycling

Expand Down Expand Up @@ -369,6 +376,7 @@ subroutine evp (dt)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_NEcorner, field_type_vector)
endif
call ice_timer_stop(timer_bound)

! unload
!$OMP PARALLEL DO PRIVATE(iblk)
Expand All @@ -377,7 +385,6 @@ subroutine evp (dt)
vvel(:,:,iblk) = fld2(:,:,2,iblk)
enddo
!$OMP END PARALLEL DO
call ice_timer_stop(timer_bound)

enddo ! subcycling

Expand Down

0 comments on commit ac5d481

Please sign in to comment.