I have got an xarray.Dataset as this one:
<xarray.Dataset>
Dimensions: (latitude: 881, longitude: 881, time: 152)
Coordinates:
* time (time) datetime64[ns] 2017-01-03T10:48:57 2017-01-07T10:33:06 ...
* latitude (latitude) float64 46.15 46.15 46.15 46.15 46.15 46.15 46.15 ...
* longitude (longitude) float64 7.5 7.5 7.5 7.5 7.501 7.501 7.501 7.501 ...
Data variables:
red (time, latitude, longitude) int16 -9999 -9999 -9999 -9999 ...
nir (time, latitude, longitude) int16 -9999 -9999 -9999 -9999 ...
slc (time, latitude, longitude) uint8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
Attributes:
crs: EPSG:4326
I need to relassify the slc variable into a new one called "cfmask".
Here is the reclassification rules I need to apply:
lookups = [(0,255), (1,255), (2,0), (3,2), (4,0), (5,0), (6,1), (7,255), (8,4), (9,4), (0,4), (11,3)]
Thanks in advance for any help.