Skip to content

Commit

Permalink
(*)Simplified convert_thickness with no eqn of state
Browse files Browse the repository at this point in the history
  Refactored convert_thickness to use a much simpler expression for
non-Boussinesq cases without an equation of state.  This could change answers in
such cases, but all answers are bitwise identical for the MOM6-examples test
cases.
  • Loading branch information
Hallberg-NOAA committed Oct 1, 2019
1 parent 235d3b6 commit e4fea0a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -993,9 +993,7 @@ subroutine convert_thickness(h, G, GV, US, tv)
enddo
else
do k=1,nz ; do j=js,je ; do i=is,ie
h(i,j,k) = (h(i,j,k) * US%R_to_kg_m3*GV%Rlay(k)) * Hm_rho_to_Pa * GV%kg_m2_to_H**2
! This is mathematically equivalent to
! h(i,j,k) = h(i,j,k) * (GV%Rlay(k) / GV%Rho0)
h(i,j,k) = h(i,j,k) * (GV%Rlay(k) / GV%Rho0)
enddo ; enddo ; enddo
endif
endif
Expand Down

0 comments on commit e4fea0a

Please sign in to comment.