SCIAMACHY L2 to L3 with CODA?

Hi! Sander, you have helped me a lot for working with the SCIAMACHY CH4 data in HARP, thank you so much! Now I have a new problem haha ​​(cries). I was communicating with Mr. Lichtenberg from the German Aerospace Center, he explained to me that the limit values ​​of some parameters (alpha errors) necessary for the correct filtering of the CH4 data are not set correctly in the flag_vcd_flags field within the files. This is because the code had to be ready for testing, and the exact limit values ​​were not known at that time.

So he recommends that I filter directly from the non_linear_fit_param_err field (this contains the alpha errors). Since this field is not ingested by HARP, he recommends that I work directly with CODA. My problem is that I cannot find examples of how to use CODA, I have no idea, and in addition to this I know that geolocation of SCIAMACHY can be complicated, this is something that HARP already solved very well.

My question at this point is, is there a way to filter from that field using CODA and then derive the output to HARP?

This is possible. You would have to read the additional parameter with coda. And then add it to the HARP product before you perform any filtering.
And after combining the data you can perform the filtering.

For instance:

product = harp.import_product("SCI_OL__2PYDPA20060101_010721_000035612043_00475_20068_0000.N1", options="dataset=nad_ir1_ch4")
pf = coda.open("SCI_OL__2PYDPA20060101_010721_000035612043_00475_20068_0000.N1")
product.err0 = harp.Variable(coda.fetch(pf, "nad_ir1_ch4", -1, "non_linear_fit_param_err", 0), ["time"])
product.err1 = harp.Variable(coda.fetch(pf, "nad_ir1_ch4", -1, "non_linear_fit_param_err", 1), ["time"])
product.err2 = harp.Variable(coda.fetch(pf, "nad_ir1_ch4", -1, "non_linear_fit_param_err", 2), ["time"])
coda.close(pf)
filtered_product = harp.execute_operations(product, 'scan_direction_type=="forward";err0>=0')

This is great! Thank you very much for your quick response. I am already testing it in my code and everything runs perfectly.

I’m not sure if I fully understand the -1 argument. I understand that with the indexes at the end (0,1,2) you are calling each entry of the field (each of the errors separately). In the documentation it says that “If you supply a -1 for one or more of the dimensions of an array, you will get all the elements in the specified dimensions”, then I guess that I’m fetching the errors in time dimension? (because of the [“time”] argument at the end), or is it something different?

You have indeed understood it correctly. The -1 argument is provided for the ‘list of measurement data set records’. And this list corresponds to the time dimension, since there is one record for each measurement.

Thank you very much! :desktop_computer: :star_struck: