konrad.utils.append_timestep_netcdf¶
- konrad.utils.append_timestep_netcdf(filename, data, timestamp)[source]¶
Append a timestep to an existing netCDF4 file.
Notes
The variables to append to have to exist in the netCDF4 file!
- Parameters
filename (str) – Path to the netCDF4.
data (dict{ndarray}) –
Dict-like object containing the data arrays. The key is the variable name and the value is an
ndarray
, apandas.Series
or anxarray.DataArray
e.g.:>>> data = {'T': np.array([290, 295, 300])}
timestamp (float) – Timestamp of values appended.