Skip to content

First draft of explanation_performance guide - #2705

Merged
erikvansebille merged 16 commits into
Parcels-code:mainfrom
erikvansebille:explanation_performance
Aug 13, 2026
Merged

First draft of explanation_performance guide#2705
erikvansebille merged 16 commits into
Parcels-code:mainfrom
erikvansebille:explanation_performance

Conversation

@erikvansebille

@erikvansebille erikvansebille commented Jun 25, 2026

Copy link
Copy Markdown
Member

Description

This PR adds an explanation_performance.md guide to the documentation, detailing the four options for loading fieldsets

Note that this PR is blocked by the implementation of windowed_arrays (#2656)

Checklist

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):

Comment thread docs/user_guide/examples/explanation_performance.md
| | The fieldset data can't be changed after it is loaded, as dask operations are not supported on the raw zarr data. |

```{note}
In our performance testing, we have found that using zarr files saved without any compression can be considerably faster than using compressed zarr files. However, we are working on an upstream fix in to make caching compressed zarr files faster, so this may change in the future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure what you're referring to here by 'working on an upstream fix'?

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.

Oh, I thought you mentioned that the issue was a repeated/inefficient uncompressing logic in zarr. And that we could try patch/fix this issue in the zarr library itself?

If that's not in the planning; then better to remove this statement

Comment thread docs/user_guide/examples/explanation_performance.md
@VeckoTheGecko

Copy link
Copy Markdown
Contributor

Looks good to far! Some comments above

| | The fieldset data can't be changed after it is loaded, as dask operations are not supported on the raw zarr data. |

```{note}
In our performance testing, we have found that using zarr files saved without any compression can be considerably faster than using compressed zarr files. However, we are working on an upstream fix in to make caching compressed zarr files faster, so this may change in the future.

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.

@VeckoTheGecko, is this correct?

| Works out-of-the-box | Only performs well for very small ParticleSets |

```{note}
The long-term plan for Parcels development is to make this Option 4 work well for all cases. However, this will require significant work on Dask indexing.

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.

This is correct, right?

Comment on lines +32 to +37
source_store = zarr.storage.LocalStore(filenames)
cache_store = zarr.storage.MemoryStore()

store = CacheStore(
store=source_store, cache_store=cache_store, max_size=MAX_CACHE_SIZE
)

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.

Should/can we put some of this under the hood in the parcels.open_raw_zarr() method?

| | The fieldset data can't be changed after it is loaded, as dask operations are not supported on the raw zarr data. |

```{note}
In our performance testing, we have found that using zarr files saved without any compression can be considerably faster than using compressed zarr files. However, we are working on an upstream fix in to make caching compressed zarr files faster, so this may change in the future.

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.

Oh, I thought you mentioned that the issue was a repeated/inefficient uncompressing logic in zarr. And that we could try patch/fix this issue in the zarr library itself?

If that's not in the planning; then better to remove this statement

@erikvansebille
erikvansebille enabled auto-merge (squash) August 13, 2026 10:55
@erikvansebille
erikvansebille merged commit 68c19d2 into Parcels-code:main Aug 13, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Provide guidance/advice about Parcels v4 performance

2 participants