I am trying to use the Grib.Api package to read the content of a .grib file. The code I'm using is picked up from the gitHub code of the library (https://github.com/GribApiDotNet/GribApi.NET):
using (GribFile file = new GribFile(@"GribFiles\download.grib"))
{
GribMessage msg = file.First();
Console.WriteLine("Grid Type: " + msg.GridType);
double latInDegrees = msg["latitudeOfFirstGridPoint"].AsDouble();
// GribApi.NET normalizes the coordinate values to degrees. This follows the best practice advised by ECMWF.
// values are also accessible as strings
Console.WriteLine("latitudeOfFirstGridPointInDegrees = " + msg["latitudeOfFirstGridPoint"].AsString());
}
I have installed the library using nuget, but it cannot find it ( nor the GribFile class).
Has anyone encounter this situation before ? If so, what was the solution ?
PS. I have added also the env. variable as recommended on github, by the author.
Thank you!
