Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Convert NWP grib files to Zarr intermediate #357

Merged
merged 56 commits into from
Nov 16, 2021

Conversation

JackKelly
Copy link
Member

@JackKelly JackKelly commented Nov 9, 2021

Pull Request

Description

Write a script to convert NWP native files (in grib format) to a Zarr.

Fixes #344

This script ended up being more complex than I was imagining!

Later, as part of #359, this script will be moved into its own repository, and the functions will be put into a nice little Python package (with unittests!)

How Has This Been Tested?

The script runs successfully and has converted all our NWP data to Zarr.

  • No
  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@JackKelly JackKelly added enhancement New feature or request data New data source or feature; or modification of existing data source labels Nov 9, 2021
@JackKelly JackKelly self-assigned this Nov 9, 2021
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

JackKelly and others added 24 commits November 9, 2021 17:35
…otebook so will definitely break auto checks
@JackKelly JackKelly marked this pull request as ready for review November 15, 2021 11:23
)


@click.command()
Copy link
Contributor

Choose a reason for hiding this comment

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

nice use of click

4) Use multiple worker processes. Each worker process is given a list of
grib files associated with a single NWP init datetime. The worker process loads these grib
files and does some simple post-processing, and then the worker process appends to the
destination zarr.
Copy link
Contributor

Choose a reason for hiding this comment

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

great notes

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

For me it looks all very good. I like the docs and comments you have done. That makes it a lot easier.

There's probably a few things like

Copy link
Member

@jacobbieker jacobbieker left a comment

Choose a reason for hiding this comment

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

LGTM! I like all the comments. Made it really easy to follow

@JackKelly JackKelly merged commit a6dd98e into main Nov 16, 2021
@JackKelly JackKelly deleted the jack/convert-nwp-grib-to-zarr branch November 16, 2021 09:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
data New data source or feature; or modification of existing data source enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Convert NWP grib files to Zarr intermediate
3 participants