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

Bugfix: Fix PBL derivation bug in main_v11.1 by porting over fix from develop #2902

Closed
9 of 23 tasks
JohnHalleyGotway opened this issue May 23, 2024 · 0 comments · Fixed by #2903
Closed
9 of 23 tasks
Assignees
Labels
MET: PreProcessing Tools (Point) priority: high High Priority requestor: DTC/SRW DTC Short Range Weather T&E type: bug Fix something that is not working

Comments

@JohnHalleyGotway
Copy link
Collaborator

Describe the Problem

This issue arose via the dtcenter/METplus#2599. @gsketefian points out that the PB2NC tool does not create reproducible results for MET version 11.1.0. Testing reveals that the differences arise when deriving the following 2 PBL observations:

ADPUPA 71722   20190615_000000 46.30  -76.0000  192 PBL          NA     0.0000 2   418.00000000
ADPUPA 74560   20190615_000000 40.15  -89.3400  179 PBL          NA     0.0000 9  8965.00000000

Here's detailed log output that demonstrate the issue:

DEBUG 8: compute_pbl() input to calpbl_ (buffer): index, P, Q, T, Z, U, V
DEBUG 8: compute_pbl()   0	 9975264256.00000 0.00000 -2291927040.00000 -29473247232.00000 6.50000 -1.70000
DEBUG 8: compute_pbl()   1	 93960.00000 0.00659 286.96384 610.00000 6.50000 -1.70000
DEBUG 8: compute_pbl()   2	 97400.00000 0.00840 289.29169 305.00000 2.00000 0.70000
DEBUG 8: compute_pbl()   3	 98700.00000 0.00906 290.14999 192.00000 -9999.00000 -9999.00000
DEBUG 7:  hpbl: 592.493, obs_arr[4]: 400.493   lat: 46.3, lon: -76, elv: 192 20190615_000000 ADPUPA 71722

Note that bad values being passed as input the calpbl_ function.
This bad data arises during the pressure-level-reversal step. Pressure level data is read from the PREPBUFR file in decreasing pressure level order (i.e. surface level first). The PBL derivation logic expects data in the opposite order (i.e. surface level last). The bug occurs in the reversal step.

This bug does NOT exist in the develop branch since it was fixed by this commit:
f051fac88e9e5e2632d2c9ef38de8fa8a3315fc3

For this issue, simply cherry-pick that commit from develop into main_v11.1 and confirm that the log messages listed above no longer contain garbage values.

To Reproduce

Go to seneca:/d1/projects/METplus/discussions/2599 and run test_pb2nc.sh.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next bugfix version
  • Select Coordinated METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y.Z Development project for development toward the next official release

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next bugfix version
    Select: Coordinated METplus-X.Y Support project for support of the current coordinated release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y.Z Development project for development toward the next official release
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: bug Fix something that is not working alert: NEED ACCOUNT KEY Need to assign an account key to this issue requestor: DTC/SRW DTC Short Range Weather T&E MET: PreProcessing Tools (Point) priority: high High Priority labels May 23, 2024
@JohnHalleyGotway JohnHalleyGotway added this to the MET 11.1.1 (bugfix) milestone May 23, 2024
@JohnHalleyGotway JohnHalleyGotway self-assigned this May 23, 2024
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix: Port working PBL logic from the develop branch to main_v11.1 Bugfix: Fix PBL derivation bug in main_v11.1 by porting over fix from develop May 23, 2024
@JohnHalleyGotway JohnHalleyGotway linked a pull request May 23, 2024 that will close this issue
17 tasks
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Coordinated METplus-5.1 Support May 24, 2024
@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED ACCOUNT KEY Need to assign an account key to this issue label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MET: PreProcessing Tools (Point) priority: high High Priority requestor: DTC/SRW DTC Short Range Weather T&E type: bug Fix something that is not working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant