:py:mod:`mlair.helpers.data_sources.toar_data_v2` ================================================= .. py:module:: mlair.helpers.data_sources.toar_data_v2 .. autoapi-nested-parse:: Functions to access https://toar-data.fz-juelich.de/api/v2/ Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: mlair.helpers.data_sources.toar_data_v2.download_toar mlair.helpers.data_sources.toar_data_v2.merge_data mlair.helpers.data_sources.toar_data_v2.correct_timezone mlair.helpers.data_sources.toar_data_v2.prepare_meta mlair.helpers.data_sources.toar_data_v2.combine_meta_data mlair.helpers.data_sources.toar_data_v2.load_timeseries_data mlair.helpers.data_sources.toar_data_v2.extract_timeseries_data mlair.helpers.data_sources.toar_data_v2.load_station_information mlair.helpers.data_sources.toar_data_v2.load_timeseries_information mlair.helpers.data_sources.toar_data_v2.select_timeseries_by_order mlair.helpers.data_sources.toar_data_v2.select_timeseries_by_origin mlair.helpers.data_sources.toar_data_v2.load_variables_information Attributes ~~~~~~~~~~ .. autoapisummary:: mlair.helpers.data_sources.toar_data_v2.__author__ mlair.helpers.data_sources.toar_data_v2.__date__ mlair.helpers.data_sources.toar_data_v2.str_or_none .. py:data:: __author__ :annotation: = Lukas Leufen .. py:data:: __date__ :annotation: = 2022-06-30 .. py:data:: str_or_none .. py:function:: download_toar(station_name: Union[str, List[str]], stat_var: dict, sampling: str = 'daily', data_origin: Dict = None) Download data from https://toar-data.fz-juelich.de/api/v2/ Uses station name to indicate measurement site and keys of stat_var to indicate variable name. If data origin is given, this method tries to load time series for this origin. In case no origin is provided, this method loads data with the highest priority according to toar-data's order parameter. :param station_name: :param stat_var: :param sampling: :param data_origin: :return: .. py:function:: merge_data(*args, sampling='hourly') .. py:function:: correct_timezone(data, meta, sampling) Extract timezone information and convert data index to this timezone. Uses UTC if no information is provided. Note that is method only modifies data in with sampling='hourly'. In all other cases, it returns just the given data without any change. This method expects date index of data to be in UTC. Timezone information is not added to the index to get rid of daylight saving time and ambiguous timestamps. .. py:function:: prepare_meta(meta, sampling, stat_var, var) .. py:function:: combine_meta_data(station_meta, timeseries_meta) .. py:function:: load_timeseries_data(timeseries_meta, url_base, opts, headers, sampling) .. py:function:: extract_timeseries_data(result, result_format) .. py:function:: load_station_information(station_name: List[str], url_base: str, headers: Dict) .. py:function:: load_timeseries_information(station_meta, var_meta, url_base: str, headers: Dict, data_origin: Dict = None) -> [Dict, Dict] .. py:function:: select_timeseries_by_order(toar_meta) .. py:function:: select_timeseries_by_origin(toar_meta, var_origin) .. py:function:: load_variables_information(var_dict, url_base, headers)