Merge same date orbit and cut to polygon

Hello everyone.
I am analyzing the methane from a big polygon involving two images (two orbits) of the 5P from the same day. I would like to use harp to generate L3 images, cut to my area of interest and merge to one image per date but I am lost in the last part. Do I have to do a reduce_operations with the two images?

The sample python code is

import harp

operations = """
CH4_column_volume_mixing_ratio_dry_air_validity > 50;
keep(latitude_bounds, longitude_bounds, datetime_start, CH4_column_volume_mixing_ratio_dry_air);
bin_spatial(701, -41, 0.01, 401, -72, 0.01);
derive(latitude {latitude});
derive(longitude {longitude});
"""

reduce_operations = """
squash(time, (latitude, longitude, latitude_bounds, longitude_bounds));
bin();
"""

# glob with the 2 img paths
files_in = "./data/S5P_OFFL_L2__CH4____*/S5P_OFFL_L2__CH4____*.nc"

img_merge = harp.import_product(
    files_in, operations, reduce_operations=reduce_operations
)

Ty!

This looks ok to me, but make sure to then only use the files from a single day for each harp.import_product call.

1 Like