generated from stactools-packages/template
-
Notifications
You must be signed in to change notification settings - Fork 1
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, define GRIB layers with byte ranges in 'grib:layers' asset metadata #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Split into collections by region/product/forecast hour set
hrodmn
commented
Jun 17, 2024
Comment on lines
+127
to
+142
RENDER_PARAMS = { | ||
Product.sfc: { | ||
"WIND__10_m_above_ground__periodic_max": { | ||
"title": "Wind speed (m/s) 10 m above ground", | ||
"colormap_name": "viridis", | ||
"rescale": [[0, 20]], | ||
"resampling": "nearest", | ||
}, | ||
"DSWRF__surface__point_in_time": { | ||
"title": "Downward Short-Wave Radiation Flux (W/m2)", | ||
"colormap_name": "rainbow", | ||
"rescale": [[0, 800]], | ||
"resampling": "nearest", | ||
}, | ||
} | ||
} |
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.
@abarciauskas-bgse @vincentsarago the render parameters are not complete because we will need to specify the layer-specific dsn
rather than specify a STAC asset.
This was referenced Jun 18, 2024
hrodmn
commented
Jun 18, 2024
hrodmn
added a commit
that referenced
this pull request
Jun 20, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 20, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 20, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 20, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 20, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 21, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 21, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
hrodmn
added a commit
that referenced
this pull request
Jun 24, 2024
…s with byte ranges in 'grib:layers' asset metadata (#6) * define collection + item + asset structure * add grib:layers asset property for describing layers within GRIB2 files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After a lengthy discussion in #1 and #3, this is the approach that I have settled on for representing the HRRR data in STAC metadata to start. The
grib:layers
property for each .grib asset will enable applications to construct coherent xarray datasets from anItem
orItemCollection
.Check out the
examples/
folder for example collection and item metadata.STAC metadata structure
sfc
,prs
,nat
, andsubh
datacube
extension metadata"grib"
: actual file containing data"index"
: .grib2.idx sidecar file with layer-level metadata"grib"
asset, agrib:layers
property with details about each layer in the .grib2 filestart_byte
,byte_size
.Advantages
grib:layers
property from thegrib
asset in each item to create layer-specificdsns
that the GDAL GRIB driver can read/vsisubfile
:/vsisubfile/{layer['start_byte']}_{layer['byte_size']},/vsicurl/{grib_asset.href}
href://
: `vrt:///vsicurl/{grib_asset.href}?bands={layer['grib_message']}Disadvantages
Considerations
vrt
syntax with the band index of interest. If we want to leave the byte range data out of the STAC metadata and think harder about whether or not that belongs in STAC, that would be fine. We would still need some layer-level metadata but the byte ranges are not absolutely necessary.