Skip to content

HOTFIX: Migrate Forecasts to UCAR THREDDS#943

Open
MateusStano wants to merge 48 commits intomasterfrom
bug/deactivation-opendap-nomads
Open

HOTFIX: Migrate Forecasts to UCAR THREDDS#943
MateusStano wants to merge 48 commits intomasterfrom
bug/deactivation-opendap-nomads

Conversation

@MateusStano
Copy link
Copy Markdown
Member

Summary

Solving #933

We are now using OpenDAP with UCAR THREDDS:

  • Used for GFS, NAM and RAP. This works mostly exacly the same as we were doing with NOMADS. Just now we are getting from a different server

The following models are not available on THREDDS and were deactivated

  • GEFS
  • HIRESW

Particularly GEFS is very important for Monte Carlo simulations and we should look for alternatives as fast as possible

Observations

The Thredds OpenDap approach took me a long time to find information about. So in between I tried out other methods which will still be important for us to understand for the future (probably for re-implementing GEFS):

  • GRIB2 filter via NOMADS: this adds a few new dependencies do RocketPy (which are in total bigger in size than RocketPy), It is quite hard to code but can be done, probably the best way to move forward with re-adding GEFS, but including the added libraries as optional dependencies
  • Siphon: python library that would also add a bunch of dependencies, that are even bigger than the Grib2 method would require

THREDDS actually has an archival version of GEFS that goes up to 2020. I think we can find other alternatives, but this could be a last resort option.

Useful Links

  • THREDDS catalog: NSF and NCEI
    • There are a few models that we can add with this (HRRR and AIGFS)

Copilot AI and others added 2 commits March 14, 2026 13:15
…#889)

* Fix hard-coded radius value for parachute added mass calculation

Calculate radius from cd_s using a typical hemispherical parachute drag
coefficient (1.4) when radius is not explicitly provided. This fixes
drift distance calculations for smaller parachutes like drogues.

Formula: R = sqrt(cd_s / (Cd * π))

Closes #860

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Address code review: improve docstrings and add explicit None defaults

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Add CHANGELOG entry for PR #889

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Update rocket.add_parachute to use radius=None for consistency

Changed the default radius from 1.5 to None in the add_parachute method
to match the Parachute class behavior. This ensures consistent automatic
radius calculation from cd_s across both APIs.

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Refactor Parachute class to remove hard-coded radius value and introduce drag_coefficient parameter for radius estimation

Fix hard-coded radius value for parachute added mass calculation

Calculate radius from cd_s using a typical hemispherical parachute drag
coefficient (1.4) when radius is not explicitly provided. This fixes
drift distance calculations for smaller parachutes like drogues.

Formula: R = sqrt(cd_s / (Cd * π))

Closes #860

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Add CHANGELOG entry for PR #889

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Refactor Parachute class to remove hard-coded radius value and introduce drag_coefficient parameter for radius estimation

MNT: Extract noise initialization to fix pylint too-many-statements in Parachute.__init__

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Refactor environment method access in controller test for clarity

* fix pylint

* fix comments

* avoid breaking change with drag_coefficient

* reafactors Parachute.__init__ method

* fix tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
@MateusStano MateusStano requested a review from a team as a code owner March 19, 2026 01:30
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 77.01493% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.42%. Comparing base (6e13e2b) to head (badd7e2).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
rocketpy/environment/environment.py 61.76% 39 Missing ⚠️
rocketpy/rocket/rocket.py 71.15% 15 Missing ⚠️
rocketpy/environment/fetchers.py 62.50% 6 Missing ⚠️
rocketpy/environment/tools.py 93.68% 6 Missing ⚠️
rocketpy/rocket/aero_surface/generic_surface.py 84.37% 5 Missing ⚠️
rocketpy/plots/environment_plots.py 75.00% 3 Missing ⚠️
rocketpy/motors/solid_motor.py 0.00% 2 Missing ⚠️
rocketpy/environment/weather_model_mapping.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #943      +/-   ##
==========================================
+ Coverage   81.09%   81.42%   +0.33%     
==========================================
  Files         107      107              
  Lines       13903    14026     +123     
