pycif.plugins.datastreams.fluxes.tm5 — API reference#
Configuration reference: tm5 plugin
- pycif.plugins.datastreams.fluxes.tm5.fetch.fetch(ref_dir, ref_file, date_interval, target_dir, tracer=None, **kwargs)[source]#
- pycif.plugins.datastreams.fluxes.tm5.read.read_AB(self, name, tracdir, tracfile, varnames, dates, interpol_flx=False, tracer=None, model=None, **kwargs)[source]#
Get fluxes from pre-computed fluxes and load them into a pyCIF variables
- Parameters:
self – the fluxes Plugin
name – the name of the component
tracdir – flux directory and file format
tracfile – flux directory and file format
dates – list of dates to extract
interpol_flx (bool) – if True, interpolates fluxes at time t from
files (values of surrounding available)
- pycif.plugins.datastreams.fluxes.tm5.read.read(self, name, varnames, dates, files, interpol_flx=False, tracer=None, model=None, ddi=None, **kwargs)[source]#
PURPOSE Get fluxes from pre-computed fluxes and load them into a pyCIF variables
ARGS self = the fluxes Plugin name = the name of the component tracdir = flux directory tracfile = flux file format varnames = ??? dates = list of dates to extract interpol_flx = (bool): if True, interpolates fluxes at time t from
values of surrounding available files
KWARGS **kwargs = ???
VERSION HISTORY 2.0 09-06-2021 by J.C.A. van Peet
Adapted for TM5.
- 1.0 ??-??-???? by A. Berchet
See original code above.
- pycif.plugins.datastreams.fluxes.tm5.read_adj.read_adj(filename)[source]#
PURPOSE Read fluxes from an adjoint TM5 run, generally saved to a file called adj_emissions.nc4
ARGS self = the fluxes plugin filename = the full name of the file, including path
KWARGS None
VERSION HISTORY 1.0 26-10-2021 by J.C.A. van Peet
Original code
- pycif.plugins.datastreams.fluxes.tm5.write.write_AB(self, name, flx_file, flx, mode='a')[source]#
Write flux to TM5 emission compatible files.
- Parameters:
self (Fluxes) – the Fluxes plugin
flx_file (str) – the file where to write fluxes
flx (xarray.DataArray) – fluxes data to write
mode (str) – ‘w’ to overwrite, ‘a’ to append
- pycif.plugins.datastreams.fluxes.tm5.write.write(self, name, flx_file, flx, mode='w', **kwargs)[source]#
PURPOSE Write flux to TM5 emission compatible files.
ARGS self (Fluxes) = the Fluxes plugin flx_file (str) = the file where to write fluxes flx (xarray.DataArray) = fluxes data to write mode (str) = ‘w’ to overwrite, ‘a’ to append
VERSION HISTORY 2.0 09-06-2021 by J.C.A. van Peet
Adapted for TM5.
- 1.0 ??-??-???? by A. Berchet
See original code above.