-
-
Notifications
You must be signed in to change notification settings - Fork 208
feat: ERA5 patcher + dummy pressure generator #866
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
base: develop
Are you sure you want to change the base?
feat: ERA5 patcher + dummy pressure generator #866
Conversation
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.
Pull Request Overview
This PR adds a utility script for preprocessing ERA5 NetCDF weather data to ensure compatibility with RocketPy's EnvironmentAnalysis module. The script addresses missing variables and grid indexing issues that can occur when using ERA5 data directly.
- Adds functions to patch ERA5 surface data files with required/optional variables
- Creates dummy pressure level files to work around RocketPy indexing bugs
- Implements grid snapping to find nearest lat/lon coordinates
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8e1099d to
ba249b4
Compare
ba249b4 to
d52653c
Compare
Gui-FernandesBR
left a comment
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 PR doesn't make a lot of sense to me... The added file seems to be misplaced, lacking a clear purpose to be included in the repo.
Is this a new feature, utility or a bugfix? I honestly do not know.
|
Hi Gui, thanks for the honest feedback—it's exactly what helps turn a rough draft into something solid. You're absolutely right: the I was running the official RocketPy simulations (
These weren't edge cases—they were reproducible crashes on fresh ERA5 NetCDFs. I spent 18 hours debugging, building dummy pressure files, and patching the data until the rocket finally flew instead of exploding on the pad. This PR is a utility born from those bugfixes (#864)—a script to preprocess ERA5 files for You're the experts—I’m all ears on smoothing these bumps. Maybe you’ve got a cleaner way, or this is a known pain point waiting for a fix. Either way, I built this to get my rocket airborne without help. Proposed iterate:
Tested: Ran What do you think of Closes #864 — and hopefully saves the next contributor 18 hours of debugging. 😅 Thanks for iterating! |
|
Side note, bear with me as I am also learning the ropes of PR's that are actual PR's and not just to change my introduction or to just use GitHub for coding tutorials. I also work backwards a lot of the time, so please don't take my mis-steps as being pushy, I'm fumbling my way around. Thank you so much for your patience. My AI's are being pushy with me as well and I'm also having to pull them back a bit so that I understand Git's processes, appreciate your help. Just excited to make rockets fly, something I didn't think was open to anyone into software engineering. Thanks again. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #866 +/- ##
========================================
Coverage 80.27% 80.27%
========================================
Files 104 104
Lines 12769 12769
========================================
Hits 10250 10250
Misses 2519 2519 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ERA5 → RocketPy: Full Integration
After 18+ hours of debugging, we now have a complete, reusable workflow to run
EnvironmentAnalysiswith real ERA5 data.What's Included
docs/notebooks/era5_to_rocketpy_patch.py: Full patcherProof
(upload your plot)
Closes #864