Created on Jul 29, 2013
@author: Christoph Paulik christoph.paulik@geo.tuwien.ac.at
Bases: object
Container class for ASCAT time series
Parameters : | gpi : int
lon : float
lat : float
cell : int
data: pandas.DataFrame :
|
---|
Attributes
gpi | int | grid point index |
longitude | float | longitude of grid point |
latitude | float | latitude of grid point |
cell | int | cell number of grid point |
data: pandas.DataFrame | DataFrame which contains the data |
Methods
wrapper for pandas.DataFrame.plot which adds title to plot and drops NaN values for plotting Returns ——- ax : axes
matplotlib axes of the plot
Raises : | ASCATReaderException :
|
---|
Bases: pytesmo.io.sat.ascat.Ascat_data
class for reading ASCAT SSM data. It extends Ascat_data and provides the information necessary for reading SSM data
Parameters : | path : string
grid_path : string
grid_info_filename : string, optional
advisory_flags_path : string, optional
topo_threshold : int, optional
water_threshold : int, optional
|
---|
Attributes
gp_filename_template | string | defines how the gpi is put into the template string to make the filename |
gp_filestruct | numpy.dtype | structure template of the SSM .dat file |
scale_factor | dict | factor by which to multiply the raw data to get the correct values for each field in the gp_filestruct |
include_in_df | list | list of fields that should be returned to the user after reading |
nan_values | dict | nan value saved in the file which will be replaced by numpy.nan values during reading |
datatype | dict | datatype of the fields that the return data should have |
Methods
read_ssm(*args,**kwargs) | read surface soil moisture |
function to read SSM takes either 1 or 2 arguments. It can be called as read_ssm(gpi,**kwargs) or read_ssm(lon,lat,**kwargs)
Parameters : | gpi : int
lon : float
lat : float
mask_ssf : boolean, optional
mask_frozen_prob : int,optional
mask_snow_prob : int,optional
|
---|---|
Returns : | df : pandas.DataFrame
|
Bases: pytesmo.io.sat.ascat.Ascat_data
class for reading ASCAT SWI data. It extends Ascat_data and provides the information necessary for reading SWI data
Parameters : | path : string
grid_path : string
grid_info_filename : string, optional
advisory_flags_path : string, optional
topo_threshold : int, optional
water_threshold : int, optional
|
---|
Attributes
gp_filename_template | string | defines how the gpi is put into the template string to make the filename |
gp_filestruct | numpy.dtype | structure template of the SSM .dat file |
scale_factor | dict | factor by which to multiply the raw data to get the correct values for each field in the gp_filestruct |
include_in_df | list | list of fields that should be returned to the user after reading |
nan_values | dict | nan value saved in the file which will be replaced by numpy.nan values during reading |
datatype | dict | datatype of the fields that the return data should have |
T_SWI | dict | information about which numerical T-Value maps to which entry in the datastructure |
T_QFLAG | dict | information about which numerical T-Value maps to which entry in the datastructure |
Methods
read_swi(*args,**kwargs) | read soil water index |
function to read SWI takes either 1 or 2 arguments being. It can be called as read_swi(gpi,**kwargs) or read_swi(lon,lat,**kwargs)
Parameters : | gpi : int
lon : float
lat : float
T : int, optional
mask_qf : int, optional
mask_frozen_prob : int,optional
mask_snow_prob : int,optional
|
---|---|
Returns : | df : pandas.DataFrame
|
Bases: object
Class that provides access to ASCAT data stored in userformat which is downloadable from the TU Wien FTP Server after registration at http://rs.geo.tuwien.ac.at .
Parameters : | path : string
grid_path : string
grid_info_filename : string, optional
advisory_flags_path : string, optional
topo_threshold : int, optional
water_threshold : int, optional
|
---|
Attributes
path | string | path to data folder which contains the zip files from the FTP server |
grid_path | string | path to grid_info folder which contains txt files with information about grid point index,latitude, longitude and cell |
grid_info_filename | string | name of the grid info txt file in grid_path |
grid_info_np_filename | string | name of the numpy save file to the grid information |
topo_threshold | int | if topographic complexity of read grid point is above this threshold a warning is output during reading |
water_threshold | int | if water fraction of read grid point is above this threshold a warning is output during reading |
grid_info_loaded | boolean | true if the grid information has already been loaded |
kdTree | NN.findGeoNN object | kdTree wrapper object used for finding the nearest neighbor |
advisory_flags_path | string | path to advisory flags .dat files, if not provided they will not be used |
include_advflags | boolean | True if advisory flags are available |
Methods
unzip_cell(cell) | unzips zipped grid point files into subdirectory |
find_nearest_gpi(lon,lat) | finds nearest grid point index given longitude and latitude |
read_advisory_flags(gpi) | reads the advisory flags for a given grid point index |
finds nearest gpi, builds kdTree if it does not yet exist
Parameters : | lon : float
lat : float
|
---|---|
Returns : | gpi : long
|
gets lon lat coordinates for given gpi
Parameters : | gpi : int
|
---|---|
Returns : | longitude : float latitude : float |
Raises : | ASCATReaderException :
|
Read the advisory flags located in the self.advisory_flags_path Advisory flags include frozen probability, snow cover probability topographic complexity and water fraction.
Parameters : | gpi : long
|
---|---|
Returns : | df : pandas.DataFrame
topo : numpy.uint8
water : numpy.uint8
|