Accessing slant column information from TROPOMI HCHO files using HARP

Hello, I would like to access slant column information from “/PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/fitted_slant_columns_win1” in L2 HCHO files. It looks like there are a number of slant column measurements (eg. HCHO, NO2) in this variable.

I want to add NO2, HCHO (and CO if it exists) from “/PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/fitted_slant_columns_win1” to my HCHO L3 file output.

Currently, this gives me the HCHO slant column, but I do not think it is from the part of the file I want since I am unable to access the NO2 values that should be stored in that part of the HCHO L2 file.

harp_L2_L3 = harp.import_product(file_path, operations="
tropospheric_HCHO_column_number_density_validity>50;
derive(datetime_stop {time});
latitude > " + lat_min + "; latitude < " + lat_max + "; longitude > " + lon_min + "; longitude < " + lon_max + “;
bin_spatial(500, “+lat_min+”, 0.06, 500, “+lon_min+”, 0.06);
derive(latitude {latitude}); derive(longitude {longitude})”)
export_folder = “{export_path}/{name}”.format(export_path = export_path, name = file.split(’/’)[-1].replace(‘L2’, ‘L3’))
harp.export_product(harp_L2_L3, export_folder, file_format = ‘netcdf’)

Thank you!

First, I am not sure why you are trying to create L3 grids from slant column data. Regridding slant columns is not a recommended practice, since you will be averaging slant columns using different viewing angles, which will give nonsensical results.

HARP also doesn’t support all variables. Especially the variables that are very specific to the retrieval algorithm (and is not a primary output) is usually not included in HARP. If you want to have NO2 or CO data, you should look at the NO2 and CO products.

If what you are doing is a more advanced analyis or e.g. data assimilation, then you might want to read the S5P data directly using the netcdf or coda libraries instead of using HARP.