← All writing

Fix Sentinel-2 Time-Series Breaks in GEE for Delhi

A practical Google Earth Engine method for comparing Delhi vegetation across years without mistaking a Sentinel-2 processing change for real NDVI decline.

Published
Reading time
7 min
Place
Delhi, India
By
Jannat Khosla
Illustration for "Fix Sentinel-2 Time-Series Breaks in GEE for Delhi"

Cover: Landsat imagery of Delhi, India, NASA (public domain).

A quiet breakpoint in a Delhi NDVI series

A multi-year Sentinel-2 series can look convincing and still contain a processing artefact large enough to alter its interpretation. This matters in Delhi, where analysts often compare a dry-season image of the Ridge, parks, institutional campuses or peri-urban fields with the same season several years later. A dip in NDVI may be reported as vegetation loss when part of the dip was created by the data lineage.

The breakpoint is 25 January 2022. Sentinel-2 products carrying Processing Baseline 04.00 or later had their digital-number range shifted by 1,000. In Earth Engine, the COPERNICUS/S2_SR_HARMONIZED collection shifts those newer values back into the older range. Google explicitly recommends the harmonised collection in place of the older surface-reflectance collection for this reason. The underlying Level-2A imagery is surface reflectance, has 12 spectral bands scaled by 10,000, and includes 10 m red (B4) and near-infrared (B8) bands. Google Earth Engine's dataset documentation records each of these details.

This is a narrow technical choice, but it belongs at the top of the method section in any Delhi change analysis spanning the breakpoint. It is particularly important when someone will compare mean NDVI, use a threshold to calculate vegetated area, or feed annual composites to a classifier.

Why an equal offset can still change NDVI

NDVI is calculated as (NIR - red) / (NIR + red). It is tempting to assume that adding the same value to both inputs has no effect because the numerator remains unchanged. The denominator does not.

Take a hypothetical vegetated pixel whose older-range values are NIR 5,000 and red 2,000. Its NDVI is 0.429. If a 1,000-count shift is present and the values are used without harmonisation, they become 6,000 and 3,000. The numerator remains 3,000, yet the denominator rises from 7,000 to 9,000, producing NDVI of 0.333. Nothing on the ground had to change for the index to fall by 0.096.

That example is deliberately simple, not a claim about a particular Delhi pixel. Its purpose is to show why an additive radiometric change can affect a ratio index. The official Sentinel-2 Level-2A data-quality report says that the processing update introduced an additive offset to encode negative surface reflectance over very dark surfaces. It gives the Level-2A retrieval relationship and states that the offset is minus 1,000 digital counts for all spectral bands. The Copernicus report is useful reading when a project uses downloaded products rather than Earth Engine.

The practical implication is not that every post-2022 Sentinel-2 result is wrong. It is that mixing the legacy COPERNICUS/S2_SR collection with later acquisitions without understanding the shift is an avoidable source of false change.

Worked example: compare Delhi Ridge greenness in two summers

Here is a compact Earth Engine example for an area around Sanjay Van and the south-central Delhi Ridge. It creates median NDVI composites for matching late-spring windows in 2020 and 2024, then maps the difference. The rectangle is only a demonstration AOI. Replace it with a project boundary before producing a statistic or a map for publication.

// Demonstration area around Sanjay Van and the Delhi Ridge.
var aoi = ee.Geometry.Rectangle([77.16, 28.48, 77.24, 28.56]);

// Keep classes that are useful for a vegetation comparison.
// SCL 4 = vegetation, 5 = bare soil, 6 = water.
function maskScene(image) {
  var scl = image.select('SCL');
  var clearSurface = scl.eq(4)
    .or(scl.eq(5))
    .or(scl.eq(6));
  return image.updateMask(clearSurface).divide(10000);
}

function ndviComposite(start, end) {
  var images = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED')
    .filterBounds(aoi)
    .filterDate(start, end)
    .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 40))
    .map(maskScene);

  return images.median()
    .normalizedDifference(['B8', 'B4'])
    .rename('NDVI')
    .clip(aoi);
}

var ndvi2020 = ndviComposite('2020-05-01', '2020-06-15');
var ndvi2024 = ndviComposite('2024-05-01', '2024-06-15');
var ndviChange = ndvi2024.subtract(ndvi2020).rename('NDVI_change');

Map.centerObject(aoi, 13);
Map.addLayer(ndvi2020, {min: 0, max: 0.8,
  palette: ['f7f7f7', 'c2e699', '238443']}, 'NDVI 2020');
Map.addLayer(ndvi2024, {min: 0, max: 0.8,
  palette: ['f7f7f7', 'c2e699', '238443']}, 'NDVI 2024');
Map.addLayer(ndviChange, {min: -0.3, max: 0.3,
  palette: ['a50026', 'f7f7f7', '006837']}, 'NDVI change');

The code first uses S2_SR_HARMONIZED, rather than asking a later calculation to repair the values. It then divides by 10,000 before calculating NDVI, because the catalogue specifies that the surface-reflectance bands are stored with that scale. Keeping the scaling explicit also makes later band maths easier to audit.

