pyremap.descriptor.get_corners_2d
- pyremap.descriptor.get_corners_2d(ds, lat_var_name, lon_var_name)[source]
Get the coordinates of grid-cell corners for 2D latitude and longitude coordinates, using the CF
boundsof the coordinates if they are available and usable, and interpolating and extrapolating from cell centers if not.- Parameters:
ds (xarray.Dataset) – A dataset containing the coordinate variables
lat_var_name (str) – The names of the 2D latitude and longitude variables
lon_var_name (str) – The names of the 2D latitude and longitude variables
- Returns:
lat_corner, lon_corner (numpy.ndarray) – 2D arrays of corner coordinates with one more element than
ds[lat_var_name]andds[lon_var_name]along each dimension