|
PHYEX 0.9.5
PHYsique EXternalisée
|


Public Member Functions | |
| __init__ (self, dt, method, name, tag, case, grid, prognostic_variables) | |
| budget_add (self, state, key, value) | |
| budget_fields (self, state) | |
| budget_record (self, state, before, scheme, process, variables, timestep) | |
| setup (self, init_state, duration) | |
| finalize (self) | |
| execute (self, previous_state, timestep, timestep_number) | |
| step (self, state, timestep, timestep_number) | |
| add_vertical_coordinate (self, state) | |
| add_conversions (self, state) | |
| build_init_state (self, init_state) | |
| forcing (self, state, timestep, timestep_number) | |
Public Attributes | |
| case = case | |
| grid = grid | |
| prognostic_variables = prognostic_variables | |
| cst = Cst() | |
| int | tkemin = 1e-6 |
| list | scalar_variables = [] |
| bool | budgets = False |
Static Public Attributes | |
| dict | OPTIONS_HELP = {} |
| tuple | BUDGET_VARIABLES = ('U', 'V', 'W', 'TH', 'TKE', 'RV', 'RC', 'RR', 'RI', 'RS', 'RG', 'RH') |
| dict | BUDGET_STATE_NAMES |
Protected Attributes | |
| _budget_keys = None | |
| _budget_active = list(self.BUDGET_VARIABLES) | |
Base class for 1D model physics schemes This class is not intended to be used directly. The first line of the docstring of the classes is used to describe them in the help message of phyex1d-exp_run.
Definition at line 19 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.__init__ | ( | self, | |
| dt, | |||
| method, | |||
| name, | |||
| tag, | |||
| case, | |||
| grid, | |||
| prognostic_variables ) |
Definition at line 40 of file physics_base.py.


| pyphyex.phyex1d.physics_base.PhysicsBase.add_conversions | ( | self, | |
| state ) |
Add derived variables to the state
Parameters
----------
state : dict
Current state
Definition at line 189 of file physics_base.py.

| pyphyex.phyex1d.physics_base.PhysicsBase.add_vertical_coordinate | ( | self, | |
| state ) |
Add vertical coordinate to the state
Parameters
----------
state : dict
Current state
Definition at line 173 of file physics_base.py.

| pyphyex.phyex1d.physics_base.PhysicsBase.budget_add | ( | self, | |
| state, | |||
| key, | |||
| value ) |
Add a contribution to a budget variable of the state :param state: state dictionary :param key: name of the budget variable (bu_<scheme>_<variable>_<process>) :param value: contribution (tendency)
Definition at line 62 of file physics_base.py.

| pyphyex.phyex1d.physics_base.PhysicsBase.budget_fields | ( | self, | |
| state ) |
Values of the budget variables
:param state: state dictionary
:return: None if budgets are not activated, a dictionary {budget variable: field} otherwise
Definition at line 74 of file physics_base.py.


| pyphyex.phyex1d.physics_base.PhysicsBase.budget_record | ( | self, | |
| state, | |||
| before, | |||
| scheme, | |||
| process, | |||
| variables, | |||
| timestep ) |
Record the contribution of an operation done on the state
:param state: state dictionary, after the operation
:param before: output of budget_fields called before the operation
:param scheme: name of the scheme (forc for forcings, driver for operations done by the
driver...)
:param process: name of the process
:param variables: list of the state variables modified by the operation
:param timestep: timestep (s)
Definition at line 87 of file physics_base.py.


| pyphyex.phyex1d.physics_base.PhysicsBase.build_init_state | ( | self, | |
| init_state ) |
Build the initial state
Parameters
----------
init_state : dict
Initial state dictionary to populate
Returns
-------
dict
Populated initial state
Reimplemented in pyphyex.phyex1d.phyex.PHYEX.
Definition at line 224 of file physics_base.py.


| pyphyex.phyex1d.physics_base.PhysicsBase.execute | ( | self, | |
| previous_state, | |||
| timestep, | |||
| timestep_number ) |
Advance the state by one timestep
Parameters
----------
previous_state : dict
Dictionary holding all the variables.
timestep : float
Timestep (s)
timestep_number : int
Current time step number
Returns
-------
dict
State after time integration
Definition at line 122 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.finalize | ( | self | ) |
Tear down the scheme. Override in subclasses.
Reimplemented in pyphyex.phyex1d.phyex.PHYEX.
Definition at line 119 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.forcing | ( | self, | |
| state, | |||
| timestep, | |||
| timestep_number ) |
Apply large-scale forcings to the state
Parameters
----------
state : dict
Dictionary holding all the variables.
timestep : float
Timestep (s)
timestep_number : int
Current time step number
Returns
-------
dict
Updated state after forcing
Definition at line 304 of file physics_base.py.

| pyphyex.phyex1d.physics_base.PhysicsBase.setup | ( | self, | |
| init_state, | |||
| duration ) |
Set up the scheme. Override in subclasses.
Reimplemented in pyphyex.phyex1d.phyex.PHYEX, and pyphyex.phyex1d.simple_physics.SimplePhysics.
Definition at line 116 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.step | ( | self, | |
| state, | |||
| timestep, | |||
| timestep_number ) |
Physics step. Override in subclasses. Returns the state unchanged by default.
Reimplemented in pyphyex.phyex1d.phyex.PhysicsArome, and pyphyex.phyex1d.simple_physics.SimplePhysics.
Definition at line 165 of file physics_base.py.
|
protected |
Definition at line 58 of file physics_base.py.
|
protected |
Definition at line 57 of file physics_base.py.
|
static |
Definition at line 36 of file physics_base.py.
|
static |
Definition at line 35 of file physics_base.py.
| bool pyphyex.phyex1d.physics_base.PhysicsBase.budgets = False |
Definition at line 56 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.case = case |
Definition at line 45 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.cst = Cst() |
Definition at line 48 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.grid = grid |
Definition at line 46 of file physics_base.py.
|
static |
Definition at line 31 of file physics_base.py.
| pyphyex.phyex1d.physics_base.PhysicsBase.prognostic_variables = prognostic_variables |
Definition at line 47 of file physics_base.py.
| list pyphyex.phyex1d.physics_base.PhysicsBase.scalar_variables = [] |
Definition at line 53 of file physics_base.py.
| int pyphyex.phyex1d.physics_base.PhysicsBase.tkemin = 1e-6 |
Definition at line 50 of file physics_base.py.