contrailcirrus / pycontrails

Python library for modeling contrails and other aviation climate impacts
https://py.contrails.org/
Apache License 2.0
57 stars 16 forks source link

Feature/model level datalibs #179

Closed thabbott closed 6 months ago

thabbott commented 6 months ago

Closes #173

Changes

Implements interfaces for model-level ERA5 and HRES data.

Features

Internals

Tests

Reviewer

@mlshapiro @trdean1

review-notebook-app[bot] commented 6 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

thabbott commented 6 months ago

Yes, testing those parts of the new datalibs would be good!

I've added tests to test/unit/test_ecmwf that cover portions of ModelLevelERA5 and ModelLevelHRES that don't use metview and don't access upstream APIs. I've parameterized tests by datalib where it makes sense, so these changes should also expand test coverage for other ECMWF datalibs.

thabbott commented 6 months ago

Amazing work - I don't have much to comment here, mostly naming conventions and trying to not open up too many hairy edges with inputs.

Just want to confirm that this will cache the pressure level data (not the original Grib or model level data)

This will always cache the pressure-level data, and will optionally cache the original grib data if cache_grib=True is passed as a keyword argument. (I think you'd only want to do that if you're changing something in the grib processing and don't want to wait for the grib file to be re-downloaded each time you process it, so I think of this option as an aid for developers rather than something useful for users.)