GithubHelp home page GithubHelp logo

nmangue / ngrib Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 10.0 23.37 MB

NGrib is a .NET library to read GRIB (GRid in Binary) files. GRIB is a gridded data standard from WMO (World Meteorological Organisation) and is used by many meteorological organisation. Fork of GribCS.

License: GNU Lesser General Public License v3.0

C# 100.00%

ngrib's Introduction

NGrib

NGrib is a .NET library to read GRIB (GRid in Binary) files. GRIB is a gridded data standard from WMO (World Meteorological Organisation) and is used by many meteorological organisation. Fork of GribCS.

ngrib's People

Contributors

andydekiert avatar arnimschinz avatar bartdevriendt avatar da-br avatar nmangue avatar pgerber-hydrique avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ngrib's Issues

PolarStereographicGridDefinition.EnumerateGridPoints Not Implemented Exception - when reader.GetDatasetValues is called

I am getting a not implemented exception while using the GetDatasetsValues. Mostly to test how complete the library is and what yet needs to be implemented to make it fully functional for my usecase. Are there plans to complete some of this work in the near future? And am I using it correctly? ReadMessages and ReadAllDatasets seems to do most of what I need but now wondering if those are iterating through all the data completely. I would like to help, but interested in your feedback.

image

GRIB2 - Template 42

Hello there folks,

At ECMWF - a major producer of GRIB files of weather data - they are undergoing a transition of sorts. They want to use GRIB2 exclusively, as it offers superior compression to GRIB1. The can move more data more quickly the more compressed it is.

The data, which can be obtained here: https://registry.opendata.aws/ecmwf-forecasts/ is, as near as I can tell, causing problems for NGRIB.

Iin essence we need to be able to add in a DataRepresentation section that handles template 42, I think. Details:
Section 5 - Template 42 : Grid point data - CCSDS recommended lossless compression](https://codes.ecmwf.int/grib/format/grib2/templates/5/42/)

Regards,
Brian E. / Dadoof

Missing grib2 definitions

Hi,

While trying to parse data from the ICON-EU model, I saw that the parameter that was of interest to me was missing from the code tables. The result is that the parameter field of the definition section is set to null.

The parameter in question is 52 from table 4.2 or Total Precipitation Rate (TPRATE). (ref: [https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-1.shtml])

Would be ok to add some missing Grib2 definitions ?

Best.

Grib1Reader ReadRecordRawData only returning 0 values

Hello again ๐Ÿ˜„ ,

Let me preface this by saying I am new to Grib files in general.


When calling ReadRecordRawData on a grib1 file I only retrieve values = 0. I have worked my way through the library code a little and can see Brib1BinaryDataSection.isConstant = true which means the number of bits per value is 0 and therefore returning the refValue (0 in this case)

I can use the grib1 file in the test folder which does return values. I assume it must be the files I am using

When opening the file in Panoply some of the values are displayed as NaN. Not sure if this will have any affect.

image

I am not sure I can attach the file being used, I will find out and attach it if I can.

Any help would be appreciated.


Latest version of NGrib
Windows
DotNet 472

Reading Grib1 datasets by name

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

Reading grib2 from AROME forecast model

Hi,

First of all, let me congratulate you on the amazing work you've done trying to create a working netcore grib parser! Impressive!

I'm trying myself to "get rid of" the net461 dependance on Grib.Api nugget.

I have done some testing in one of the forecast model I'm using, namely AROME 0.025 (french model). I've tried to parse the SP1 package available here [https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=131&id_rubrique=51].

I've done the test on the "Temperature" parameter and I've noticed that the values that comes out of the "Grib2Reader.ReadDataSetValues" function are not consistent with what I find using Grib.Api nuget or panoply.

I don't know if maybe you have an idea why that is ?

I'll appreciate any help ๐Ÿ‘ and congrats again on your work!
Best
Philippe

Here is the code I'm using:

`using (var stream = File.OpenRead(filePath))
{
var gribReader = new Grib2Reader(stream);
var gribMessages = gribReader.ReadMessages().ToList();

            var selectedGribMessages =
                    gribMessages
                        .Where(
                            m => m.DataSets.Single().Parameter.HasValue && m.DataSets.Single().Parameter.Value.Name == "Temperature")
                        .ToList();

            var data = gribReader.ReadDataSetValues(selectedGribMessages.First().DataSets.Single());`

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.