Obsparsers obsparser
#
Available Obsparsers obsparser
#
The following obsparsers
are implemented in pyCIF so far:
- CO2M pseudo_data
CO2M/pseudo_data
- Integrated Carbon Observing System (ICOS) data
ICOS/std
- NOAA-ESRL Observation Package (ObsPack) Data Products
obspack/std
- TROPOMI XCH4 retrievals – Official product
TROPOMI/CH4-official
- TROPOMI XCH4 retrievals from SRON
TROPOMI/CH4-SRON
- TROPOMI XCH4 retrievals from the University of Bremen
TROPOMI/CH4-WFMD
- Template plugin for observation parsers
template/std
- VERIFY/std
VERIFY/std
- WDCGG/std
WDCGG/std
Documentation#
Description#
The obsparser
(Observation Parser) class parses and formats raw observation
files into the standard pyCIF observations format
(see here for details).
obsparser
objects are called by the
standard/std
measurement
object.
Required parameters, dependencies and functions#
do_parse#
- pycif.plugins.obsparsers.template.do_parse(self, obs_file, **kwargs)[source]
Parse function for a file from template observations
- Args:
- obs_file (str) :
Path to input file
- Returns:
- pandas.DataFrame :
Dataframe from input file df[parameter][station]
parse_multiple_files (optional)#
The parse_multiple_files
is defined by default in the ObsParser
class.
It loops on files fitting a path pattern and parses them individually by calling the
function do_parse
.
If files cannot be processed individually, the function parse_multiple_files
should be implemented in the corresponding obsparser
plugin.
It should return the dataframe with all required observations.
- class pycif.utils.classes.obsparsers.ObsParser(plg_orig=None, orig_name='', **kwargs)[source]#
Class for handling time series parsing from different data providers and data file formats.
- parse_multiple_files(**kwargs)[source]
Parses multiple files specified by a glob pattern and stores the content into a datastore.
- Args:
self: the plugin with its describing arguments (in particular dir_obs)
- Returns:
dict: {obs_file} = df[obssite_id, parameter]
- Note:
By default, the function calls self.parse_file, which filters out NaNs and check that all required columns are available.