-
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 3056 ugrid forecast reference time #3061
Conversation
Note that I switched the label from pull request: MODIFIES OUTPUT FORMAT to pull request: MODIFIES OUTPUT DATA. This PR won't change the format of the output, but for those running with LFRic inputs, the output data values (namely the timestamps) will change, which we're flagging with the "MODIFIES OUTPUT DATA" label. |
…oughout to more clearly indicate that this configuration is for lfric data that's been interpolated in the vertical to pressure levels.
…ore realistic comparisons at 2 pressure levels and don't write .stat and _mpr.txt because the data is duplicated.
There was a problem hiding this 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.
Thanks @hsoh-u for all your work on this. Note that I made the following changes:
- Renamed
ugrid_lfric2
tougrid_pressure_levels
throughout. - Tweaked comments in UGrid config files for consistency and clarity.
- Refined the newly added UGrid unit test to make more reasonable comparisons.
New new unit test confirms that the forecast_reference_time
value is used to now being used, as intended:
DEBUG 4: get_init_time(NcFile *, string &) -> get InitTime (20120409_000000) from "forecast_reference_time" variable (value=0).
Along the way, I found two suggestions for improvement:
- MET does not support verifying a range of UGrid pressure levels. Configuring with
level="(21-24,*)";
produces:
ERROR :
ERROR : VarInfoUGrid::set_dict() -> Multiple vertical levels ((21-24,*)) for UGrid are not supported
ERROR :
Recommend adding support for this in future versions.
2. The @value
notation does not work. Configuring with level="(@500,*)";
produces:
ERROR :
ERROR : UGridFile::getData(NcVar *, const LongArray &, DataPlane &) -> bad arguments:
Nelements = 2
Nalloc = 2
AllocInc = 10
Element # 0 = -123456
Element # 1 = -12345
Recommend adding support for the @value
notation for UGrid inputs in future versions.
While the SonarQube run did flag new code smells, these changes reduce the overall number of code smells from 17,927 in develop down to 17,907.
Expected Differences
InitTime was from the actual time variable before. It's changed to set from the forecast_reference_time variable if exists.
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
Added an unit test.
Here is a command example:
N/A or run point_stat with LFRic data which has forecast_reference_time variable
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? [Yes]
An unittest is added.
If yes, describe the new output and/or changes to the existing output:
Two more new outputs
point_stat_ugrid/point_stat_UGRID_LFRIC2_180000L_20120409_180000V.stat
point_stat_ugrid/point_stat_UGRID_LFRIC2_180000L_20120409_180000V_mpr.txt
Will this PR result in changes to existing METplus Use Cases? [No]
If yes, create a new Update Truth METplus issue to describe them.
Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
Please complete this pull request review by [Fill in date].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases