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

Reading Grib1 datasets by name #8

Closed
da-br opened this issue Nov 23, 2023 · 1 comment
Closed

Reading Grib1 datasets by name #8

da-br opened this issue Nov 23, 2023 · 1 comment

Comments

@da-br
Copy link
Contributor

da-br commented Nov 23, 2023

Hello,

I would like to use this library to read grib1 files.

The following image is the sample file marine-lion_corse.grb opened in Panoply

image

Reading it in NGrib only shows undefined parameter names.

image

I am looking to do something like:

var allRecords = _gribReader.ReadRecords();
var record = allRecords.First(r => r.ProductDefinitionSection.Parameter.Name == "wantedDataSetName");
var data = _gribReader.ReadRecordRawData(record);

Is this currently possible?

Specifications

  • Version: 0.9.0
  • Platform: Windows
  • DotNet Version: netstandard2.0
@da-br
Copy link
Contributor Author

da-br commented Nov 23, 2023

Okay, I just read the ecmwf grib1 format spec and I can answer my own question 😄

By using code tables I can map the parameter number to the name. But I more than likely won't even bother and just use the parameter number as a lookup

Thanks

@da-br da-br closed this as completed Nov 23, 2023
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

No branches or pull requests

1 participant