Skip to content

Tag: python-xarray

rioaxrray open netcdf file result is a list not an xarray

I am trying to open a netcdf file using rioarray: import rioxarray import xarray import raster xds = rioxarray.open_rasterio(file, crs=’+proj=latlong’, masked=True) but: type(xds) list and xds has none of the attributes or methods of an xarray. xds_lonlat = xds.rio.reproject(“epsg:4326&#8221…

How to make a sum in NetCDF4 by xarray

I would like to make a monthly sums of my NetCDF4 file from daily values for precipitation. However, I am quite not sure what I am doing wrong. It seems that something has changed from the code in this post: Sum a daily time series into a monthly time series with a NaN value threshold I didn’t find anyt…