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 ERA5 atmosphere data for density splines #57

Draft
wants to merge 5 commits into
base: next_1_3_X
Choose a base branch
from

Conversation

j-bottcher
Copy link

@j-bottcher j-bottcher commented Dec 19, 2024

A class to density_profiles was added that uses atmospheric data from ECMWF to calculate the density splines.
The ECMWF_Download file contains functions to download and read ERA5 pressure-level or model-level data files.
The pressure level data only requires the pygrib and cdsapi python packages to be installed. The download itself requires an API token in the home directory, which in turn requires an account on the cds website:
https://cds.climate.copernicus.eu/user-guide
https://cds.climate.copernicus.eu/how-to-api

The model_level data relies on the cfgrib python package and importantly the eccodes C++ package that has to be referenced. The maximum height of this atmosphere data extends up to 80 km and can be evaluated very precisely.

In the density class, both datasets are put on an Euclidian grid using the scipy.interpolate. The KDTree functionality allows the evaluation of the nearest neighbor from anywhere in the world.

To build a density spline, we evaluate a set of points along the shower trajectory of a given observer location, zenith direction, and azimuth direction. This is translated into Earth coordinates using rotations and vector addition. In principle, this class can evaluate the atmosphere data for any detector position and all shower directions around Earth and use atmospheric data for any day in the ERA5 sample lifetime.
A script that systematically evaluates all directions for a given day can be provided. I also plan to add an example notebook (which would require an example atmosphere data file).

To evaluate a specific azimuth direction, the set_theta_deg of the density spline must be used instead of the core set_theta function.

@j-bottcher j-bottcher changed the title Dev/include era5density include ERA5 atmosphere data for density splines Dec 19, 2024
@j-bottcher j-bottcher marked this pull request as draft December 19, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant