Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
mesonh.mesonh_atmosphere.MesoNHAtmosphere Class Reference

Public Member Functions

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

Data Fields

tuple grid_coordinates = (pt, pz, px, py)
tuple grid_shape = (len(pt), len(pz), len(px), len(py))

Static Public Attributes

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

Protected Member Functions

 _get_interpolator (self, bounds, var, method="nearest")
 _slicyfy (self, bounds)
 _get_var_values (self, var, idx=Ellipsis)
 _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__()

Member Function Documentation

◆ _apply_bounds()

mesonh.mesonh_atmosphere.MesoNHAtmosphere._apply_bounds ( self,
point )
protected

Definition at line 126 of file mesonh_atmosphere.py.

References boundsmax, and boundsmin.

Referenced by get_points().

Here is the caller graph for this function:

◆ _get_interpolator()

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

Definition at line 106 of file mesonh_atmosphere.py.

References _get_var_values(), and _slicyfy().

Referenced by get_points().

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

◆ _get_var_values()

◆ _slicyfy()

mesonh.mesonh_atmosphere.MesoNHAtmosphere._slicyfy ( self,
bounds )
protected

Definition at line 112 of file mesonh_atmosphere.py.

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

Referenced by _get_interpolator().

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

◆ get_points()

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 _apply_bounds(), _get_interpolator(), and interpolator.

Referenced by get_wind().

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

◆ get_wind()

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 get_points().

Here is the call graph for this function:

Field Documentation

◆ boundsmax

list mesonh.mesonh_atmosphere.MesoNHAtmosphere.boundsmax = None
static

Definition at line 71 of file mesonh_atmosphere.py.

Referenced by __init__(), and _apply_bounds().

◆ boundsmin

list mesonh.mesonh_atmosphere.MesoNHAtmosphere.boundsmin = None
static

Definition at line 72 of file mesonh_atmosphere.py.

Referenced by __init__(), and _apply_bounds().

◆ data

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

Definition at line 68 of file mesonh_atmosphere.py.

Referenced by __init__(), and _get_var_values().

◆ grid_coordinates

tuple mesonh.mesonh_atmosphere.MesoNHAtmosphere.grid_coordinates = (pt, pz, px, py)

Definition at line 87 of file mesonh_atmosphere.py.

Referenced by _slicyfy().

◆ grid_shape

tuple mesonh.mesonh_atmosphere.MesoNHAtmosphere.grid_shape = (len(pt), len(pz), len(px), len(py))

Definition at line 88 of file mesonh_atmosphere.py.

◆ interpolator

mesonh.mesonh_atmosphere.MesoNHAtmosphere.interpolator = None
static

Definition at line 70 of file mesonh_atmosphere.py.

Referenced by get_points().


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