Choose time units in output netcdf
See original GitHub issueIs there any way to define the units in output netcdf created from to_netcdf method without having to manually convert the time objects into floats for example? It could maybe be handy if the units attribute of time coordinate could be modified and the modified value (if CF-compliant) used for encoding time in the output netcdf. Currently, to_netcdf raises ValueError: Failed hard to prevent overwriting key 'units' if the attribute is modified.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
need help setting time units correctly - SourceForge
Hi all,. I'm a newbie at NCO and netcdf. What i'm trying to do seemed fairly simple. I have to pacth together a...
Read more >how to change the unit of time variable in NetCdf files using ...
I usually have a code like this: import numpy as np import os, subprocess from netCDF4 import num2date,date2num,Dataset ...
Read more >Date and time manipulations with CDO - Declan Valters
I have a netcdf file that contains a time variable. The values in the variable's data array represent time units since date time...
Read more >The Components of a NetCDF Data Set
The first three are assigned fixed lengths; time is assigned the length UNLIMITED, which means it is the unlimited dimension. The basic unit...
Read more >Working with NetCDF data - Chad A. Greene
Select times 00:00:00, 12 step, and the fields 2 m temperature, ... variable in the NetCDF file, and also includes notes about the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello,
I’m having similar issues. However, I’m creating a dataset from a dict (data are packed in Matlab file).
The dataset is
ds_ivtand I have tried:and
The
.info()method retrieves:In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here or remove the
stalelabel; otherwise it will be marked as closed automatically