read_main_inputs.read_main_inputs

read_main_inputs.read_main_inputs(filepath, filename, filetype, ini, OF, idx_tracers_to_process=None, tracer_files_list=None, results=None, cov_data=None, out_len=None)[source]

Reads the sonic, GHG or the tracer input files. The positional args are needed only for reading the tracer files.

Parameters:
  • filetype (str, gives the type of input file that should be read (``’sonic’`` or 'tracer'))

  • ini (dict, initialisation information)

  • OF (obj, logfile)

  • idx_tracers_to_process (np arr of int, indices of selected mz, updated only if first reading of a tracer file for the running day)

  • tracer_files_list (dict, list of the tracer files to be processed)

  • results (dict, info to be outputed in the hdf5 files, updated only if first reading of a tracer file for the running day)

  • cov_data (dict, covariance function (cov in function of the lag), updated only if first reading of a tracer file for the running day)

  • out_len (int, number of sonic files to be processed)

Returns:

  • sonicdata (np array of floats, input data from the sonic and the IRGA) –

    The structure is the following:

    np arrays of float64, size (x,y), with x the number of records y the variables time in UNIX format (UTC), u, v, w, T, flag

  • error_code (int, error flag for the reading of the input file (0 if failed, 1 if successful))

  • tracerdata (dict, input data from the PTR-TOF-MS) –

    The structure is the following:
    • time: np arrays of float64, size (x,), time in UNIX format (UTC)

    • mz: np arrays of float64, size (y,), mz values

    • conc: np arrays of float64, size (x,y), concentrations

    • calibration: np arrays of float64, size (y,), calibration coefficients for concentrations

    • transmission: np arrays of float64, size (y,), transmission coefficients for concentrations

  • idx_tracers_to_process (np arr of int, indices of selected mz)

  • tracer_file_index (int, index of the tracer file to be read in the file list)

  • results (dict, info to be outputed in the hdf5 files, updated only if first reading of a tracer file for the running day)

  • cov_data (dict, covariance function (cov in function of the lag), updated only if first reading of a tracer file for the running day)

  • Comments

  • --------

  • Written by B. Heinesch.

  • University of Liege, Gembloux Agro-Bio Tech.