Skip to content

Commit

Permalink
Allow single string varname
Browse files Browse the repository at this point in the history
this way the current test still works
  • Loading branch information
zmoon committed May 3, 2024
1 parent 72febb9 commit be143a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions monetio/sat/_mopitt_l3_mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ def open_dataset(files, varnames):
files : str or Path or list
Input file path(s).
If :class:`str`, shell-style wildcards (e.g. ``*``) will be expanded.
varnames : list
The variables to load from the MOPITT file.
varnames : str or list of str
The variable(s) to load from the MOPITT file.
Returns
-------
Expand All @@ -233,6 +233,9 @@ def open_dataset(files, varnames):
else:
filelist = files # assume list

if isinstance(varnames, str):
varnames = [varnames]

datasets = []
for filename in filelist:
print(filename)
Expand Down

0 comments on commit be143a3

Please sign in to comment.