gwexpy.interop.netcdf4_
Object-level NetCDF4 bridge helpers.
These helpers bridge a live TimeSeries object to a writable
netCDF4.Dataset and back. They are distinct from direct file I/O such as
TimeSeries.read(..., format="nc") / .write(..., format="nc").
Functions
|
Read from a netCDF4 dataset. |
|
Write to netCDF4 Dataset. |
- gwexpy.interop.netcdf4_.to_netcdf4(ts, ds, var_name, dim_time='time', time_units=None, overwrite=False)[source]
Write to netCDF4 Dataset.
ds: netCDF4.Dataset (writable)
- gwexpy.interop.netcdf4_.from_netcdf4(cls, ds, var_name, *, unit=None, channel=None, name=None, t0=None, dt=None)[source]
Read from a netCDF4 dataset.
Metadata absent from the variable can be supplied explicitly; an explicit argument takes priority over the stored attribute. Missing
t0/dtfall back to0/1with aUserWarningrather than silently.