Skip to content
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

Add tutorial information about indices keyword when creating FieldSet #1511

Open
erikvansebille opened this issue Feb 13, 2024 · 0 comments
Open
Labels
documentation good first issue Good for new parcels developers help wanted oceanography Issues that require knowledge of oceanography to complete

Comments

@erikvansebille
Copy link
Member

The option to use the indices dictionary specify what part of a Field to load can be useful at times, but is not discussed anywhere in the documentation. Perhaps good to add it somewhere, so that more users know about it. For example in the Grid Indexing tutorial?

See the FieldSet.from_netcdf() docstring at

parcels/parcels/fieldset.py

Lines 334 to 338 in daf05b7

indices :
Optional dictionary of indices for each dimension
to read from file(s), to allow for reading of subset of data.
Default is to read the full extent of each dimension.
Note that negative indices are not allowed.
and an example at
indices = {'lon': [5], 'lat': range(20, 30)}
fieldsetsub = set_globcurrent_fieldset(indices=indices, use_xarray=use_xarray)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue Good for new parcels developers help wanted oceanography Issues that require knowledge of oceanography to complete
Projects
Status: Backlog
Development

No branches or pull requests

2 participants