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

fix: outgoing vertical coordinate should be 'height' in meters using zGridCenter #771

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

hkershaw-brown
Copy link
Member

Description:

mpas, observation vertical conversion was using zGridFace rather than zGridCenter

Following the call tree, using oncenters always

convert_vertical_obs
  -> convert_vert_distrib
     case (VERTISHEIGHT)
     -> find_vert_indices
        -> find_vert_level(oncenters = true)
           case (VERTEIGHT)
             if (oncenters)
             -> find_height_bounds(zGridCenter)

Fixes issue

fixes #524

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.

Skipped the early return so an obs with VERTISHEIGHT gets converted to VERTISHEIGHT.
main...hkershaw-brown:DART:bug_524_reproducer
see #524 (comment) for results.

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

You can grab my one obs test from /glade/derecho/scratch/hkershaw/DART/Bugs/bug_524/runs_524

…zGridCenter

fixes #524

Following the call tree, using oncenters always

convert_vertical_obs
  -> convert_vert_distrib
     case (VERTISHEIGHT)
     -> find_vert_indices
        -> find_vert_level(oncenters = true)
           case (VERTEIGHT)
             if (oncenters)
             -> find_height_bounds(zGridCenter)
@hkershaw-brown hkershaw-brown added the mpas Model for Prediction Across Scales (MPAS) label Nov 6, 2024
@hkershaw-brown hkershaw-brown assigned mjs2369 and unassigned mjs2369 Nov 7, 2024
Copy link
Contributor

@mjs2369 mjs2369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and tested this change using the one obs test in /glade/derecho/scratch/hkershaw/DART/Bugs/bug_524/runs_524 and print statements committed to https://github.com/hkershaw-brown/DART/tree/bug_524_reproducer

With the code skipping the early return for ztypein == ztypeout == VERTISHIEGHT, the
vert values coming in and out of convert_vert_distrib are the same when using zGridCenter instead of zGridFace, as they should be.

MS zin(:)    12045.3370000000
MS zout(:)   12045.3370000000

@hkershaw-brown hkershaw-brown added the release! bundle with next release label Nov 12, 2024
@hkershaw-brown hkershaw-brown merged commit 62edc59 into main Nov 12, 2024
4 checks passed
@hkershaw-brown hkershaw-brown deleted the mpas-fix-height-localization branch November 12, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mpas Model for Prediction Across Scales (MPAS) release! bundle with next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: when localizing in height, the mpas_atm model_mod may compute an incorrect vertical location
2 participants