pydata / pydata/xarray

Better explanation of 'minimal' in xarray.open_mfdataset(data_vars='minimal') in docs?

Open
#2,796 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-combine topic-documentation
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

Problem description

I'm currently troubleshooting some overly long (to me) load times using open_mfdataset on GFS data. In trying to speed things up, I'm trying to specify just the four variables I actually care about using data_vars=[strings], but to no avail. It still takes ~30 minutes to load 52 time slices from 7 files.

In the docs I do see that if data_vars =

list of str: "The listed data variables will be concatenated, in addition to the ‘minimal’ data variables."

However, I can't seem to understand what the 'minimal' variables are from this sentence in the docs:

‘minimal’: Only data variables in which the dimension already appears are included.

All the variables in the CF-compliant GFS data are associated with dimensions. So does that mean that all the variables in the files will be concatenated, regardless if I specify which ones I want? I feel like I'm misunderstanding what is included by default.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the open_mfdataset API documentation linked in the issue and trace the meaning of data_vars='minimal' and its interaction with an explicit variable list. Update the explanation so readers can identify which variables are included by default and verify the wording against the reported GFS use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.