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

feature_2225_level_string_with_at #2233

Merged
merged 1 commit into from
Aug 18, 2022
Merged

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Aug 17, 2022

Expected Differences

The level string (begins with @) is applied as the value only.
The current implementation two more steps and they are disabled

  1. with @: if the value does not exist: apply the value as offset. For example, MET is looking for the value "29" first with @29. If there is no matching value and the dimension is greater than 29, MET applies 29 as offset.
  2. without @: if the offset is out of range (a negative value or bigger than dimension), it's applied as value. For example, (2000,,), If the dimension is less than 2000, MET finds the level with value 2000.
  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [ No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

The following tests should fail:

./plot_data_plane /d1/personal/hsoh/data/MET-1815/gfs_2012040900_F012.nc plot.ps 'name="PRES_4_PVL"; level="(2000,*,*)"; file_type=NETCDF_NCCF;' -v 4
./plot_data_plane /d1/personal/hsoh/data/MET-1815/gfs_2012040900_F012.nc plot.ps 'name="PRES_4_PVL"; level="(@1,*,*)"; file_type=NETCDF_NCCF;' -v 4
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]

  • Do these changes include sufficient testing updates? [No]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [Fill in date].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Development with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

I approve of these changes.

I reviewed the small set of code changes, but also tested the compiled code. I confirmed that...

  1. Specifying the '@' symbol forces the interpretation of the value.
  2. Omitting the '@' symbol forces the interpretation of the dimension index.
  3. The use of '@' remains optional when specifying the value as a timestring in YYYYMMDD_HH[MMSS] format, where the MMSS part is optional.

@hsoh-u hsoh-u merged commit a44176e into develop Aug 18, 2022
@hsoh-u hsoh-u deleted the feature_2225_level_string_with_at branch August 18, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Refine NetCDF level string handling logic to always interpret @ strings as values
2 participants