Skip to content

Improving performance of animation example - #2798

Open
erikvansebille wants to merge 4 commits into
Parcels-code:mainfrom
erikvansebille:faster_animation
Open

Improving performance of animation example#2798
erikvansebille wants to merge 4 commits into
Parcels-code:mainfrom
erikvansebille:faster_animation

Conversation

@erikvansebille

Copy link
Copy Markdown
Member

This PR provides an update t the animation example which improves performance by avoiding for-loops in polars frame for tails

In large output files (e.g. from https://github.com/Parcels-code/Drifter_campaign_prediction/blob/main/Matroos/run_dcsm7.py), this can reduce animation generation time from 2 hours to 6 minutes

Description

Checklist

  • Closes None
  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
    • Describe how you used it (e.g., by pasting your prompt): I have conversed with CoPilot to help me convert the polar dataframe to a 2D array of lon/lat so that plotting would go much faster; and also remove any for-loops in the animate-function

By avoiding for-loop in polars frame for tails

In large output files, this can reduce animation generation time from 2 hours to 6 minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant