Skip to content

Commit 5d04201

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8879741 commit 5d04201

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

workflow/scripts/resample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ def determine_pixel_areas(raster_input):
107107
"""
108108
# the following is based on https://gis.stackexchange.com/a/288034/77760
109109
# and assumes the data to be in EPSG:4326
110-
assert (
111-
raster_input.rio.crs.to_epsg() == 4326
112-
), "raster_input does not have the projection EPSG:4326"
110+
assert raster_input.rio.crs.to_epsg() == 4326, (
111+
"raster_input does not have the projection EPSG:4326"
112+
)
113113
resolution = raster_input.rio.resolution()[0] # resolution in degrees
114114
varea_of_pixel = np.vectorize(lambda lat: _area_of_pixel(resolution, lat))
115115
pixel_area = varea_of_pixel(raster_input.y) * 1000**2 # convert to m^2

0 commit comments

Comments
 (0)