Add cfgrib_compat flag and changes to backend#89
Add cfgrib_compat flag and changes to backend#89rachtsingh wants to merge 5 commits intompiannucci:mainfrom
Conversation
The resolution is passed in the grib message, which allows float64 i believe so its hard to assume float32 for everything safely |
no-op for now
8f9c16d to
fb12d0c
Compare
|
Ok, got it, fixed - I reverted that change and now we convert on the fly (by default to float32 like in cfgrib, but we can pass float64, i.e. no conversion). I found this comment in eccodes explaining their behavior:
|
|
@mpiannucci I wanted to bump this to see if it's still the direction you want to take this? I'm working separately on a GRIB table/template crate that I think will be useful, but that's not ready yet. No rush to merge/review, but I didn't want to do extra work if it's inline with the goal. |
|
Hi @rachtsingh, let me take a day or two to reivew this and think it through and ill get back to you |
|
Okkkk @rachtsingh i like most of these changes and I actually want to make some of them the defaults:
After this feedback I'm not sure if we need the flag and can instead update the library as such with a new major version? (Assuming we can look deeper into the lambert coorsinat system stuff). What do you think? |
|
Basically I think this are all great changes hit I rely on the x and y coordinates and the projection information from hrrr for production data so I'd like to keep those if they don't hurt anything |
|
Hey sorry @mpiannucci, I have been kind of busy with some family stuff so no opportunity to respond or polish this up further. Will respond as soon as I can. I have a deeper proposal for dealing with other stuff (shortName, cfVarName) in eccodes that I think is pretty nice but will require even more explanation / buy-in, so needs some time to test and write up. |
|
No problem,, @rachtsingh take care! |
Following up on conversation from #88
This:
cfgrib_compatargument that can be passed to the xarray backendvalues_dtypeargument like in cfgrib (default isnp.float32)cfgrib_compat=Truecfgrib_compat=Truetimetofcast_time(i.e. when the forecast was initialized) and adds a separatevalid_timewhencfgrib_compat=TrueSo there's one breaking change in there, though I'm not sure how many people are working with float64 data in GRIB (since most data is 12-24 bits integer encoded).
Here's the updated comparison, with
cfgrib_compat=True:cfgrib:
and gribberish: