Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOM_shared_initialization.F90: Unintended land mask changes with use of TOPO_EDITS_FILE, positive MASKING_DEPTH value and shallower depth edits #1419

Open
jr3cermak opened this issue Jun 9, 2021 · 0 comments

Comments

@jr3cermak
Copy link

This bug triggered through use of the TOPO_EDITS_FILE feature. A positive MASKING_DEPTH with shallower depth edits will cause unintended land mask changes.

      if (new_depth(n)/=0.) then
        write(stdout,'(a,3i5,f8.2,a,f8.2,2i4)') &
          'Ocean topography edit: ', n, ig(n), jg(n), D(i,j)/m_to_Z, '->', abs(new_depth(n)), i, j
        D(i,j) = abs(m_to_Z*new_depth(n)) ! Allows for height-file edits (i.e. converts negatives)
      else
        if (topo_edits_change_mask) then
          write(stdout,'(a,3i5,f8.2,a,f8.2,2i4)') &
            'Ocean topography edit: ',n,ig(n),jg(n),D(i,j)/m_to_Z,'->',abs(new_depth(n)),i,j
            D(i,j) = abs(m_to_Z*new_depth(n)) ! Allows for height-file edits (i.e. converts negatives)
        else
          call MOM_error(FATAL, ' apply_topography_edits_from_file: '//&
            "A zero depth edit would change the land mask and is not allowed in"//trim(topo_edits_file))
        endif
herrwang0 added a commit to herrwang0/MOM6 that referenced this issue Jul 31, 2021
This commit fixes a bug in subroutine apply_topography_edits_from_file() that
assumes mask_depth=0.
This fix should resolve issue mom-ocean#1419.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant