Skip to content
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

include sentinel5p L2 data reading in the pyaerocom distribution #543

Closed
jgriesfeller opened this issue Jan 3, 2022 · 2 comments
Closed
Assignees
Labels
enhancement ✨ New feature or request stale

Comments

@jgriesfeller
Copy link
Member

There's code for Sentinel 5p data reading (mostly tested for the variable tcolno2) in pyaerocom
here and here that are the product of Michael Gauss's Sentinel 5p project (finished last year).
The data reading is based on stcorp's coda package. At the time of writing coda was only available at scorp's own conda channel and not entirely installable within a standard pyaerocom distribution.
A lot has changed since then and it's now available via conda-forge, but not via pip.
The code in general is not according to our general pyaerocom style, but went through black and isort as othe other code as well. But at least the doc strings need to be adjusted and also some test need to be added.

It's also using the geopy library. At the moment this is just used for the Earth's radius. Because I did not use great circle distances or real distances (provided e.g. via a Google web API by geopy, but not feasible for more than just a few hundred points), the geopy dependency can in principle removed. I just need to go through the code.

The interesting part is the gridding functionality

def to_grid(
self, data=None, vars=None, gridtype="1x1", engine="python", return_data_for_gridding=False
):
"""simple gridding algorithm that only takes the pixel middle points into account
All the data points in data are considered!
"""

Due to RAM needs (~64GB per day if I remember correctly), the code can only work on a single day and will therefore never be used in a normal pyaerocom run. It was used to produce daily gridded files the were then put together to a yearly file using nco. The netcdf writing method is here:

def to_netcdf_simple(
self,
netcdf_filename="/home/jang/tmp/to_netcdf_simple.nc",
global_attributes=None,
vars_to_write=None,
data_to_write=None,
gridded=False,
):
"""method to store the file contents in a very basic netcdf file
Parameters:
----------
global_attributes : dict
dictionary with things to put into the global attributes of a netcdf file
"""

Another issue is that the CLI is included in the class file, but @avaldebe addressed that already in PR #540

@jgriesfeller jgriesfeller self-assigned this Jan 3, 2022
@jgriesfeller jgriesfeller linked a pull request Jan 3, 2022 that will close this issue
@avaldebe avaldebe removed a link to a pull request Jan 3, 2022
@lewisblake lewisblake added the enhancement ✨ New feature or request label Sep 27, 2022
Copy link

This issue is stale because it has been open for 365 days with no activity. This issue will be closed in 14 days if no action is taken.

@github-actions github-actions bot added the stale label Jan 15, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants