Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/user/environment/1-atm-models/forecast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ Other generic forecasts can also be imported.
the same kind of pressure-level forecast as plain JSON, see
:ref:`open_meteo`.

.. note::

Within one Python session, RocketPy keeps in memory the forecasts it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Within one Python session, RocketPy keeps in memory the forecasts it
Within one Python session, RocketPy keeps in memory (why?) the forecasts it

will this consume RAM memory? I don't understand why that would be a better option

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will use RAM, but its about 50 kB per forecast (measured on GFS). When you do import rocketpy alone is you save 150 MB to RAM, so its a small addition

Why memory and not disk: I don't want RocketPy writing files in people's home folder by default. With #1137 every different request (model, place, launch time) left a file in ~/.rocketpy_cache, and a file was only removed if the same request came back after it expired. A new launch date every day means a new file every day, forever.

downloaded with the shortcuts on this page (``file="GFS"``, ``"NAM"`` and
so on), so that asking again for the same forecast, as when a notebook
cell is run again, takes a couple of seconds instead of a full download.
When the same model, place and launch time are asked for again, it asks
the server which model run is current and downloads the data again only
if the server published something new. The server is always contacted and
nothing is written to disk, so a forecast that cannot be confirmed as the
current one is never used. Each forecast takes about 50 kB of memory and
the 100 most recent ones are kept. To keep a forecast between sessions,
save the ``Environment`` itself.


.. _global-forecast-system:

Expand Down
Loading
Loading