wavy.satellite_module

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

region_dict

model_dict

variable_def

Classes

satellite_class

Class to handle netcdf files containing satellite altimeter data

Functions

crop_to_period(ds, sd, ed)

Function to crop the dataset to a given period

check_date(filelst, date)

Checks if str in lst according to desired date (sd, ed)

match_region_rect(LATS, LONS, region)

Takes care of regular grid regions

match_region_geojson(LATS, LONS, region)

Takes care of regions defines as geojson

match_region_poly(LATS, LONS, region, grid_date, **kwargs)

Takes care of region defined as polygon

Module Contents

wavy.satellite_module.region_dict
wavy.satellite_module.model_dict
wavy.satellite_module.variable_def
wavy.satellite_module.crop_to_period(ds, sd, ed)

Function to crop the dataset to a given period

wavy.satellite_module.check_date(filelst, date)

Checks if str in lst according to desired date (sd, ed)

return: idx for file

class wavy.satellite_module.satellite_class(**kwargs)

Bases: wavy.quicklookmod.quicklook_class_sat, wavy.filter_module.filter_class

Class to handle netcdf files containing satellite altimeter data e.g.: Hs[time], lat[time], lon[time], time[time]

sd
ed
nID
name
varalias
units
stdvarname
twin
distlim
filter
cfg
poi
download(path=None, nproc=1, **kwargs)
_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

list_input_files(show=False, **kwargs)
crop_to_poi(**kwargs)
crop_to_region(region, **kwargs)
_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

_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

_enforce_longitude_format(**kwargs)
_enforce_meteorologic_convention(**kwargs)
_change_varname_to_aliases(**kwargs)
_change_stdvarname_to_cfname(**kwargs)
populate(**kwargs)
drop_duplicates(dim='time', keep='first')
_match_poi(poi)

return: idx that match to region

static _poi_sat(ds, twin, distlim, poi, ridx, i)
return: indices for values matching the spatial and

temporal constraints

static _match_region(LATS, LONS, region, grid_date)

Function to filter satellite data according to region return:

indices that match the region

compute_pulse_limited_footprint_radius()

Compute pulse limited footprint size

crop_to_period(**kwargs)

Function to crop the variable dictionary to a given period

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:

sco.get_item_parent('m','units')
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:

sco.get_item_child('time')
wavy.satellite_module.match_region_rect(LATS, LONS, region)

Takes care of regular grid regions

wavy.satellite_module.match_region_geojson(LATS, LONS, region)

Takes care of regions defines as geojson

wavy.satellite_module.match_region_poly(LATS, LONS, region, grid_date, **kwargs)

Takes care of region defined as polygon