|
PHYEX 0.9.5
PHYsique EXternalisée
|
Public Member Functions | |
| __init__ (self, grid) | |
| get_pressure (self, position, state, pronostic_variables) | |
| get_altitude (self, position, state, pronostic_variables) | |
Public Attributes | |
| filename = grid | |
| position = grid_descr['position'] | |
| mean = grid_descr['mean'] | |
| str | kind = grid_descr['kind'] |
| description = grid_descr['description'] | |
| str | len = len(self.description) |
| str | nlevels = self.len - 1 if self.position in FLUX else self.len |
| ascending = None | |
| cst = Cst() | |
Protected Member Functions | |
| _read_gridfile (self, gridfile) | |
| _mean (self, values, method) | |
The Grid class handles vertical grids
The definition of the vertical grids are stored in files with the '.grid' extension.
Theses files contains a dictionary as a json string with the folowing content:
- kind: 'hybridP' for an hybrid-pressure coordinate (pressure on level i is P(i)=a(i)+b(i)*Ps)
'hybridH' for an hybrid-height coordinate (altitude on level i is Z(i)=a(i)+b(i)*Zs)
'P' for a pressure coordinate
'H' for a height (above sea level) coordinate
- position: 'FLUX' if the grid refers to flux levels
'MASS' otherwise
- mean: 'linear' or 'quadratic'
way to compute flux levels from mass levels if grid is defined on mass levels
or the reverse if grid is defined on flux levels
- description: a single list of values if kind is 'P' or 'H'
a list containing a list for the a(i) coefficients and a list for the b(i)
coefficients if kind is 'hybridP' or 'hybridH'.
| pyphyex.phyex1d.grid.Grid.__init__ | ( | self, | |
| grid ) |
|
protected |
|
protected |
| pyphyex.phyex1d.grid.Grid.get_altitude | ( | self, | |
| position, | |||
| state, | |||
| pronostic_variables ) |
Returns the level altitudes :param position: must be among grid.MASS + .grid.FLUX :param state: dictionary containing the current state :param pronostic_variables: list of pronostic variables
Definition at line 254 of file grid.py.


| pyphyex.phyex1d.grid.Grid.get_pressure | ( | self, | |
| position, | |||
| state, | |||
| pronostic_variables ) |
Returns the level pressures :param position: must be among grid.MASS + .grid.FLUX :param state: dictionary containing the current state :param pronostic_variables: list of pronostic variables
Definition at line 171 of file grid.py.


| pyphyex.phyex1d.grid.Grid.description = grid_descr['description'] |
| str pyphyex.phyex1d.grid.Grid.nlevels = self.len - 1 if self.position in FLUX else self.len |