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

Means to read-in fields from CDL as a string input #171

Closed
sadielbartholomew opened this issue Dec 14, 2020 · 0 comments · Fixed by #227
Closed

Means to read-in fields from CDL as a string input #171

sadielbartholomew opened this issue Dec 14, 2020 · 0 comments · Fixed by #227
Assignees
Labels
enhancement New feature or request netCDF read Relating to reading netCDF datasets

Comments

@sadielbartholomew
Copy link
Member

sadielbartholomew commented Dec 14, 2020

We agreed it would be useful to support a way to read-in field constructs from CDL supplied as a string, rather than defined in a file, the latter of which is the only means currently supported. (Naturally CDL is the only format we support that can be provided as a string.)

This could be handy if, say, a user had CDL copied to clipboard and they wanted to work with it interactively with cf, since they could just paste it into a string in their (i)Python session without having to save it to a file outside of the session.

An intuitive way to enable this would be a keyword argument such as cdl_string to cf.read to indicate, when True, that the input argument is a str of valid CDL rather than the path to a file, as standard, i.e:

cf.read(string, cdl_string=True)

where the default would of course be False.

@sadielbartholomew sadielbartholomew added the enhancement New feature or request label Dec 14, 2020
@sadielbartholomew sadielbartholomew self-assigned this Jun 28, 2021
@davidhassell davidhassell added the netCDF read Relating to reading netCDF datasets label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request netCDF read Relating to reading netCDF datasets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants