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
I'm trying to export 2d slices of wrf data to geotiffs, and have been stymied by the fact that:
-the projection information is not present in the .crs of the xarray object
-the projected coordinates of the upper-left corner of the upper-left pixel are not present in the attributes and do not seem to be otherwise accessible.
While we are able to extract the proj4 from a cartopy object created from the xarray data using wrf.get_cartopy , we have been unable to extract the projected coordinates of the upper left corner of the upper-left pixel. Without those coordinates, we cannot transform the data into an evenly spaced grid in order to export it to a raster dataset. Any help would be appreciated.
the projected coordinates of the upper-left corner of the upper-left pixel are not present in the attributes and do not seem to be otherwise accessible.
Does -ds.attrs["DX"] * ds.dims["west_east"] / 2 and ds.attrs["DY"] * ds.dims["south_north"] / 2 not work for your purposes? This would only work for the outer domain, but I think there's attributes somewhere in the WRF output to say where nested domains lie in their parent domains.
Alternately, would the Cartopy transform_point function work? I.e. crs = wrf.get_cartopy(...); crs.transform_point(ds.coords["XLONG"][0, 0], ds.coords["XLAT"][0, 0], crs.as_geodetic()).
I'm trying to export 2d slices of wrf data to geotiffs, and have been stymied by the fact that:
-the projection information is not present in the .crs of the xarray object
-the projected coordinates of the upper-left corner of the upper-left pixel are not present in the attributes and do not seem to be otherwise accessible.
While we are able to extract the proj4 from a cartopy object created from the xarray data using wrf.get_cartopy , we have been unable to extract the projected coordinates of the upper left corner of the upper-left pixel. Without those coordinates, we cannot transform the data into an evenly spaced grid in order to export it to a raster dataset. Any help would be appreciated.
Best,
Isaac Park
@Mann1123
The text was updated successfully, but these errors were encountered: