You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed for models like the HRRR, RTMA, URMA, etc. if ds['v10'].attrs["GRIB_uvRelativeToGrid"] = 1 if you want to plot vectors (barbs or quivers) on a PlatteCarree projection)
# Transform Latitude and Longitude coordinate points (PlateCarree)# to the source projection coordinates. We need the lat/lon in the# projection coordinate space before we do the vector transform.srcProj=ds.herbie.crssrcProj_coords=srcProj.transform_points(
pc, srcData.longitude.data, srcData.latitude.data
)
# Extract the X and Y coordinate arrays for the src projection.X=srcProj_coords[:, :, 0]
Y=srcProj_coords[:, :, 1]
# Transform the U and V vectors to the earth-relative orientationU_t, V_t=pc.transform_vectors(srcProj, X, Y, srcData[u].data, srcData[v].data)
ds["u10"].values=U_tds["v10"].values=V_tds['u10'].attrs["GRIB_uvRelativeToGrid"] =0ds['v10'].attrs["GRIB_uvRelativeToGrid"] =0
The text was updated successfully, but these errors were encountered:
This is needed for models like the HRRR, RTMA, URMA, etc. if
ds['v10'].attrs["GRIB_uvRelativeToGrid"] = 1
if you want to plot vectors (barbs or quivers) on a PlatteCarree projection)The text was updated successfully, but these errors were encountered: