-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 20 replies
-
Greetings @gkb999, Maybe the data shows a lot of NaNs, but not all of the array data is NaN. ¿Can you check that with?:
Maybe the software you are using to open the exported NetCDF overlooks few not NaN values. Another procedure for clipping 100s of nc files is CDO: Here's CDO: Here's how to mask NetCDFs with CDO: Video: Kind regards |
Beta Was this translation helpful? Give feedback.
-
@gkb999, are you able to provide a simple re-producible code snippet with input files? ANSWER:
import xarray
import rioxarray
import geopandas
xds = xarray.open_mfdataset('H:/*.nc',combine = 'nested', concat_dim="time")
xds = xds.rio.write_crs("EPSG:3412", inplace=True)
geodf = geopandas.read_file('H:/roi_clip/ROI.shp')
clip = xds.rio.clip(geodf.geometry.values, geodf.crs).rio.reproject("EPSG:4326") |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
You can sometimes re-project Datasets.
Mind re-wording/clarifying this question. Not sure what you mean.
Not sure. The time dimension should be preserved ... hard to debug without the input files. |
Beta Was this translation helpful? Give feedback.
-
Hi again, Is there a way we can just use the existing x-y grid is meters to generate lat-lon and have additional coordinates there? Similar Links: https://gis.stackexchange.com/questions/245151/why-does-reprojection-with-gdalwarp-change-pixel-size |
Beta Was this translation helpful? Give feedback.
Thanks for getting back @ccalvocm
The original data's
when i type :
ds.polar_stereographic.attrs