act.io.read_ameriflux#

act.io.read_ameriflux(filename, metadata_filename=None, data_type=None, timestep=None, rename_vars_dict=None, variable_units_dict=None)[source]#

Returns xarray.Dataset with stored data from FLUXNET or BASE-BADM and possible metadata from a user-defined metadata excel files for a single datastream.

Parameters:
  • filename (str) – Filename of Ameriflux dataset

  • metadata_filename (str) – Excel file usually provided with Ameriflux dataset that contains the data’s metadata. Default is None.

  • data_type (str) – Type of data file to be read. Valid options are ‘fluxnet’ and ‘base’. Default is None and will try to determine data type from filename.

  • timestep (str) – Timestep of data, this parameter is only used for ‘fluxnet’ data types and if the time format can’t be determined by the filename. Default is None, options are ‘year’, ‘month’, ‘week’, ‘day’, and ‘hour’.

  • rename_vars_dict (dict) – A dictionary containing current variable names and new variable names to replace the current variable names. Default is None and variables are not renamed.

  • variable_units_dict (dict) – A dictionary containing current variable names and units to be added to that variable. Default is None and uses current units from Ameriflux’s unit database.

Returns:

ds (xarray.Dataset) – ACT Xarray dataset.