ewatercycle_DA.local_models.lorenz
Module Contents
- ewatercycle_DA.local_models.lorenz.rk4(state, dt, F)
- ewatercycle_DA.local_models.lorenz.f(state, F)
- class ewatercycle_DA.local_models.lorenz.LorenzBmi
Bases:
bmipy.BmiLorenz model wrapped in a BMI interface.
- initialize(config_file)
- update()
- update_until(t)
- finalize()
- get_var_type(var_name)
- get_var_units(var_name)
- get_var_rank(var_name)
- get_value(var_name, dest)
- get_value_at_indices(var_name: str, dest: numpy.ndarray, indices: int) numpy.ndarray
- set_value(var_name, src)
- set_value_at_indices(var_name, indices, src)
- get_component_name()
- get_input_var_names()
- get_output_var_names()
- get_grid_shape(grid_id, shape)
Number of rows and columns of uniform rectilinear grid.
- get_grid_spacing(grid_id, spacing)
- get_grid_origin(grid_id, origin)
Origin of uniform rectilinear grid.
- get_grid_type(var_name)
- get_var_itemsize(var_name: str) int
- get_var_nbytes(var_name: str) int
- get_var_grid(name: str) int
- get_grid_rank(grid: int) int
- get_grid_size(grid: int) int
- get_start_time()
- get_end_time()
- get_current_time()
“Weird switching but should now return in seconds since 1970
- get_time_units()
- get_time_step()
Model is in days so return seconds dt
- get_grid_x(grid: int, x: numpy.ndarray) numpy.ndarray
- get_grid_y(grid: int, y: numpy.ndarray) numpy.ndarray
- abstract get_input_item_count() int
- abstract get_output_item_count() int
- abstract get_var_location(name: str) str
- abstract get_grid_z(grid: int, z: numpy.ndarray) numpy.ndarray
- abstract get_grid_node_count(grid: int) int
- abstract get_grid_edge_count(grid: int) int
- abstract get_grid_face_count(grid: int) int
- abstract get_grid_edge_nodes(grid: int, edge_nodes: numpy.ndarray) numpy.ndarray
- abstract get_grid_face_edges(grid: int, face_edges: numpy.ndarray) numpy.ndarray
- abstract get_grid_face_nodes(grid: int, face_nodes: numpy.ndarray) numpy.ndarray
- abstract get_grid_nodes_per_face(grid: int, nodes_per_face: numpy.ndarray) numpy.ndarray
- get_value_ptr(var_name)
Reference to values.
- Parameters:
var_name (str) – Name of variable as CSDMS Standard Name.
- Returns:
Value array.
- Return type:
array_like
- ewatercycle_DA.local_models.lorenz.get_unixtime(dt64: numpy.datetime64) float
Get unix timestamp (seconds since 1 january 1970) from a np.datetime64.
- ewatercycle_DA.local_models.lorenz.read_config(config_file: str) dict
- class ewatercycle_DA.local_models.lorenz.LorenzForcing
Bases:
ewatercycle.base.forcing.DefaultForcingContainer for Lorenz forcing data.
Args:
Examples
From existing forcing data:
from ewatercycle.forcing import sources forcing = sources.LorenzForcing( directory='/home/davidhaasnoot/Code/Forcing/', start_time=0.0, end_time=20.0, F=8, dt=1e-3 )
- Inherited from base forcing:
shape: Path to a shape file. Used for spatial selection: can be None directory: Directory where forcing data files are stored. start_time: Start time of forcing in UTC and ISO format string e.g ‘YYYY-MM-DDTHH:MM:SSZ’. end_time: End time of forcing in UTC and ISO format string e.g. ‘YYYY-MM-DDTHH:MM:SSZ’.
- F: float = 8
- dt: float = 0.001
- ewatercycle_DA.local_models.lorenz.LORENZ_PARAMS = ['J']
- ewatercycle_DA.local_models.lorenz.LORENZ_STATES = ['start_state']
- class ewatercycle_DA.local_models.lorenz.LorenzLocalMethods
Bases:
ewatercycle.base.model.eWaterCycleModelThe eWatercycle HBV model.
- property parameters: collections.abc.ItemsView[str, Any]
List the (initial!) parameters for this model.
- Exposed Lorenz parameters:
J: dimension of model
- property states: collections.abc.ItemsView[str, Any]
List the (initial!) states for this model.
- Exposed Lorenz states:
startState: starting vector
- forcing: LorenzForcing
- parameter_set: None
- finalize() None
Perform tear-down tasks for the model.
After finalization, the model should not be used anymore.
ADDED: Remove created config files, especially useful for DA models
- class ewatercycle_DA.local_models.lorenz.LorenzLocal
Bases:
ewatercycle.base.model.LocalModel,LorenzLocalMethodsThe Lorenz eWaterCycle model, with the Container Registry docker image.
- bmi_class: Type[bmipy.Bmi]