-
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: Fix support for the YYYYMMDD format in NetCDF level timestrings #2482
Comments
@John-Sharples thanks for letting us know about this unexpected change in behavior. I suspect this change happened during development for MET version 11.0.0 when we added support for referencing dimensions by their value rather than just by their index (dtcenter/MET#1815). Our intention has been to support time strings following this convention: YYYYMMDD[_HH[MMSS]], where the square brackets are optional. So July 30, 2013 could be written as 20130730, 20130730_00, or 20130730_000000. But I just tested the current state of the develop branch and confirmed the behavior you describe. While 20130730_00 and 20130730_000000 are processed as expected, using 20130730 does not:
While that same command works just fine for MET version 10.0.0:
|
@hsoh-u, please take a look at this unexpected change in behavior. Let's treat this as a bug and provide a fix for it in both the main_v11.0 and develop branches. While MET version 10.1.0 supports NetCDF timestrings YYYYMMDD, YYYYMMDD_HH, and YYYYMMDD_HHMMSS formats, MET version 11.0.0 NO LONGER supports the YYYYMMDD format. Dropping this support was unintentional to my knowledge and I'd like to add it back in. If you're not already doing so, please call the timestring_to_unix() function to parse the timestring. That supports even a wider variety of time formats. Please also add to the develop branch a unit test to demonstrate using the YYYYMMDD format to ensure that usage continue to work. |
It's caused by the order of checking: string as an integer or string as a time (yyyymmdd).
|
Bugfix #2482 develop time slicing yyyymmdd
…dd_main_v11.0 Bugfix #2482 main_v11.0 time slicing yyyymmdd
I'm currently testing a move from METplus 4.1.3 (MET 10.1.2) to 5.0.0 (11.0.0), and noticed this change in behaviour.
Might be bug, but there's an easy work around, so reporting as a request for enhanced doco. I couldn't see anything in the release notes or any related issues, please close if already documented somewhere.
Describe the Enhancement
With METplus 4.1.3 I can run the following without errors
plot_data_plane some_fcst.nc output.ps 'name="apcp";level="(20230102,*,*)";'
With METplus 5.0.0 I get the following:
The workaround is to provide the date string with full HHMMSS format. e.g.
plot_data_plane some_fcst.nc output.ps 'name="apcp";level="(20230102_000000,*,*)";'
Note that this also applies to other tools. For example, to avoid similar errors in GridStat
FCST_VAR1_LEVELS = "({valid?fmt=%Y%m%d},*,*)"
Should become
FCST_VAR1_LEVELS = "({valid?fmt=%Y%m%d_%H%M%S},*,*)"
Time Estimate
Not much.
Sub-Issues
Consider breaking the enhancement down into sub-issues.
Relevant Deadlines
NONE.
Funding Source
NONE.
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
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: