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
ofinput file that should be read (``
’sonic’`` or'tracer'
)
)ini (
dict
,initialisation information
)OF (
obj
,logfile
)idx_tracers_to_process (
np arr
ofint
,indices
ofselected mz
,updated only if first reading
ofa tracer file for the running day
)tracer_files_list (
dict
,list
ofthe tracer files
tobe processed
)results (
dict
,info
tobe outputed in the hdf5 files
,updated only if first reading
ofa tracer file for the running day
)cov_data (
dict
,covariance function (cov in function
ofthe lag)
,updated only if first reading
ofa tracer file for the running day
)out_len (
int
,number
ofsonic files
tobe processed
)
- Returns:
sonicdata (
np array
offloats
,input data from the sonic
andthe 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
ofthe 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
ofint
,indices
ofselected mz
)tracer_file_index (
int
,index
ofthe tracer file
tobe read in the file list
)results (
dict
,info
tobe outputed in the hdf5 files
,updated only if first reading
ofa tracer file for the running day
)cov_data (
dict
,covariance function (cov in function
ofthe lag)
,updated only if first reading
ofa tracer file for the running day
)Comments
--------
Written by B. Heinesch.
University
ofLiege
,Gembloux Agro-Bio Tech.