I thought it would be straight up, but I don't find a question like this one here.
I created a NetCDF out of a GeoTIFF, but it did not have coordinates or CRS.
I added it doing this:
coords = {
'time' : ['2023'],
'y': np.linspace(-90, 90, 1801)[::-1],
'x': np.linspace(-180, 180, 3600),}
b = xr.DataArray(data, dims=('time', 'y', 'x'), name='test', coords=coords)
b.rio.write_crs("epsg:4326", inplace=True)
But it does not work. I tried inverting y
also.