Implementation of the public interface procedures in cable_output_mod.
| 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. |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_variable_t), | intent(in), | dimension(:) | :: | output_variables |
An array of output variable definitions to be registered. |
Initialise output streams based on the current output configuration.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | dels |
The current time step size in seconds. |
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.
| Type | Intent | Optional | 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. |
Writes output variables to disk for any output streams with a sampling frequency that matches the current time step.
| Type | Intent | Optional | 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. |
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.
| Type | Intent | Optional | 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. |
Writes variables to the CABLE restart file. This is done at the end of the simulation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | current_time |
Current simulation time |