Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add halo updates on uvelE, vvelE, uvelN, and vvelN #23

Merged
merged 5 commits into from
Nov 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module ice_dyn_evp
use ice_kinds_mod
use ice_communicate, only: my_task, master_task
use ice_constants, only: field_loc_center, field_loc_NEcorner, &
field_loc_Nface, field_loc_Eface, &
field_type_scalar, field_type_vector
use ice_constants, only: c0, p027, p055, p111, p166, &
p222, p25, p333, p5, c1
Expand Down Expand Up @@ -483,6 +484,23 @@ subroutine evp (dt)
call unstack_velocity_field(fld2, uvel, vvel)
call ice_timer_stop(timer_bound)

if (grid_system == 'CD') then

call ice_timer_start(timer_bound)
! velocities may have changed in dyn_prep2
call stack_velocity_field(uvelN, vvelN, fld2)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Nface, field_type_vector)
call unstack_velocity_field(fld2, uvelN, vvelN)
! velocities may have changed in dyn_prep2
call stack_velocity_field(uvelE, vvelE, fld2)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Eface, field_type_vector)
call unstack_velocity_field(fld2, uvelE, vvelE)
call ice_timer_stop(timer_bound)

endif

if (maskhalo_dyn) then
call ice_timer_start(timer_bound)
halomask = 0
Expand Down Expand Up @@ -625,6 +643,23 @@ subroutine evp (dt)
call ice_timer_stop(timer_bound)
call unstack_velocity_field(fld2, uvel, vvel)

if (grid_system == 'CD') then

call ice_timer_start(timer_bound)
! velocities may have changed in dyn_prep2
call stack_velocity_field(uvelN, vvelN, fld2)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Nface, field_type_vector)
call unstack_velocity_field(fld2, uvelN, vvelN)
! velocities may have changed in dyn_prep2
call stack_velocity_field(uvelE, vvelE, fld2)
call ice_HaloUpdate (fld2, halo_info, &
field_loc_Eface, field_type_vector)
call unstack_velocity_field(fld2, uvelE, vvelE)
call ice_timer_stop(timer_bound)

endif

enddo ! subcycling
endif ! evp_algorithm

Expand Down