Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
mesonh.mesonh_atmosphere.MesoNHAtmosphere Class Reference

Public Member Functions

def __init__ (self, files, tstep, tinit=0)
 
def get_points (self, points, var, method='nearest')
 
def get_wind (self, points, method='nearest')
 

Data Fields

 data
 
 grid_coordinates
 
 grid_shape
 

Static Public Attributes

list data = []
 
 interpolator = None
 
 boundsmax = None
 
 boundsmin = None
 

Private Member Functions

def _get_interpolator (self, bounds, var, method="nearest")
 
def _slicyfy (self, bounds)
 
def _get_var_values (self, var, idx=Ellipsis)
 
def _apply_bounds (self, point)
 

Detailed Description

 Interpolation in space-time from mesoNH data over a grid.

 The functions valued on the grid are assumed to be periodic in the
 x and y axis (south->north and west->east) :
 f(x)=f(x+xmax-xmin) where [xmin,xmax] are the bounds on x
 of the mesoNH grid.

     Clipping is done on the z (height) and time axis :
 f(z)=f(min(max(z,zmin),zmax)) where [zmin,zmax] are the bound on z
 of the mesoNH grid.

 Two interpolation methods are currently supported : nearest neighbour
 and linear.

 Uses RegularGridInterpolator from scipy package.

Definition at line 49 of file mesonh_atmosphere.py.

Constructor & Destructor Documentation

◆ __init__()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere.__init__ (   self,
  files,
  tstep,
  tinit = 0 
)

Definition at line 74 of file mesonh_atmosphere.py.

Member Function Documentation

◆ _apply_bounds()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere._apply_bounds (   self,
  point 
)
private

◆ _get_interpolator()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere._get_interpolator (   self,
  bounds,
  var,
  method = "nearest" 
)
private

Definition at line 106 of file mesonh_atmosphere.py.

References mesonh.mesonh_atmosphere.MesoNHAtmosphere._get_var_values(), and mesonh.mesonh_atmosphere.MesoNHAtmosphere._slicyfy().

Referenced by mesonh.mesonh_atmosphere.MesoNHAtmosphere.get_points().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _get_var_values()

◆ _slicyfy()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere._slicyfy (   self,
  bounds 
)
private

Definition at line 112 of file mesonh_atmosphere.py.

References mesonh.mesonh_atmosphere.find_gt(), mesonh.mesonh_atmosphere.find_le(), and mesonh.mesonh_atmosphere.MesoNHAtmosphere.grid_coordinates.

Referenced by mesonh.mesonh_atmosphere.MesoNHAtmosphere._get_interpolator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_points()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere.get_points (   self,
  points,
  var,
  method = 'nearest' 
)
 Get value of variable on points

Arguments:
points: a ndarray containing the point coordinates on the last
dimension
var: the name of the variable in the mesoNH file(s)
method: 'nearest' and 'linear' interpolation are currently supported

Definition at line 90 of file mesonh_atmosphere.py.

References mesonh.mesonh_atmosphere.MesoNHAtmosphere._apply_bounds(), mesonh.mesonh_atmosphere.MesoNHAtmosphere._get_interpolator(), and mesonh.mesonh_atmosphere.MesoNHAtmosphere.interpolator.

Referenced by mesonh.mesonh_atmosphere.MesoNHAtmosphere.get_wind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_wind()

def mesonh.mesonh_atmosphere.MesoNHAtmosphere.get_wind (   self,
  points,
  method = 'nearest' 
)
Convenience method for getting 3D wind. See get_points.

Definition at line 142 of file mesonh_atmosphere.py.

References mesonh.mesonh_atmosphere.MesoNHAtmosphere.get_points().

+ Here is the call graph for this function:

Field Documentation

◆ boundsmax

mesonh.mesonh_atmosphere.MesoNHAtmosphere.boundsmax = None
static

◆ boundsmin

mesonh.mesonh_atmosphere.MesoNHAtmosphere.boundsmin = None
static

◆ data [1/2]

list mesonh.mesonh_atmosphere.MesoNHAtmosphere.data = []
static

◆ data [2/2]

mesonh.mesonh_atmosphere.MesoNHAtmosphere.data

◆ grid_coordinates

mesonh.mesonh_atmosphere.MesoNHAtmosphere.grid_coordinates

◆ grid_shape

mesonh.mesonh_atmosphere.MesoNHAtmosphere.grid_shape

Definition at line 88 of file mesonh_atmosphere.py.

◆ interpolator

mesonh.mesonh_atmosphere.MesoNHAtmosphere.interpolator = None
static

The documentation for this class was generated from the following file: