I am using the code below that was originally provided by @Kuik, and I have since converted the bands to DAYMET 'tmax' and 'tmin' bands.
Problem is that when I run the code, I receive no output. What am I doing wrong?
var dataset = ee.ImageCollection('NASA/ORNL/DAYMET_V3')
.filter(ee.Filter.date('2015-04-01', '2015-05-20'));
var landSurfaceTemperature = dataset.select(['tmin', 'tmax']);
// Create a geometry representing an export region.
var features = ee.Geometry.Rectangle([-85.1417893413635, 45.31413490213395, -86.125065708551, 44.65070625463291]);
// ######### ADDED CODE ############
// According to: https://gis.stackexchange.com/questions/307548/getting-temperature-data-of-given-point-using-modis-lst-data
// map over the image collection and use server side functions
var tempToFahr = landSurfaceTemperature.map(function(image){
var props = image.toDictionary(image.propertyNames());
var Fahr = (image.multiply(0.02).subtract(273.15)).multiply(1.8).add(32);
// Mask where one of Night or day temperature has no data
var FahrMasks = Fahr.updateMask(Fahr.select('tmax')).updateMask(Fahr.select('tmin'));
// we assume that the night temperature is the min temp, and the day temperature is the max temperature
var meanFahr = FahrMasks.reduce('mean').rename('meanTemp');
// Calculate the GGD and make all the negative values 0 (see: https://en.wikipedia.org/wiki/Growing_degree-day)
var GDD = meanFahr.subtract(50).rename('GDD');
var GDDnonNeg = GDD.where(GDD.lt(0), 0).rename('GDDnonNeg');
return ee.Image(Fahr.addBands([meanFahr, GDD, GDDnonNeg]).setMulti(props));
});
// calculate the sum of GGD values
var summed = tempToFahr.select('GDDnonNeg').sum().rename('summedGDD');
// ######### END ADDED CODE ############
var landSurfaceTemperatureVis = {
min: 0,
max: 100,
bands: ['LST_Day_1km'],
palette: [
'040274', '040281', '0502a3', '0502b8', '0502ce', '0502e6',
'0602ff', '235cb1', '307ef3', '269db1', '30c8e2', '32d3ef',
'3be285', '3ff38f', '86e26f', '3ae237', 'b5e22e', 'd6e21f',
'fff705', 'ffd611', 'ffb613', 'ff8b13', 'ff6e08', 'ff500d',
'ff0000', 'de0101', 'c21301', 'a71001', '911003'
],
};
Map.setCenter(-85.60371794450282,44.73590436363271, 10);
Map.addLayer(summed, {min: 0, max: 50, palette: landSurfaceTemperatureVis.palette},'summed growing degree days', 1, 1);
// Export a cloud-optimized GeoTIFF.
Export.image.toDrive({
image: summed,
description: 'imageToCOGeoTiffExample',
scale: 1000,
region: features,
fileFormat: 'GeoTIFF',
formatOptions: {
cloudOptimized: true
}
});