create_new_variable.py

Home   »   create_new_variable.py

# define NDWI in visualisation

ndwi = ((s2_cube.B03-s2_cube.B08)/(s2_cube.B03+s2_cube.B08))

ndwi.attrs['long_name']='NDWI'
ndwi.attrs['units']='unitless'

s2_cube['NDWI']= ndwi  

Leave a Reply

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