pycif.plugins.datastreams.fluxes.GCP_1x1 — API reference#
Configuration reference: GCP_1x1 plugin
- pycif.plugins.datastreams.fluxes.GCP_1x1.fetch.fetch(ref_dir, ref_file, input_interval, target_dir, tracer=None, component=None, **kwargs)[source]#
Fetch files and dates for GCP.
- Parameters:
ref_dir (str) – the path to the input files
ref_file (str) – format of the input files
input_interval (list) – simulation interval (start and end dates)
target_dir (str) – where to copy
tracer – the tracer Plugin, corresponding to the paragraph
datavect/components/fluxes/parameters/my_speciesin the configuration yaml; can be needed to fetch extra information given by the usercomponent – the component Plugin, same as tracer; corresponds to the paragraph
datavect/components/fluxesin the configuration yaml
- Returns:
- for each date that begins a period, an array containing
the names of the files that are available for the dates within this period
- list_dates: for each date that begins a period, an array containing
the names of the dates matching the files listed in list_files
- Return type:
list_files
- pycif.plugins.datastreams.fluxes.GCP_1x1.get_domain.get_domain(ref_dir, ref_file, input_interval, target_dir, tracer=None)[source]#
Read information from the reference file to define the data horizontal and, if relevant, vertical domain.
- Parameters:
ref_dir (str) – the path to the input files
ref_file (str) – format of the input files
input_interval (list) – simulation interval (start and end dates)
target_dir (str) – where to copy
tracer – the tracer Plugin, corresponding to the paragraph
datavect/components/fluxes/parameters/my_speciesin the configuration yaml; can be needed to fetch extra information given by the user
- Returns:
- a domain class object, with the definition of the center grid
cells coordinates, as well as corners
- Return type:
domain (Domain)
- pycif.plugins.datastreams.fluxes.GCP_1x1.read.read(self, name, varnames, dates, files, interpol_flx=False, tracer=None, model=None, ddi=None, **kwargs)[source]#
Get fluxes from raw files and load them into a pyCIF variables.
- Parameters:
name (str) – name of the component
varnames (list[str]) – original names of variables to read; use name if varnames is empty
dates (list) – list of the date intervals to extract
files (list) – list of the files matching dates
- Returns:
- the actual data with dimension:
time, levels, latitudes, longitudes
- Return type:
xr.DataArray