Closed svarlamov closed 2 months ago
Thanks for reporting this! I can't promise I will have time to dig into this soon, but I can reproduce the error. Looks like something in how Herbie is using MetPy that is different for this model than other models like HRRR.
FYI, There is no error for the HRRR model
from herbie import Herbie
H = Herbie("2022-01-26", model="HRRR", fxx=12)
ds = H.xarray("TMP:2 m")
dsi = ds.herbie.nearest_points(points=(-100, 40))
I rewrote this xarray accessor and named it pick_points
, which resolves this issue.
In Herbie version 2024.5.0, you can now do this to get value at two different points...
from herbie import Herbie
import pandas as pd
H = Herbie("2022-01-26", model="ifs", product="oper", fxx=12)
ds = H.xarray(":2t:")
points = pd.DataFrame({"latitude": [40, 41], "longitude": [-100, 101]})
dsi = ds.herbie.pick_points(points)
dsi
I'm running into an error when I try to run the
nearest_points
accessor on ECMWF forecasts. It appears that the error is related to the coordinate system, but I don't have enough background knowledge to fully understand why this is failing even after spending a few hours trying to debug this myself. This code reliably reproduces the error:Error:
Versions:
This is possibly related to #179
Thank you so much for any thoughts on how to fix or perhaps work around this error!