Trying to generate daily average Sentinel 5P(S5p) variables
(tropospheric_NO2_column_number_density) for continent level (~4000x4000 km). Following steps have been carried out. The sample code is posted here. Requesting comments on the queries.
Steps:
0. S5p downloaded using Sentinelsat python API
- The images are then grouped into day wise after the datetime of image (end position) is converted into local time (IST) from UTC. Subsequent process are carried out on the day grouped netcdf files.
- Due to memory limitation, the area extent is split into four tiles(p1-p4). HARP, harpconvert is applied on to the individual images with each tile extent.
harpconvert --format netcdf --hdf5-compression 9 -a ‘latitude>2;latitude<23.62;longitude>62;longitude<84.64999999999999; tropospheric_NO2_column_number_density_validity>75; bin_spatial(2152,2,0.01,2255,62,0.01); derive(datetime_stop {time}); derive(latitude {latitude}); derive(longitude {longitude});keep(tropospheric_NO2_column_number_density,datetime_stop,latitude,longitude)’ /home/s5pdownload_daywise/ newfilename
- HARP, harpmerge is applied on to the split group of tiles. Assuming day average is happening in this step.
harpmerge -ap ‘bin(); squash(time, (latitude,longitude))’ -a ‘latitude>2;latitude<23.62;longitude>62;longitude<84.64999999999999; derive(longitude {longitude});derive(latitude {latitude})’ /home/s5pdownload_daywise/ newfilename
- The resultant four tiles are applied with unit conversion (into µmol/m2 ).
- Used numpy concatenate to mosaic/join the four tiles into one. Tried to use harpmerge in this steps ends up in multiple error.
Queries:
- Is it okay to do daily average by local time conversion, although the region cover more than one time zones. There are images which having endposition time on night (after dawn in local time) is it okay to include these images in the daily average.
- Requesting comments on issues and methods to improve the workflow.