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

feat: define separate collections for each product, set each GRIB layer as an asset #5

Closed
wants to merge 33 commits into from

Conversation

hrodmn
Copy link
Collaborator

@hrodmn hrodmn commented Jun 12, 2024

This is an approach to #1 that treats individual slices of the GRIB files as assets. It is a big change from the approach in #3 because it a) does not depend on Herbie at all, and b) does not have separate collections for the different forecast hour sets (e.g. fh00-01 and fh02-48) and it includes byte range information that downstream applications can use to read small subsets of the GRIB files.

There are separate collections for each product (e.g. sfc, nat, etc).

The vision here is that it would be possible to perform a query of STAC items and load the assets into xarray with a very lightweight application (no eccodes or cfgrib or Herbie) by using the GDAL GRIB driver. This is an improvement over the metadata structure in #3 which would require much more application code in order to identify the byte subsets and parse the variables.

I opted to set the hrefs as /vsisubfile/{start_byte}_{size},/vsicurl/{grib_url}, but we could also set the hrefs to the plain old grib url and add the byte range data to the asset properties.

Here is a sample of the item metadata with one asset per GRIB layer:
https://github.com/developmentseed/noaa-hrrr/blob/9920bcb730cba4a29842e570847e6105c18f922d/examples/hrrr-conus-sfc-2024-05-10T12-FH0/hrrr-conus-sfc-2024-05-10T12-FH0.json#L59-L104

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@hrodmn hrodmn changed the title Subfile assets feat: subfile assets Jun 12, 2024
@hrodmn hrodmn changed the title feat: subfile assets feat: define STAC metadata with GRIB slices as assets Jun 13, 2024
@hrodmn hrodmn self-assigned this Jun 13, 2024
@hrodmn hrodmn marked this pull request as ready for review June 13, 2024 01:58
@hrodmn hrodmn marked this pull request as draft June 13, 2024 10:16
@hrodmn hrodmn changed the title feat: define STAC metadata with GRIB slices as assets feat: define separate collections for each product, set each GRIB layer as an asset Jun 13, 2024
@hrodmn
Copy link
Collaborator Author

hrodmn commented Jun 18, 2024

Closing in favor of #6

@hrodmn hrodmn closed this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant