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, | allocatable | :: | output_streams(:) |
The output files being written, one element per file. The configuration decides how many there are. |
||
| type(cable_output_variable_definition_t), | private, | allocatable | :: | registered_definitions(:) |
Registered output variable definitions. |
The directory part of path, including the final /, or nothing if there is none.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
The output variable for one use of a definition in the configuration.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_variable_config_t), | intent(in) | :: | variable_use | |||
| type(cable_output_variable_definition_t), | intent(in) | :: | definitions(:) |
An output file with the settings of a configured stream.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_stream_config_t), | intent(in) | :: | stream | |||
| character(len=*), | intent(in) | :: | grid_type | |||
| type(cable_output_variable_t), | intent(in) | :: | stream_variables(:) | |||
| character(len=*), | intent(in) | :: | file_name |
Creates an output file, defines its contents, and writes its coordinates.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_stream_t), | intent(inout) | :: | output_stream |
Works out which files the configuration produces and which variables go into each, without creating any files.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_config_t), | intent(in) | :: | config | |||
| type(cable_output_variable_definition_t), | intent(in) | :: | definitions(:) | |||
| character(len=*), | intent(in) | :: | grid_type |
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 |
Registers output variable definitions with the output module.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_variable_definition_t), | intent(in), | dimension(:) | :: | definitions |
The output variable definitions to register. |
Creates the output files described by the configuration, defines their contents and writes their coordinate variables.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(cable_output_config_t), | intent(in) | :: | config | |||
| character(len=*), | intent(in) | :: | grid_type | |||
| real, | intent(in) | :: | dels |
The current time step size in seconds. |