export_timestep.py

Home   »   export_timestep.py

# define the timestep you wish to export
timestep = flood_threshold2_step2.sel(time='2020-12-28 10:00:00', method='nearest')

# define projection
timestep_wgs84 = timestep.rio.write_crs("epsg:4326")

# write to raster
timestep_wgs84.rio.to_raster("timestep.tif")

Leave a Reply

Your email address will not be published. Required fields are marked *