Skip to content

include ERA5 atmosphere data for density splines#57

Open
j-bottcher wants to merge 6 commits intomceq-project:next_1_3_Xfrom
j-bottcher:dev/include_era5density
Open

include ERA5 atmosphere data for density splines#57
j-bottcher wants to merge 6 commits intomceq-project:next_1_3_Xfrom
j-bottcher:dev/include_era5density

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
@afedynitch afedynitch self-assigned this Jan 2, 2025
@j-bottcher j-bottcher marked this pull request as ready for review January 17, 2025 15:30
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.

2 participants