Skip to content

Commit

Permalink
Another OBC fix, this for the barotropic mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Nov 22, 2024
1 parent 52605fb commit 677baba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6117,6 +6117,14 @@ subroutine rotate_OBC_segment_data(segment_in, segment, turns)
segment%field(n)%buffer_src)
endif

if (allocated(segment_in%field(n)%buffer_dst)) then
call allocate_rotated_array(segment_in%field(n)%buffer_dst, &
lbound(segment_in%field(n)%buffer_dst), turns, &
segment%field(n)%buffer_dst)
call rotate_array(segment_in%field(n)%buffer_dst, turns, &
segment%field(n)%buffer_dst)
endif

segment%field(n)%nk_src = segment_in%field(n)%nk_src

if (allocated(segment_in%field(n)%dz_src)) then
Expand All @@ -6130,6 +6138,8 @@ subroutine rotate_OBC_segment_data(segment_in, segment, turns)
segment%field(n)%value = segment_in%field(n)%value
enddo

call rotate_array(segment_in%SSH, turns, segment%SSH)

segment%temp_segment_data_exists = segment_in%temp_segment_data_exists
segment%salt_segment_data_exists = segment_in%salt_segment_data_exists
end subroutine rotate_OBC_segment_data
Expand Down

0 comments on commit 677baba

Please sign in to comment.