Re: [Geoserver-users] Netcdf -filesize increases by clipping with shapefile

2023-05-15 Thread Amirhossein Nikfal
As far as I know, in such cases, there might be two issues: 1) The boundary of your shapefile spans the boundary of the original NetCDF. 2) The output (new.nc) has a different data type with larger size. For example, "mynectdf.nc" might be float32, and "new.nc" might be float64. On Mon, May 15,

[Geoserver-users] Netcdf -filesize increases by clipping with shapefile

2023-05-15 Thread Matina Nikolopoulou
I have a netcdf 700MB, dp(time=169, lat=2250, lon=1670) and I want to clip it with a shapefile. data = xarray.open_dataset('mynetcdf.nc') data.rio.set_spatial_dims(x_dim="lon", y_dim="lat", inplace=True) data.rio.write_crs("epsg:4326", inplace=True) Shapefile = geopandas.read_file('mask1.shp',