Skip to content

Commit

Permalink
Looks good for the first few steps, then not so much.
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Nov 28, 2024
1 parent c28b41c commit 8ffb6f8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6084,6 +6084,14 @@ subroutine rotate_OBC_segment_data(segment_in, segment, turns)
segment%field(n)%handle = segment_in%field(n)%handle
segment%field(n)%dz_handle = segment_in%field(n)%dz_handle

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

if (modulo(turns, 2) /= 0) then
select case (segment_in%field(n)%name)
case ('U')
Expand All @@ -6094,7 +6102,7 @@ subroutine rotate_OBC_segment_data(segment_in, segment, turns)
segment%field(n)%name = 'Vphase'
case ('V')
segment%field(n)%name = 'U'
segment%field(n)%value = -segment%field(n)%value
segment%field(n)%buffer_dst(:,:,:) = -segment%field(n)%buffer_dst(:,:,:)
case ('Vamp')
segment%field(n)%name = 'Uamp'
case ('Vphase')
Expand All @@ -6118,14 +6126,6 @@ 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 Down

0 comments on commit 8ffb6f8

Please sign in to comment.