==========================================
+ Hits        11274    11421     +147     
+ Misses       2629     2605      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from rel/v1.12.0 to master March 20, 2026 18:07
@MateusStano MateusStano changed the base branch from master to develop March 20, 2026 18:10
MateusStano and others added 9 commits March 20, 2026 15:12
…ngelog (#940)

* Initial plan

* ENH: Add explicit timeouts to ThrustCurve API requests

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

* DOC: Add timeout fix PR to changelog

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
…utes for raw user input and update changelog (#941)

* Initial plan

* ENH: Restore power_off/on_drag as Function, add _input attributes for raw user input

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

* DOC: Add PR #941 compatibility fix to changelog

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

* Update rocketpy/rocket/rocket.py

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* MNT: ruff pylint

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: MateusStano <mateusstano@usp.br>
…or.evaluate_geometry` (#944)

* Initial plan

* BUG: Fix incorrect Jacobian in only_radial_burn branch of evaluate_geometry

Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
@MateusStano MateusStano self-assigned this Mar 21, 2026
@MateusStano MateusStano added Bug Something isn't working Environment Enviroment Class related features labels Mar 21, 2026
khushalkottaru and others added 5 commits March 25, 2026 07:29
* chore: added personal toolkit files

* update branch name in workflow

* chore: update toolkit files

* Fix: add wraparound logic for wind direction and related tests

* style: fix ruff formatting

* Remove unused import

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* refactor: move repetitive logic into helper method

* fix: update test logic in test_environment

* add changelog entry

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
@Gui-FernandesBR
Copy link
Copy Markdown
Member

I will take a look at this one over the weekend

@Gui-FernandesBR Gui-FernandesBR requested a review from Copilot March 28, 2026 18:00
@MateusStano MateusStano changed the base branch from develop to master April 1, 2026 22:01
@MateusStano MateusStano dismissed Gui-FernandesBR’s stale review April 1, 2026 22:01

The base branch was changed.

MateusStano and others added 15 commits April 1, 2026 20:00
…#889)

* Fix hard-coded radius value for parachute added mass calculation

Calculate radius from cd_s using a typical hemispherical parachute drag
coefficient (1.4) when radius is not explicitly provided. This fixes
drift distance calculations for smaller parachutes like drogues.

Formula: R = sqrt(cd_s / (Cd * π))

Closes #860

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Address code review: improve docstrings and add explicit None defaults

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Add CHANGELOG entry for PR #889

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Update rocket.add_parachute to use radius=None for consistency

Changed the default radius from 1.5 to None in the add_parachute method
to match the Parachute class behavior. This ensures consistent automatic
radius calculation from cd_s across both APIs.

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Refactor Parachute class to remove hard-coded radius value and introduce drag_coefficient parameter for radius estimation

Fix hard-coded radius value for parachute added mass calculation

Calculate radius from cd_s using a typical hemispherical parachute drag
coefficient (1.4) when radius is not explicitly provided. This fixes
drift distance calculations for smaller parachutes like drogues.

Formula: R = sqrt(cd_s / (Cd * π))

Closes #860

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Add CHANGELOG entry for PR #889

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

Refactor Parachute class to remove hard-coded radius value and introduce drag_coefficient parameter for radius estimation

MNT: Extract noise initialization to fix pylint too-many-statements in Parachute.__init__

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Refactor environment method access in controller test for clarity

* fix pylint

* fix comments

* avoid breaking change with drag_coefficient

* reafactors Parachute.__init__ method

* fix tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>
* chore: added personal toolkit files

* update branch name in workflow

* chore: update toolkit files

* Fix: add wraparound logic for wind direction and related tests

* style: fix ruff formatting

* Remove unused import

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* refactor: move repetitive logic into helper method

* fix: update test logic in test_environment

* add changelog entry

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ENH: added a new function (simulate_convergence)

* DOC: added a cell to show simulate_convergence function usage

* TST: integration test for simulate_convergence

* DOC: updated changelog for this PR

* ENH: ran black to lint intg test file

* new fixes thx to copilot comments

* linted rocketpy/simulation/monte_carlo.py

---------

Co-authored-by: Malmahrouqi3 <mohdsaid497566@gmail.com>
@Gui-FernandesBR Gui-FernandesBR changed the base branch from master to develop April 2, 2026 23:35
@MateusStano MateusStano changed the base branch from develop to master April 4, 2026 01:36
@MateusStano MateusStano changed the title BUG: Migrate Forecasts to UCAR THREDDS HOTFIX: Migrate Forecasts to UCAR THREDDS Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Environment Enviroment Class related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants