wavy.insitu_readers

The main task of this module is to read insitu obs for further use.

Module Contents

Functions

get_d22_ts(sdate, edate, basedate, nID, sensor, ...)

get_d22_dict(**kwargs)

get_typeid(→ str)

make_frost_reference_time_period(sdate, edate)

call_frost_api(→ requests.models.Response)

make frost api call

call_frost_api_v1(→ requests.models.Response)

frost call, retrieve data from frost v1

find_preferred(idx, sensors, refs, pref)

get_frost_df_v1(→ pandas.core.frame.DataFrame)

create pandas dataframe from frost call for v1

get_frost_dict(**kwargs)

get_nc_dict(**kwargs)

parse_d22(sdate, edate, pathlst, strsublst, dict_for_sub)

Read all lines in file and append to sl

floater(s)

Function that converts 's' to float32 or nan if floater throws exception

find_category_for_variable(varalias)

get_revised_categories(sl, category)

finds number of occurences of string (category) to determine

find_category(sl, category)

check_sensor_availability(idxlst, nID, sensor)

extract_d22(sl, varalias, nID, sensor)

Extracting data of choice - reading sl from parse_d22

insitu_reader(**kwargs)

wrapping function to read insitu files

Attributes

insitu_dict

variable_info

variables_frost

d22_dict

wavy.insitu_readers.insitu_dict
wavy.insitu_readers.variable_info
wavy.insitu_readers.variables_frost
wavy.insitu_readers.d22_dict
wavy.insitu_readers.get_d22_ts(sdate, edate, basedate, nID, sensor, varalias, pathlst, strsublst, dict_for_sub)
wavy.insitu_readers.get_d22_dict(**kwargs)
wavy.insitu_readers.get_typeid(insitu_dict: dict, s: str) str
wavy.insitu_readers.make_frost_reference_time_period(sdate, edate)
wavy.insitu_readers.call_frost_api(sdate: datetime.datetime, edate: datetime.datetime, nID: str, varstr: str, sensor: str) requests.models.Response

make frost api call

wavy.insitu_readers.call_frost_api_v1(nID: str, varstr: str, frost_reference_time: str, client_id: str, sensor: str) requests.models.Response

frost call, retrieve data from frost v1

wavy.insitu_readers.find_preferred(idx, sensors, refs, pref)
wavy.insitu_readers.get_frost_df_v1(r: requests.models.Response) pandas.core.frame.DataFrame

create pandas dataframe from frost call for v1

wavy.insitu_readers.get_frost_dict(**kwargs)
wavy.insitu_readers.get_nc_dict(**kwargs)
wavy.insitu_readers.parse_d22(sdate, edate, pathlst, strsublst, dict_for_sub)

Read all lines in file and append to sl

wavy.insitu_readers.floater(s)

Function that converts ‘s’ to float32 or nan if floater throws exception

wavy.insitu_readers.find_category_for_variable(varalias)
wavy.insitu_readers.get_revised_categories(sl, category)

finds number of occurences of string (category) to determine revised_categories (type: list)

wavy.insitu_readers.find_category(sl, category)
wavy.insitu_readers.check_sensor_availability(idxlst, nID, sensor)
wavy.insitu_readers.extract_d22(sl, varalias, nID, sensor)

Extracting data of choice - reading sl from parse_d22 CAUTION: 10min data is extracted for entire days only 00:00h - 23:50h Returns values of chosen variable (ts) and corresponding datetimes (dt) as type: np.array

wavy.insitu_readers.insitu_reader(**kwargs)

wrapping function to read insitu files

return:

vardict - dictionary of variables for insitu data