I want to use two NBR images(NBR1 and NBR2) for the differenced Normalized Burn Ratio (dNBR). But I can't identify the error of dNBR output.
Code snippet:
var NBR1 = landsat8_1.expression(
"(NIR - SWIR2) / (NIR + SWIR2)",
{
SWIR2: landsat8_1.select("B7"), //SWIR2
NIR: landsat8_1.select("B5"), // NIR
BLUE: landsat8_1.select("B2") // BLUE
});
var NBR2 = landsat8_2.expression(
"(NIR - SWIR2) / (NIR + SWIR2)",
{
SWIR2: landsat8_1.select("B7"), //SWIR2
NIR: landsat8_1.select("B5"), // NIR
BLUE: landsat8_1.select("B2") // BLUE
});
var dNBR = NBR1.subtract(NBR2);
Full code: code.earthengine.google.com/14aaf46d74850fec158b3485c6fe702c