wavy.insitu_module
This module encompasses classes and methods to read and process wave field related data from stations. I try to mostly follow the PEP convention for python code style. Constructive comments on style and effecient programming are most welcome!
Attributes
Classes
Class to handle insitu based time series. |
|
Class to handle poi based time series. |
Functions
|
Checks if str in lst according to desired date (sd, ed) |
Module Contents
- wavy.insitu_module.variable_def
- wavy.insitu_module.check_date(filelst, date)
Checks if str in lst according to desired date (sd, ed)
return: idx for file
- class wavy.insitu_module.insitu_class(**kwargs)
Bases:
wavy.quicklookmod.quicklook_class_sat,wavy.filter_module.filter_classClass to handle insitu based time series.
- twin
- sd
- ed
- nID
- name
- varalias
- units
- stdvarname
- distlim
- filter
- region
- cfg
- download(path=None, nproc=1, **kwargs)
- _create_pathlst(**kwargs)
- list_input_files(show=False, **kwargs)
- _get_files(dict_for_sub=None, path=None, wavy_path=None, **kwargs)
Function to retrieve list of files/paths for available locally stored data. This list is used for other functions to query and parsing.
- param:
sd - start date (datetime object) ed - end date (datetime object) nID - nID as of model_cfg.yaml dict_for_sub - dictionary for substitution in templates path - a path if defined
- return:
pathtotals - list of paths
- _get_insitu_ts(**kwargs)
Main function to obtain data from insitu locations. reads files, apply region and temporal filter
- return: adjusted dictionary according to spatial and
temporal constraints
- static _enforce_longitude_format(ds)
- _enforce_meteorologic_convention(**kwargs)
- _change_varname_to_aliases(**kwargs)
- _change_stdvarname_to_cfname()
- static _return_extension(fstr: str)
- populate(**kwargs)
- get_item_parent(item, attr)
- get_item_child(item)
- class wavy.insitu_module.poi_class(poi: dict, **kwargs)
Bases:
wavy.quicklookmod.quicklook_class_sat,wavy.filter_module.filter_classClass to handle poi based time series.
- nID
- varalias
- sd
- ed
- stdvarname
- units
- twin
- distlim
- filter
- region
- name
- vars
- _build_xr_ds(poi)
- crop_to_period(**kwargs)
Function to crop the variable dictionary to a given period