xscape.utils.calculate_horizontal_gridsize
- xscape.utils.calculate_horizontal_gridsize(var_da)
Calculates the horizontal pixel size of a gridded DataArray.
Automatically calculates the mean of the difference between gridpoints for both lat and lon and then averages those two values.
- Parameters:
var_da (xr.DataArray) – Data array gridded in “lat” and “lon” coordinates. Coordinates must be in degrees.
- Returns:
Calculated gridsize (in degrees)
- Return type:
float