cable_output_impl_smod Submodule

Implementation of the public interface procedures in cable_output_mod.



Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: normalised_averaging = .true.

This flag forces time averaging to computed by summing the diagnostics at each accumulation step and then dividing by the number of samples at write time, rather than computing the average incrementally. This is required to demonstrate bitwise reproducibility with the previous output module.

type(cable_output_stream_t), private :: global_output_stream

Global output stream instance for the main cable output file.

type(cable_output_variable_t), private, allocatable :: registered_output_variables(:)

Registered output variables.


Module Subroutines

module subroutine cable_output_impl_init()

Module initialisation procedure for cable_output_mod.

Read more…

Arguments

None

module subroutine cable_output_impl_end()

Module finalization procedure for cable_output_mod.

Read more…

Arguments

None

module subroutine cable_output_impl_register_output_variables(output_variables)

Registers output variables with the output module. Note that registering an output variable does not necessarily mean that the variable will be written to an output stream - this can depend on whether the output variable is active, or if it is a restart variable. Output variables should be registered if their associated diagnostic working variables are initialised in the model as this can help provide the information on the diagnostics which are available.

Arguments

Type IntentOptional Attributes Name
type(cable_output_variable_t), intent(in), dimension(:) :: output_variables

An array of output variable definitions to be registered.

module subroutine cable_output_impl_init_streams(dels)

Initialise output streams based on the current output configuration.

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: dels

The current time step size in seconds.

module subroutine cable_output_impl_update(time_index, dels, met)

Updates the time aggregation accumulation for any output variables that are active in an output stream with an accumulation frequency that matches the current time step.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: time_index

The current time step index in the simulation.

real, intent(in) :: dels

The current time step size in seconds.

type(met_type), intent(in) :: met

Met variables at the current time step to provide informative error messages for CABLE range checks.

module subroutine cable_output_impl_write(time_index, dels, met, patch, landpt)

Writes output variables to disk for any output streams with a sampling frequency that matches the current time step.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: time_index

The current time step index in the simulation.

real, intent(in) :: dels

The current time step size in seconds.

type(met_type), intent(in) :: met

Met variables at the current time step to provide informative error messages for CABLE range checks.

type(patch_type), intent(in) :: patch(:)

The patch type instance for performing grid reductions over the patch dimension if required.

type(land_type), intent(in) :: landpt(:)

The land type instance for performing grid reductions over the patch dimension if required.

module subroutine cable_output_impl_write_parameters(time_index, patch, landpt)

Writes non-time varying parameter output variables to disk. This is done on the first time step of the simulation after the output streams have been initialised.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: time_index

The current time step index in the simulation.

type(patch_type), intent(in) :: patch(:)

The patch type instance for performing grid reductions over the patch dimension if required.

type(land_type), intent(in) :: landpt(:)

The land type instance for performing grid reductions over the patch dimension if required.

module subroutine cable_output_impl_write_restart(current_time)

Writes variables to the CABLE restart file. This is done at the end of the simulation.

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: current_time

Current simulation time