diff --git a/cice/source/ice_dyn_eap.F90 b/cice/source/ice_dyn_eap.F90 index 63eeaae..e124e0c 100644 --- a/cice/source/ice_dyn_eap.F90 +++ b/cice/source/ice_dyn_eap.F90 @@ -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 @@ -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) @@ -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 @@ -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) @@ -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 diff --git a/cice/source/ice_dyn_evp.F90 b/cice/source/ice_dyn_evp.F90 index 6dfd0df..df3d4d1 100644 --- a/cice/source/ice_dyn_evp.F90 +++ b/cice/source/ice_dyn_evp.F90 @@ -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) @@ -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 @@ -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) @@ -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