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

Fix parsing of timestamps in CF-compliant files produced by CDO. #1331

Closed
18 tasks done
JohnHalleyGotway opened this issue May 12, 2020 · 0 comments
Closed
18 tasks done
Assignees
Labels
MET: Library Code requestor: NCAR/RAL NCAR Research Applications Laboratory type: enhancement Improve something that it is currently doing
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented May 12, 2020

Describe the Enhancement

Running the cdo tool using the -import_binary option to read GraDS data produces a CF-compliant NetCDF output file. However the MET tools are not able to parse the timestamps used therein.

Here is an example:

cdo -f nc import_binary 20190710H1radar.ctl 20190710H1radar.nc
plot_data_plane 20190710H1radar.nc r_lev_7000.ps 'name="r"; level="(0,14,,)";'

Only issue is this warning message:
WARNING: parse_cf_time_string() -> unexpected NetCDF CF convention time unit "hours since 1-1-1 00:00:00"

I ran the date command to double-check that the math is correct:

date -ud '0001-01-01 UTC '17694048' hours' +%Y%m%d%H
2019071300

We just need to enable the year, month, and day to accept values of 1.

Time Estimate

2 hours.

Sub-Issues

Consider breaking the enhancement down into sub-issues.
None required.

Relevant Deadlines

None

Funding Source

This is needed for the HAFS METplus use-case to enable MET to handle the output from cdo.
Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required (John Halley Gotway)
  • Select scientist(s) or no scientist required (no scientist required)

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones
  • Select milestone

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update unit tests - no changes.
  • Add/update documentation - no changes.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: enhancement Improve something that it is currently doing component: library code requestor: NCAR/RAL NCAR Research Applications Laboratory labels May 12, 2020
@JohnHalleyGotway JohnHalleyGotway added this to the MET 9.0.2 (bugfix) milestone May 12, 2020
@JohnHalleyGotway JohnHalleyGotway self-assigned this May 12, 2020
JohnHalleyGotway added a commit that referenced this issue May 12, 2020
…1 to 4 digit years, 1 to 2 digit months, and 1 to 2 digit days.
@JohnHalleyGotway JohnHalleyGotway added this to To do in MET-9.1-beta2 (7/14/20) via automation May 12, 2020
JohnHalleyGotway added a commit that referenced this issue May 12, 2020
…1 to 4 digit years, 1 to 2 digit months, and 1 to 2 digit days. (#1332)
MET-9.1-beta2 (7/14/20) automation moved this from To do to Done May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MET: Library Code requestor: NCAR/RAL NCAR Research Applications Laboratory type: enhancement Improve something that it is currently doing
Projects
No open projects
Development

No branches or pull requests

1 participant