Skip to content

Latest commit

 

History

History
157 lines (114 loc) · 3.39 KB

codeDocumentation.rst

File metadata and controls

157 lines (114 loc) · 3.39 KB

GLOFRIM API

Initialization

Before a coupled model can be run, the individual model have to be initialized and all exchanges between them must be defined.

glofrim

glofrim

Glofrim.initialize_config Glofrim.initialize_model Glofrim.initialize Glofrim.set_exchanges

Execution

GLOFRIM provides a range of functions to retrieve and change time information, update models, as well as exchange content between models during execution. These exchange functions are used inside the update function to exchange variables according to the setting in the exhanges section of the GLOFRIM ini file.

glofrim

glofrim

Glofrim.get_current_time Glofrim.update Glofrim.update_until Glofrim.exchange Glofrim.exchange_same_grid Glofrim.exchange_at_indices

Variable Getter and Setter Functions

Functions to retrieve and overwrite values for either entire grid or only certain indices.

glofrim

glofrim

Glofrim.get_value Glofrim.get_value_at_indices Glofrim.set_value Glofrim.set_value_at_indices

Finalization

It is possible to change model end times and finalize model states after execution.

glofrim

glofrim

Glofrim.finalize

Auxiliary functions

In addition, there are several auxiliary functions built in GLOFRIM to check states and properties of models as well as their components, variables, and attributs.

Model Information Functions

General information about model structure and variables.

glofrim

glofrim

Glofrim.get_model_type Glofrim.get_component_name Glofrim.get_input_var_names Glofrim.get_output_var_names

Variable Information Functions

Providing information about properties of model variables.

glofrim

glofrim

Glofrim.get_var_type Glofrim.get_var_units Glofrim.get_var_rank Glofrim.get_var_size Glofrim.get_var_shape Glofrim.get_var_nbytes Glofrim.get_time_units

Grid Information Functions

Information about model grid.

glofrim

glofrim

Glofrim.get_grid_type

Attribute/ Config Information Functions

Functions providing insights in settings of model configuration files. Note that the set functions can only be used before model initialization.

glofrim

glofrim

Glofrim.set_out_dir Glofrim.get_time_step Glofrim.set_start_time Glofrim.get_start_time Glofrim.get_end_time Glofrim.set_end_time Glofrim.get_attribute_names Glofrim.get_attribute_value Glofrim.set_attribute_value