diff --git a/pyschism/mesh/fgrid.py b/pyschism/mesh/fgrid.py index 9eba7d55..d39e4230 100644 --- a/pyschism/mesh/fgrid.py +++ b/pyschism/mesh/fgrid.py @@ -81,7 +81,7 @@ def add_region( gdf2 = gpd.GeoDataFrame( {'geometry': points, 'index': list(range(len(points)))}, crs=self.crs) - gdf_in = gpd.sjoin(gdf2, gdf1, op="within") + gdf_in = gpd.sjoin(gdf2, gdf1, predicate="within") picks = ([i.index for i in gdf_in.itertuples()]) self.values[picks] = value @@ -106,7 +106,7 @@ def modify_by_region(self, hgrid, fname, value, depth1, flag): gdf2 = gpd.GeoDataFrame( {'geometry': points, 'index': list(range(len(points)))}, crs=self.crs) - gdf_in = gpd.sjoin(gdf2, gdf1, op="within") + gdf_in = gpd.sjoin(gdf2, gdf1, predicate="within") picks = [i.index for i in gdf_in.itertuples()] if flag == 0: self.values[picks] = value diff --git a/pyschism/mesh/gridgr3.py b/pyschism/mesh/gridgr3.py index ce44b444..6249d5e5 100644 --- a/pyschism/mesh/gridgr3.py +++ b/pyschism/mesh/gridgr3.py @@ -39,7 +39,7 @@ def add_region(self, region: Union[Polygon, MultiPolygon], value): gdf2 = gpd.GeoDataFrame( {"geometry": points, "index": list(range(len(points)))}, crs=self.crs ) - gdf_in = gpd.sjoin(gdf2, gdf1, op="within") + gdf_in = gpd.sjoin(gdf2, gdf1, predicate="within") picks = [i.index for i in gdf_in.itertuples()] self.values[picks] = value @@ -61,7 +61,7 @@ def modify_by_region(self, hgrid, fname, value, depth1, flag): points = [Point(*coord) for coord in self.coords] gdf2 = gpd.GeoDataFrame( {'geometry': points, 'index': list(range(len(points)))}) - gdf_in = gpd.sjoin(gdf2, gdf1, op="within") + gdf_in = gpd.sjoin(gdf2, gdf1, predicate="within") picks = [i.index for i in gdf_in.itertuples()] if flag == 0: self.values[picks] = value diff --git a/setup.py b/setup.py index 755978dd..9f994c46 100755 --- a/setup.py +++ b/setup.py @@ -108,7 +108,7 @@ def run(self): 'cfgrib', 'f90nml', 'fsspec', - 'geopandas', + 'geopandas>=0.10', 'metpy', 'netCDF4', 'netcdf-flattener>=1.2.0',