Skip to content

Commit

Permalink
Nullify a pointer in neutral diffusion unit tests
Browse files Browse the repository at this point in the history
  Nullified a pointer used in neutral diffusion unit tests.  Without this
correction of a problem introduced two commits ago, these unit tests would
sometimes fail, but all solutions are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Apr 15, 2020
1 parent 7643bce commit 030a636
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,7 @@ logical function ndiff_unit_tests_discontinuous(verbose)
real, dimension(ns-1) :: hEff, Flx
type(neutral_diffusion_CS) :: CS !< Neutral diffusion control structure
type(EOS_type), pointer :: EOS !< Structure for linear equation of state
type(unit_scale_type), pointer :: US !< A dimensional unit scaling type
type(unit_scale_type), pointer :: US => NULL() !< A dimensional unit scaling type
type(remapping_CS), pointer :: remap_CS !< Remapping control structure (PLM)
real, dimension(nk,2) :: ppoly_T_l, ppoly_T_r ! Linear reconstruction for T
real, dimension(nk,2) :: ppoly_S_l, ppoly_S_r ! Linear reconstruction for S
Expand Down Expand Up @@ -2584,6 +2584,8 @@ logical function ndiff_unit_tests_discontinuous(verbose)
(/12.,0./), (/34.,2./)), "Salt stratified Linearized Alpha/Beta"))
if (.not. ndiff_unit_tests_discontinuous) write(*,*) 'Pass'

deallocate(US)

end function ndiff_unit_tests_discontinuous

!> Returns true if a test of fv_diff() fails, and conditionally writes results to stream
Expand Down

0 comments on commit 030a636

Please sign in to comment.