pycif.plugins.datastreams.fields.tm5_ic — API reference#
Configuration reference: tm5_ic plugin
- pycif.plugins.datastreams.fields.tm5_ic.fetch.fetch(ref_dir, ref_file, input_interval, target_dir, tracer=None, component=None)[source]#
Fetch the single TM5 initial-condition file for the start date.
- Parameters:
ref_dir – directory where the original file is found.
ref_file – (template) name of the original file.
input_interval – list of two dates; only the start date is used.
target_dir – directory where the link to the original file is created.
tracer – unused, accepted for interface compatibility.
component – unused, accepted for interface compatibility.
- Returns:
- single-entry dict mapping the start date to a
one-element list with the file path.
- list_dates: single-entry dict mapping the start date to
[[start date, start date]].
- Return type:
list_files
- pycif.plugins.datastreams.fields.tm5_ic.read.read(self, name, tracdir, tracfile, varnames, dates, interpol_flx=False, comp_type=None, model=None, tracer=None, **kwargs)[source]#
Get the TM5 initial condition and load it into a pyCIF variable.
Reads
q{restart_id:02d}(usingtracer.restart_idif set, otherwise therestart_idof the species in the chemical scheme) from the single file matching the earliest requested date.- Parameters:
self – the IC Plugin
name – the name of the component
tracdir – restart file directory and file format
tracfile – restart file directory and file format
varnames – unused, accepted for interface compatibility
dates – list of dates to extract; only the earliest date is used
interpol_flx (bool) – unused, accepted for interface compatibility
comp_type – unused, accepted for interface compatibility
model – the model Plugin, used to resolve the species’
restart_idviamodel.chemistry.acspecieswhentracer.restart_idis not settracer – may carry an explicit
restart_id, taking precedence over the chemical scheme’s
- Returns:
xarray.DataArray with dims
(time, lev, lat, lon).