-
Notifications
You must be signed in to change notification settings - Fork 24
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: Refine support for coordinate dimensions in CF-compliant NetCDF files #2638
Comments
@hsoh-u, FYI, during the METplus engineering meeting on Tuesday 8/8, the team decided to reclassify this issue as a bug instead of an enhancement. As such, please fix this in the main_v11.1 branch first. |
MET picks the "height" variable as the vertical level instead of "percentile" because of the standard name. The "height" variable has only 1 value. This caused problem, only offset 0 works for vertical offset. MET code sets the coordinate variables by the standard names. The standard names as the coordinate variables are time, latitude, longitude, air_pressure, and height. The solution will be exclude them by looking at the dimensions. The workaround is removing the standard name and adding the long_name at the "height" variable.
|
…itch from v2 to the most recent v3. Also, instead of setting branch_name to the current branch being run, switch to using truth_data_version. That will be set to develop or main_vX.Y. For this branch, its set to main_v11.1 which will tell the METplus action to update the corresponding input data. Not 100% sure this will work, but its worth a try.
…mitted to the repo sometime during development.
Describe the Enhancement
This issue arose via GitHub discussion dtcenter/METplus#2273 from @robdarvell and is demonstrated by running the plot_data_plane tool. Use this file to demonstrate the issue:
percentile_extract_20230729T1200Z-B20230725T0030Z-visibility_at_screen_level.nc.gz
The goal is to retrieve 2D fields from this variable:
float visibility_in_air(percentile, projection_y_coordinate, projection_x_coordinate) ;
Plotting the 0-th percentile index works as expected:
plot_data_plane percentile_extract_20230729T1200Z-B20230725T0030Z-visibility_at_screen_level.nc plot.ps 'name="visibility_in_air"; level="(0,*,*)";'
Plotting the VALUE of the first percentile also works fine:
plot_data_plane percentile_extract_20230729T1200Z-B20230725T0030Z-visibility_at_screen_level.nc plot.ps 'name="visibility_in_air"; level="(@5,*,*)";'
However, plotting ANY OTHER index or percentile value produces a runtime error:
name="visibility_in_air"; level="(1,*,*)";'
name="visibility_in_air"; level="(@10,*,*)";'
name="visibility_in_air"; level="(6,*,*)";'
name="visibility_in_air"; level="(@50,*,*)";'
Here's the error:
I assumed that the changes for #1815 included in MET version 11.0.0 would enable this logic to work. In general, for an N-dimensional NetCDF variable, exactly 2 of those dimensions should define the X/Y dimensions. The remaining dimensions should be settable by specifying their index as an integer. Additionally, for coordinate variables (i.e. dimension and 1-d variable of the same name), MET should support the
@
syntax to specify the value for that dimension.This issue is to refine the logic to support the processing of this data.
Please fix this in the main_v11.1 branch to be included in an 11.1.1 bugfix release. Please also fix this in the develop branch to be included in the 12.0.0 official release.
Recommend adding a unit test using the input file.
Time Estimate
2 days?
Sub-Issues
Consider breaking the enhancement down into sub-issues.
None needed.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
2799991
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
None.
Enhancement Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Development issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: