How to obtain the vertical column from amf_clear in a qa4ecv file

There are two different ways to do this.

The first is that we modify HARP to allow reading of the clear sky VCD+AMF (I assume that ‘clear’ is about ‘clear sky’ (i.e. no clouds)). This would then be a HARP ingestion option (e.g. ‘amf=clear_sky’) and when that option is enabled it would return the clear sky amf for tropospheric_HCHO_column_number_density_amf and the AMF scaled version of the VCD for tropospheric_HCHO_column_number_density (instead of the regular vcd+amf). I think this might be a case where we could make such a change in HARP. Can you maybe describe what this scaled VCD would represent? Is this simply ‘the tropospheric column assuming clear sky conditions’ (or is there more to it)?

The other approach is that you perform this calculation yourself. You can probably best do this via Python. You would read the original product using the HARP Python interface and any additional data using e.g. CODA (see e.g. SCIAMACHY L2 to L3 with CODA? - #2 by svniemeijer). You can then do this scaling of the VCD and replacing of the AMF values yourself in Python (the HARP variable data are just numpy arrays). Finally, you could export the modified harp.Product using your gridding steps as operations with harp.export_product().