Skip to content

Commit

Permalink
Copy Hml into sfc_state, so that caps can access it
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Sep 24, 2018
1 parent 6ccd94c commit 9f0676e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2717,6 +2717,13 @@ subroutine extract_surface_state(CS, sfc_state)
sfc_state%sea_lev(i,j) = CS%ave_ssh_ibc(i,j)
enddo ; enddo

! copy Hml into sfc_state, so that caps can access it
if (associated(CS%Hml)) then
do j=js,je ; do i=is,ie
sfc_state%Hml(i,j) = CS%Hml(i,j)
enddo ; enddo
endif

if (CS%Hmix < 0.0) then ! A bulk mixed layer is in use, so layer 1 has the properties
if (use_temperature) then ; do j=js,je ; do i=is,ie
sfc_state%SST(i,j) = CS%tv%T(i,j,1)
Expand All @@ -2729,9 +2736,6 @@ subroutine extract_surface_state(CS, sfc_state)
sfc_state%v(i,J) = v(i,J,1)
enddo ; enddo

if (associated(CS%Hml)) then ; do j=js,je ; do i=is,ie
sfc_state%Hml(i,j) = CS%Hml(i,j)
enddo ; enddo ; endif
else ! (CS%Hmix >= 0.0)

depth_ml = CS%Hmix
Expand Down Expand Up @@ -2773,7 +2777,6 @@ subroutine extract_surface_state(CS, sfc_state)
else
sfc_state%sfc_density(i,j) = sfc_state%sfc_density(i,j) / depth(i)
endif
sfc_state%Hml(i,j) = depth(i)
enddo
enddo ! end of j loop

Expand Down

0 comments on commit 9f0676e

Please sign in to comment.