Skip to content

Commit

Permalink
Copy reservoir to OBC%tres_* again for BGC tracers (they are 0 when f…
Browse files Browse the repository at this point in the history
…irst copied)
  • Loading branch information
andrew-c-ross committed Sep 14, 2022
1 parent cb23d7a commit c1acb36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4817,6 +4817,7 @@ subroutine fill_obgc_segments(G, GV, OBC, tr_ptr, tr_name)
integer :: isd, ied, IsdB, IedB, jsd, jed, JsdB, JedB, n, nz, nt
integer :: i, j, k
type(OBC_segment_type), pointer :: segment => NULL() ! pointer to segment type list
real :: I_scale

if (.not. associated(OBC)) return
call pass_var(tr_ptr, G%Domain)
Expand All @@ -4832,6 +4833,7 @@ subroutine fill_obgc_segments(G, GV, OBC, tr_ptr, tr_name)
jsd = segment%HI%jsd ; jed = segment%HI%jed
IsdB = segment%HI%IsdB ; IedB = segment%HI%IedB
JsdB = segment%HI%JsdB ; JedB = segment%HI%JedB
I_scale = 1.0 ; if (segment%tr_Reg%Tr(nt)%scale /= 0.0) I_scale = 1.0 / segment%tr_Reg%Tr(nt)%scale
! Fill with Tracer values
if (segment%is_E_or_W) then
I=segment%HI%IsdB
Expand All @@ -4841,6 +4843,7 @@ subroutine fill_obgc_segments(G, GV, OBC, tr_ptr, tr_name)
else
segment%tr_Reg%Tr(nt)%t(I,j,k) = tr_ptr(i,j,k)
endif
OBC%tres_x(I,j,k,nt) = I_scale * segment%tr_Reg%Tr(nt)%t(I,j,k)
enddo ; enddo
else
J=segment%HI%JsdB
Expand All @@ -4850,6 +4853,7 @@ subroutine fill_obgc_segments(G, GV, OBC, tr_ptr, tr_name)
else
segment%tr_Reg%Tr(nt)%t(i,J,k) = tr_ptr(i,j,k)
endif
OBC%tres_y(i,J,k,nt) = I_scale * segment%tr_Reg%Tr(nt)%t(i,J,k)
enddo ; enddo
endif
segment%tr_Reg%Tr(nt)%tres(:,:,:) = segment%tr_Reg%Tr(nt)%t(:,:,:)
Expand Down

0 comments on commit c1acb36

Please sign in to comment.