Skip to content

Commit

Permalink
Revert masking of depth
Browse files Browse the repository at this point in the history
Using the masked depth (mask2dT * bathyT) was observed to change energy
values within floating point precision, so the changes have been
reverted.  This may be revised at a later time, when we are prepared to
update the energy stats to the new values in the regression tests.

The depth checksum attribute has also been renamed to reflect this
change.  This will allow us to re-define the variable as masked at some
later date, and can distinguish between the masked and unmasked
checksums during testing.
  • Loading branch information
marshallward committed Apr 25, 2019
1 parent 61a96a8 commit 9a1422f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/diagnostics/MOM_sum_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ module MOM_sum_output
! vary with the Boussinesq approximation, the Boussinesq variant is given first.

integer, parameter :: NUM_FIELDS = 17 !< Number of diagnostic fields
character (*), parameter :: depth_chksum_attr = "mask2dT_bathyT_checksum"
!< Checksum attribute name of
!! G%mask2dT * G%bathyT over the compute
!! domain
character (*), parameter :: depth_chksum_attr = "bathyT_checksum"
!< Checksum attribute name of G%bathyT
!! over the compute domain
character (*), parameter :: area_chksum_attr = "mask2dT_areaT_checksum"
!< Checksum attribute of name of
!! G%mask2dT * G%areaT over the compute
Expand Down Expand Up @@ -75,10 +74,10 @@ module MOM_sum_output
real :: D_list_min_inc !< The minimum increment [Z ~> m], between the depths of the
!! entries in the depth-list file, 0 by default.
logical :: require_depth_list_chksum
!< Require matching checksums in Depth_list.nc when reading
!< Require matching checksums in Depth_list.nc when reading
!! the file.
logical :: update_depth_list_chksum
!< Automatically update the Depth_list.nc file if the
!< Automatically update the Depth_list.nc file if the
!! checksums are missing or do not match current values.
logical :: use_temperature !< If true, temperature and salinity are state variables.
real :: fresh_water_input !< The total mass of fresh water added by surface fluxes
Expand Down Expand Up @@ -1128,7 +1127,7 @@ subroutine create_depth_list(G, CS)
i_global = i + G%idg_offset - (G%isg-1)

list_pos = (j_global-1)*G%Domain%niglobal + i_global
Dlist(list_pos) = G%mask2dT(i,j) * G%bathyT(i,j)
Dlist(list_pos) = G%bathyT(i,j)
Arealist(list_pos) = G%mask2dT(i,j) * G%areaT(i,j)
enddo ; enddo

Expand Down

0 comments on commit 9a1422f

Please sign in to comment.