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

Putting variables in files, NCL style #34

Open
gabriel-abrahao opened this issue Apr 1, 2019 · 0 comments
Open

Putting variables in files, NCL style #34

gabriel-abrahao opened this issue Apr 1, 2019 · 0 comments

Comments

@gabriel-abrahao
Copy link

gabriel-abrahao commented Apr 1, 2019

Hi everyone,

One of the most useful functionalities of NCL was that metadata was passed along with the variables, which made writing NC files from scratch (among many other things) much easier. For example, if you wanted to isolate just variable T from a big file containing several others in a file with just it, it was as simple as:

fbig = addfile("thebigfile.nc","r")
var = fbig->T
fnew = addfile("thenewfile.nc","c")
fnew->T = var

However, in PyNIO you apparently have to create the variable beforehand in the file, and have the dimensions created beforehand. Also, subsetting generally breaks the metadata and there is no copy_VarCoods-like function. Is there a plan to implement those behaviours, or maybe something already implemented that I'm not aware of?

If there's a plan, I'd be glad to contribute if someone points me in the right direction, at least with some testing.

Thanks,
Gabriel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant