-
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
{'grid_mapping_name': 'polar_stereographic', 'straight_vertical_longitude_from_pole': 0.0, 'false_easting': 0.0, 'false_northing': 0.0, 'latitude_of_projection_origin': -90.0, 'standard_parallel': -70.0, 'long_name': 'CRS definition', 'longitude_of_prime_meridian': 0.0, 'semi_major_axis': 6378273.0, 'inverse_flattening': 298.279411123064, 'spatial_ref': 'PROJCS["NSIDC Sea Ice Polar Stereographic South",GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123064,AUTHORITY["EPSG","7…