0

I am trying to estimate growing season length with the MCD12Q2 dataset (Land Cover Dynamics Yearly L3 Global 500 m), which includes dates for the start and end of the growing season (greenness_increase and greenness_decrease). This script attempts to: 1. get the day of year for each variable (based on this), subtract one from the other, and then map the result: the length of the growing season in days.

I get a result with this, but it doesn't make sense (I get negative numbers of days and warm regions have very short growing seasons). I think there may be a mistake in the offset – perhaps I need a different offset calculation for each variable.

What should I try here?

(perhaps an alternate approach would be to add the day of year as an additional band)

var all_doys = ee.List.sequence(1,366);
var apply_offset = function(image){
  var day_offset = image.date().difference('2000-01-01','day');
  return image.subtract(day_offset).toFloat();}
var all_years = ee.ImageCollection('MODIS/MCD12Q2')
            .select(['Onset_Greenness_Decrease1'])
            .map(apply_offset);
var median_decrease = all_years.reduce(ee.Reducer.median());

var all_years = ee.ImageCollection('MODIS/MCD12Q2')
            .select(['Onset_Greenness_Increase1'])
            .map(apply_offset);
var median_increase = all_years.reduce(ee.Reducer.median());

//Difference for Northern Hemipshere
var NHdifference = median_decrease.subtract(median_increase);
// Difference for Southern Hemipshere
// 365 days - median_increase + median.decrease

var viz_options = { min: -365,max: 365, palette: ['blue', 'red', 'green', 'orange', 'yellow'],};

Map.addLayer(
    median_decrease.select('Onset_Greenness_Decrease1_median'), viz_options,
    'Median Decrease Day');
Map.addLayer(
    median_increase.select('Onset_Greenness_Increase1_median'), viz_options,
    'Median Increase Day');
Map.addLayer(
    NHdifference, viz_options,
    'Growing Season Length NH');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.