Changing values of an existing NetCDF file (some kind of in-place operation) ? #585
Unanswered
jypeter
asked this question in
2. Questions
Replies: 1 comment 1 reply
-
@jypeter – see this thread. I think this works a differently in xarray (my understanding/experience is that you essentially need to re-write the whole file/dataset). I think the netCDF4 package provides this kind of functionality (e.g., here), but you would need to open the netCDF file as a netCDF4 dataset (instead of an xarray dataset). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question criteria
Describe your question
The following question came up in a discussion. It is theoretical, but it was an extremely useful feature of cdms2, when you knew about it. I'm afraid I dont' remember if I have already asked about this
Is there in xarray/xCDAT a feature similar to the file variables (I think) of cdms2 ? I have asked @oliviermarti, but he has told me he only uses xarray/xCDAT to read files, not to create new files or modify existing files
More precisely, I wonder if there is a way to:
Use cases:
K
, but the actual values in the file are indegC
. So we just want to read the existingT
data, and overwrite it in-place withT+273.15
Are there are any possible answers you came across?
No response
Minimal Complete Verifiable Example (MVCE)
No response
Relevant log output
No response
Environment
No response
Anything else we need to know?
No response
Beta Was this translation helpful? Give feedback.
All reactions