I'm collecting Sentinel-5p tropospheric SO2 column data. I want to remove negative SO2 band values from my collection. How do I achieve this?
Here is my code:
// define a 'collection' of images
var collection = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_SO2')
.filter(ee.Filter.calendarRange(12,12,'month'))
.select('SO2_column_number_density')
.filterBounds(table)
.filterDate('2018-05-01', '2021-05-31')
.filterMetadata("SO2_column_number_density", 'less_than', 0);
// print(collection)
// var col=collection.values.filter(ee.Filter.notNull(['SO2_column_number_density']))
print(collection)
var no2Image = collection.mean(); // mean across each period
print('NO2 image', no2Image); // debug info in console
var band_viz = {
min: 0,
max: 0.0002,
opacity: 0.45,
palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};
// The region of interest - a planar rectangle around London/S.England.
var rect = table
Map.setOptions('hybrid'); // set map to hybrid backdrop
Map.centerObject(rect, 7); // zoom in to the defined area
Map.addLayer(no2Image, band_viz, 'Sentinel 5P NRT N02 - Nov 2019');
// Create a task that you can launch from the Tasks tab.
// commented out here - but saves off geoTIFF files
Export.image.toDrive({
image: no2Image.clip(rect),
description: 'SO2_red_sea_december',
folder: 'GEE',
fileNamePrefix: 'SO2_change',
region: rect,
fileFormat: 'GEOTIFF',
scale: 1000
});
//