I am using this file. I wrote this code.
import rioxarray import xarray xds = xarray.open_dataset("LIS_HIST_201401010000.d01 copy.nc") floodFraction = xds.FloodedFrac_tavg.transpose('east_west','north_south') floodFraction.rio.set_spatial_dims(x_dim="north_south", y_dim="east_west", inplace=True) floodFraction.rio.write_crs("EPSG:4326", inplace=True) floodFraction.rio.to_raster('floodFraction.tif')
After running this script, my terminal shows this
NotGeoreferencedWarning: The given matrix is equal to Affine.identity or its flipped counterpart. GDAL may ignore this matrix and save no geotransform without raising an error. This behavior is somewhat driver-specific. s = writer(path, mode, driver=driver,
The obtained tif file looks like this