3 use fruit
, only : assert_equals, assert_not_equals, assert_true
18 subroutine add_component(component_descriptions, single_description)
19 type(
list_type),
intent(inout) :: component_descriptions
22 class(*),
pointer :: raw_data
23 allocate(raw_data, source=single_description)
24 call c_add(component_descriptions, raw_data)
35 call assert_equals(2.0e-3,z0,
"Test z0 has been read properly")
42 type(
map_type) :: registered_components
45 call assert_equals(0,
c_size(registered_components),
"Test there are not components in the registry")
51 call assert_equals(1,
c_size(registered_components),
"Test there is only 1 component in the registry")
60 use fruit
, only : init_fruit, run_test_case, fruit_summary
66 call run_test_case(
test_load_model,
"Test loading the configuration model to options_database")
Retrieves the key currently being held at a specific index in the map or "" if the index > map elemen...
character(len=string_length) function, public options_get_string(options_database, key, index)
Retrieves a string value from the database that matches the provided key.
type(map_type) function, public get_all_registered_components()
Returns a brief summary of all registered components.
Pressure solver which uses a tridiagonal algorithm operating on the pressure terms in Fourier space...
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Contains common definitions for the data and datatypes used by MONC.
The ModelState which represents the current state of a run.
Description of a component.
subroutine load_model_configuration(state, options_database)
Loads the configuration into the options database, either from a file or checkpoint.
Main core entry point to the rest of the model, this is called by the program main.
subroutine test_fill_registry_components
Map data structure that holds string (length 20 maximum) key value pairs.
Returns the number of elements in the collection.
subroutine display_registed_components()
Displays the registered components and their version numbers.
Interfaces and types that MONC components must specify.
Collection data structures.
subroutine add_component(component_descriptions, single_description)
Called by each component to add itself to the registration list_type.
List data structure which implements a doubly linked list. This list will preserve its order...
real(kind=default_precision) function, public options_get_real(options_database, key, index)
Retrieves a real value from the database that matches the provided key.
Manages the options database. Contains administration functions and deduce runtime options from the c...
type(component_descriptor_type) function, public fftsolver_get_descriptor()
Descriptor of this component for registration.
subroutine fill_registry_with_components(options_database, component_descriptions)
Registers each supplied component description.
The model state which represents the current state of a run.
subroutine, public init_registry(options_database)
Initialises the registry with the provided configuration file.
subroutine test_load_model