wavy.satmod
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.
Module Contents
Classes
Class to handle netcdf files containing satellite data e.g. |
Functions
|
Function to retrieve list of files/paths for available |
|
Main function to obtain data from satellite missions. |
|
Function to crop the variable dictionary to a given period |
|
Checks if str in lst according to desired date (sdate,edate) |
|
return: indices for values matching the spatial and |
|
return: idx that match to region |
|
Function to filter satellite data according to region |
|
Takes care of regular grid regions |
|
Takes care of regions defines as geojson |
|
Takes care of region defined as polygon |
Attributes
- wavy.satmod.region_dict
- wavy.satmod.model_dict
- wavy.satmod.satellite_dict
- wavy.satmod.variable_info
- wavy.satmod.get_local_files(sdate, edate, twin, product, dict_for_sub=None, path_local=None)
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:
sdate - start date (datetime object) edate - end date (datetime object) twin - time window (temporal constraint) in minutes product - product as of satellite_specs.yaml dict_for_sub - dictionary for substitution in templates local_path - a path if defined
- return:
pathlst - list of paths filelst - list of files
- wavy.satmod.get_sat_ts(sdate, edate, twin, region, product, pathlst, varalias, poi, distlim, **kwargs)
Main function to obtain data from satellite missions. reads files, apply region and temporal filter
- return: adjusted dictionary according to spatial and
temporal contarinst
- wavy.satmod.crop_vardict_to_period(vardict, sdate, edate)
Function to crop the variable dictionary to a given period
- wavy.satmod.check_date(filelst, date)
Checks if str in lst according to desired date (sdate,edate)
return: idx for file
- class wavy.satmod.satellite_class(sdate=None, mission='s3a', product='cmems_L3_NRT', edate=None, twin=30, download=False, path_local=None, region='mwam4', nproc=1, varalias='Hs', api_url=None, filterData=False, poi=None, distlim=None, **kwargs)
Bases:
wavy.quicklookmod.quicklook_class_sat
,wavy.writermod.writer_class
Class to handle netcdf files containing satellite data e.g. Hs[time], lat[time], lon[time]
- This class offers the following added functionality:
get swaths of desired days and read
get the closest time stamp(s)
get the location (lon, lat) for this time stamp
get Hs or 10m wind value for this time
region mask
- 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.satmod.poi_sat(indict, twin, distlim, poi, ridx, i)
- return: indices for values matching the spatial and
temporal constraints
- wavy.satmod.match_poi(indict, twin, distlim, poi)
return: idx that match to region
- wavy.satmod.match_region(LATS, LONS, region, grid_date)
Function to filter satellite data according to region
- return:
indices that match the region
- wavy.satmod.match_region_rect(LATS, LONS, region)
Takes care of regular grid regions
- wavy.satmod.match_region_geojson(LATS, LONS, region)
Takes care of regions defines as geojson
- wavy.satmod.match_region_poly(LATS, LONS, region, grid_date)
Takes care of region defined as polygon