-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEMPO NO2 reader #188
TEMPO NO2 reader #188
Conversation
@blychs , alternatively, if you have an example file, we could place it here: https://csl.noaa.gov/groups/csl4/modeldata/melodies-monet/data/example_observation_data/satellite/ |
Co-authored-by: Zachary Moon <[email protected]>
Co-authored-by: Zachary Moon <[email protected]>
Co-authored-by: Zachary Moon <[email protected]>
I do have files for this. Let me know how to give them to you so that they can be uploaded (I would just need to get rid of unnecessary variables so that we can have a full scan). |
Sounds good. I'll send an email. |
I found a bug in my code, which is with the application of the quality flags, maximum and minimum. i. e., I'm asking it to compare the values with the max, min or (for the quality_flag) qa_treshold. However, this breaks if the value is NaN, due to the way the comparison is made. It should be an easy fix, which I'll hopefully update today. |
Previous version failed when nan was compared with flags/max/min Added options for more variables, including pressure calculation
Those bugs should be fixed now. I also added options for the rest of the possible variables a user might want, including everything needed to apply air mass factors and scattering weights and a pressure calculations. This means that the changes are quite large, and might require careful checking. I tried my code with all variables and it seems to be working fine, and the pre-commit hooks are passing. I don't really know how to run the linter though, should I just install pylint and give it a go? |
Linting is included in the pre-commit hooks. But if you do want to run it (flake8) individually sometime:
or
|
Preserve the correct behaviour of the "minimum" and "maximum" flags when comparing arrays to those values, while making sure it still works with int type arrays (np.NaN can't be casted to hace a[a < min] = np.nan if dtype(a) = np.array(int). Decode time.
Previous behaviour was switching values into NaN. New behaviour is consistent with data types.
Make sure that the code does not force the user to have the 3D pressure if they did not ask for it.
Change np.masked_where to np.masked_less and np.masked_greater. Change the order of the dimensions of pressure.
Co-authored-by: Zachary Moon <[email protected]>
If set "units" are needed in the future, change ds["time"].encoding Co-authored-by: Zachary Moon <[email protected]>
…nto feature/_tempo_l2_mm_only
Co-authored-by: Zachary Moon <[email protected]>
Co-authored-by: Zachary Moon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a tempo reader based on the TROPOMI NO2 reader, set up for compatibility with MELODIES-MONET. It has been tested with locally downloaded data, using MONET plotting capabilities. Pairing (at the MONET or MELODIES-MONET levels) has not been programmed in yet. A test case for this, with automatic downloads, would require an earthdata user --which would also require an additional dependency (namely, earthdata). If that is acceptable, I could set it up.
Pablo