The Scene Classification Layer, or SCL, is used here as a simple mask. The collection documentation identifies SCL as a 20 m layer and defines classes 4, 5 and 6 as vegetation, bare soils and water. It also identifies classes 3, 8, 9 and 10 as cloud shadow, medium-probability cloud, high-probability cloud and cirrus. Use the class table in the catalogue rather than memorising the labels.

The selected date windows are deliberately identical in season. Delhi vegetation responds strongly to rain timing, irrigation and heat, so comparing May to May is more defensible than comparing a May composite with one made during the monsoon. Even matching seasons does not establish cause. Inspect the two true-colour composites, check whether the retained observations cover the whole AOI, and investigate conspicuous patches against local knowledge before attaching a land-use explanation to the map.

For an area summary, add reduceRegion only after looking at the mapped layers. A mean can conceal a failed composite, masked boundaries or a local construction site. In a client deliverable, I would export the two NDVI composites, the change raster, the AOI geometry, the date windows and a short note that names the harmonised collection. That is enough for another analyst to reproduce the central data decision.

The common mistake: fixing clouds with an inconsistent mask

Beginners often copy a QA60 cloud-mask function into every Sentinel-2 script. That is risky across this time span. In the harmonised Level-2A catalogue, QA60 is described as masked between 25 January 2022 and 28 February 2024, while its historical cloud-mask production also changed. A time series that relies on QA60 alone can therefore acquire another break exactly where the radiometry is already under scrutiny.

For this demonstration, SCL avoids that particular QA60 gap and makes the accepted land-surface classes visible in the code. It is not a universal cloud solution. Its 20 m resolution means that narrow cloud edges and small shadows still deserve visual inspection, especially around fragmented tree cover and dense built-up land. Earth Engine points users to COPERNICUS/S2_CLOUD_PROBABILITY and Cloud Score+ as additional cloud and shadow resources, which are sensible next steps for a production study.

Do not repair the problem by subtracting 1,000 from every post-2022 image after selecting the harmonised collection. That would apply the adjustment twice. Use one approach only: the harmonised Earth Engine collection, or a documented correction based on product metadata when processing downloaded Sentinel-2 files yourself.

A short quality-control routine

Before trusting a pre- and post-2022 comparison, I use this sequence:

  1. Confirm that every input image comes from COPERNICUS/S2_SR_HARMONIZED.
  2. Choose date windows that match the land-surface season and record them in the script.
  3. Display source composites in natural colour and inspect cloud, haze and shadow remnants.
  4. Check the PROCESSING_BASELINE property while diagnosing unexpected values. It is a production-configuration field, rather than a land-cover attribute.
  5. Treat an NDVI change layer as a screening result until local reference imagery, field evidence or an independent dataset supports the interpretation.

The last two points matter in India because the pressure to turn a quick visual comparison into a headline can be strong. A clean-looking NDVI map is useful, but the collection name, masks and acquisition windows are part of its evidence.

Sentinel-2 product documentation defines a processing baseline as the processing environment, including processor versions, auxiliary data and configuration files. That is why it belongs in reproducibility notes. The Sentinel-2 Products Specification Document explains the definition and naming of this metadata.

Frequently asked questions

Does the harmonised collection alter real vegetation change?

No, it corrects the newer Sentinel-2 digital-number range to align with the older range, rather than removing real surface change. Vegetation can still decline or increase between dates, but the comparison no longer contains this known processing discontinuity.

Can I correct legacy Sentinel-2 surface reflectance myself?

Yes, but only when you can identify the product processing baseline and apply the documented metadata-based conversion correctly. In Earth Engine, using COPERNICUS/S2_SR_HARMONIZED is usually clearer and less error-prone for a study that spans the breakpoint.

Should I divide Sentinel-2 surface reflectance bands by 10000?

Yes, divide the Level-2A spectral bands by 10,000 before calculations when using the stored integer values directly. NDVI itself is scale-invariant when both bands use the same multiplier, but explicit scaling prevents mistakes in other band maths and display settings.

Is SCL masking sufficient for a final Delhi vegetation map?

No, SCL is a practical starting mask, not proof that every retained pixel is clear. Review the composite visually and consider dedicated cloud-probability or Cloud Score+ data where cloud edges, haze or shadows could affect the decision.

References

Researched and drafted with AI assistance; sources are linked for verification.

Need this done for your own study area? Send me the area and what you need.

Cite this post

Khosla, J. (2026, November 27). Fix Sentinel-2 Time-Series Breaks in GEE for Delhi. Jannat Khosla. https://jannatkhosla.com/blog/fix-sentinel-2-time-series-breaks-in-gee-for-delhi

› BibTeX
@online{khosla2026sentinel,
  author = {Khosla, Jannat},
  title = {Fix Sentinel-2 Time-Series Breaks in GEE for Delhi},
  date = {2026-11-27},
  url = {https://jannatkhosla.com/blog/fix-sentinel-2-time-series-breaks-in-gee-for-delhi}
}