Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

Not loading all data for isobaricInPa #111

Open
Wicrules opened this issue Aug 12, 2021 · 3 comments
Open

Not loading all data for isobaricInPa #111

Wicrules opened this issue Aug 12, 2021 · 3 comments

Comments

@Wicrules
Copy link

Wicrules commented Aug 12, 2021

I am attempting to read a GRIB2 file -https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20210812/12/atmos/gfs.t12z.pgrb2full.0p50.f000 and to retrieve the isobaric wind data for both the u and v components. Looking at this file in Panoply, I can see it contains all of the data I want (at all isobaric surface Pas from 1 to 100000).

image

However, when I load the file using your API, it only provides the data from Pa 1 to 70.

Msg 6: v-component of wind isobaricInPa 1
Msg 10: v-component of wind isobaricInPa 2
Msg 14: v-component of wind isobaricInPa 4
Msg 18: v-component of wind isobaricInPa 7
Msg 22: v-component of wind isobaricInPa 10
Msg 26: v-component of wind isobaricInPa 20
Msg 30: v-component of wind isobaricInPa 40
Msg 34: v-component of wind isobaricInPa 70

This is the query I am using:
var result = gribFile.Where(m => m.ParameterShortName == "u" && m.TypeOfLevel == "isobaricInPa");

I get the same result whether I try using the query or just iterating over all messages in the grib file object.

Any idea what I may be doing wrong?
Thanks!

@IdahoSixString
Copy link

IdahoSixString commented Aug 13, 2021

@Wicrules You might need to set the field EnableMultipleFieldMessages to true. I think by default it is set to false.

It is on the GribContext.

@Wicrules
Copy link
Author

Wicrules commented Aug 13, 2021 via email

@Wicrules
Copy link
Author

OK, enabled multiple field messages and I'm getting the same results:

gribFile = new GribFile(files.First());
gribFile.Context.EnableMultipleFieldMessages = true;

var results = gribFile.Where(m => m.ParameterShortName == MESSAGE_WIND_U_SHORT_NAME && m.TypeOfLevel == "isobaricInPa");

image

Thoughts? Other suggestions?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants