smrf.spatial package¶
smrf.spatial.dk package¶
smrf.spatial.grid module¶
2016-03-07 Scott Havens
Distributed forcing data over a grid using interpolation
-
class
smrf.spatial.grid.
GRID
(config, mx, my, GridX, GridY, mz=None, GridZ=None, mask=None, metadata=None)[source]¶ Bases:
object
Inverse distance weighting class - Standard IDW - Detrended IDW
-
calculateInterpolation
(data, grid_method='linear')[source]¶ Interpolate over the grid
Parameters: - data – data to interpolate
- mx – x locations for the points
- my – y locations for the points
- X – x locations in grid to interpolate over
- Y – y locations in grid to interpolate over
-
detrendedInterpolation
(data, flag=0, grid_method='linear')[source]¶ Interpolate using a detrended approach
Parameters: - data – data to interpolate
- grid_method – scipy.interpolate.griddata interpolation method
-
smrf.spatial.idw module¶
2015-11-30 Scott Havens updated 2015-12-31 Scott Havens
- start using panda dataframes to help keep track of stations
Distributed forcing data over a grid using different methods
-
class
smrf.spatial.idw.
IDW
(mx, my, GridX, GridY, mz=None, GridZ=None, power=2, zeroVal=-1)[source]¶ Bases:
object
Inverse distance weighting class for distributing input data. Availables options are:
- Standard IDW
- Detrended IDW
-
calculateDistances
()[source]¶ Calculate the distances from the measurement locations to the grid locations
-
calculateIDW
(data, local=False)[source]¶ Calculate the IDW of the data at mx,my over GridX,GridY Inputs: data - is the same size at mx,my
-
detrendData
(data, flag=0, zeros=None)[source]¶ Detrend the data in val using the heights zmeas data - is the same size at mx,my flag - 1 for positive, -1 for negative, 0 for any trend imposed