A issue with coda python(how to obtain beijing's data)


Excuse me,I don’t know how to select latitude and longitude to obtain beijing’s data by writing code,can you give me help? Thank you!

Dear Huanguang,

Could you provide some more information as to which product you are trying to import? is it included in the harp definitions for e.g.? see list here: Ingestion definitions — HARP 1.15 documentation (stcorp.github.io)

If it is, it is better to use harp.import_product which allows all sorts of nice operations to be performed already at the product ingestion step.

If not, then I typically perform a post-processing of the arrays, selecting data within a certain radius for the location I am interested in using haversine, haversine · PyPI

Best wishes,
MariLiza

Dear mariliza,
If the data I want to import (such as the estimated error of the Aeolus level 2B product) is not included in the harp definition, how do Iimport it?
I really hope to get your reply. Thank you for your help.
Best wishes,
LiShiYu

Good morning LiShiYu,

In the case that I wish to import a satellite product, or a variable, which is not in the ingestion definitions, then I use the coda module. Hence, two options exist:

  1. Either you read the satellite product using coda and transform the file into a hard-compliant file. An example can be found here, Problem with HARP/Python within a loop - HARP - Atmospheric Toolbox. You basically open the file, ingest the parameters you want using coda.fetch and output into a new harp compliant file.

  2. You use harp import product to import the already harp-compliant satellite file, and you add a parameter to the product dataframe using coda.fetch. Then again you output to a new file that you can work with.

Best wishes,
MariLiza

Dear mariliza,
I successfully import the variable according to the first option you mentioned. Thank you for your time!
Best wishes,
LiShiYu