wavy.satellite_module ===================== .. py:module:: wavy.satellite_module .. autoapi-nested-parse:: The main task of this module is to acquire, read, and prepare geophysical variables related to wave height from satellite altimetry files for further use. Attributes ---------- .. autoapisummary:: wavy.satellite_module.region_dict wavy.satellite_module.model_dict wavy.satellite_module.variable_def Classes ------- .. autoapisummary:: wavy.satellite_module.satellite_class Functions --------- .. autoapisummary:: wavy.satellite_module.crop_to_period wavy.satellite_module.check_date wavy.satellite_module.match_region_rect wavy.satellite_module.match_region_geojson wavy.satellite_module.match_region_poly Module Contents --------------- .. py:data:: region_dict .. py:data:: model_dict .. py:data:: variable_def .. py:function:: crop_to_period(ds, sd, ed) Function to crop the dataset to a given period .. py:function:: check_date(filelst, date) Checks if str in lst according to desired date (sd, ed) return: idx for file .. py:class:: satellite_class(**kwargs) Bases: :py:obj:`wavy.quicklookmod.quicklook_class_sat`, :py:obj:`wavy.filter_module.filter_class` Class to handle netcdf files containing satellite altimeter data e.g.: Hs[time], lat[time], lon[time], time[time] .. py:attribute:: sd .. py:attribute:: ed .. py:attribute:: nID .. py:attribute:: name .. py:attribute:: varalias .. py:attribute:: units .. py:attribute:: stdvarname .. py:attribute:: twin .. py:attribute:: distlim .. py:attribute:: filter .. py:attribute:: cfg .. py:attribute:: poi .. py:method:: download(path=None, nproc=1, **kwargs) .. py:method:: _get_files(dict_for_sub=None, path=None, wavy_path=None, **kwargs) Function to retrieve list of files/paths for available locally stored satellite data. This list is used for other functions to query and parsing. param: sd - start date (datetime object) ed - end date (datetime object) twin - time window (temporal constraint) in minutes nID - nID as of satellite_cfg.yaml dict_for_sub - dictionary for substitution in templates path - a path if defined return: pathlst - list of paths .. py:method:: list_input_files(show=False, **kwargs) .. py:method:: crop_to_poi(**kwargs) .. py:method:: crop_to_region(region, **kwargs) .. py:method:: _get_sat_ts_blunt(**kwargs) Main function to obtain data from satellite missions. reads files, apply region and temporal filter fct is insensitive to region return: adjusted dictionary according to spatial and temporal constraints .. py:method:: _get_sat_ts(**kwargs) Main function to obtain data from satellite missions. reads files, apply region and temporal filter fct will crop to region on the fly if given in init kwargs chunk_size determines number of files read before region filter return: adjusted dictionary according to spatial and temporal constraints .. py:method:: _enforce_longitude_format(**kwargs) .. py:method:: _enforce_meteorologic_convention(**kwargs) .. py:method:: _change_varname_to_aliases(**kwargs) .. py:method:: _change_stdvarname_to_cfname(**kwargs) .. py:method:: populate(**kwargs) .. py:method:: drop_duplicates(dim='time', keep='first') .. py:method:: _match_poi(poi) return: idx that match to region .. py:method:: _poi_sat(ds, twin, distlim, poi, ridx, i) :staticmethod: return: indices for values matching the spatial and temporal constraints .. py:method:: _match_region(LATS, LONS, region, grid_date) :staticmethod: Function to filter satellite data according to region return: indices that match the region .. py:method:: compute_pulse_limited_footprint_radius() Compute pulse limited footprint size .. py:method:: crop_to_period(**kwargs) Function to crop the variable dictionary to a given period .. py:method:: get_item_parent(item, attr) Offers possibility to explore netcdf meta info. by specifying what you are looking for (item), e.g. part of a string, and in which attribute (attr), e.g. standard_name, this function returns the parent parameter name of the query string. param: item - (partial) string e.g. [m] attr - attribute e.g. units return: list of matching parameter strings e.g. for satellite_class object sco: .. code :: sco.get_item_parent('m','units') .. py:method:: get_item_child(item) Gets all attributes connected to given parameter name. param: item - (partial) string e.g. [m] return: matching parameter string e.g. for satellite_class object sco: .. code :: sco.get_item_child('time') .. py:function:: match_region_rect(LATS, LONS, region) Takes care of regular grid regions .. py:function:: match_region_geojson(LATS, LONS, region) Takes care of regions defines as geojson .. py:function:: match_region_poly(LATS, LONS, region, grid_date, **kwargs) Takes care of region defined as polygon