You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from cdflib.xarray import cdf_to_xarray,xarray_to_cdf
import xarray as xr
# https://cdaweb.gsfc.nasa.gov/pub/data/ace/mag/level_2_cdaweb/mfi_h0/1997/ac_h0_mfi_19970902_v04.cdf
filename = 'ac_h0_mfi_19970902_v04.cdf'
data = cdf_to_xarray(filename)
#xarray_to_cdf(data, 'data.cdf')
data.to_netcdf('data.nc')
fails with
ValueError: failed to prevent overwriting existing key units in attrs on variable 'Epoch'. This is probably an encoding field used by xarray to describe how a variable is serialized. To proceed, remove this key from the variable's attributes manually.
Is this a problem with the xarray.Dataset produced by cdf_to_xarray or a problem with xarray.Dataset.to_netcdf()?
The text was updated successfully, but these errors were encountered:
The following code:
fails with
Is this a problem with the xarray.Dataset produced by cdf_to_xarray or a problem with xarray.Dataset.to_netcdf()?
The text was updated successfully, but these errors were encountered: