cable_output_define_smod Submodule

Implementation of procedures for defining netCDF files for CABLE output streams.



Functions

function netcdf_var_type(output_variable, use_native_type)

Infers the appropriate netCDF variable type for a given output variable.

Arguments

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

The output variable for which to infer the netCDF variable type.

logical, intent(in), optional :: use_native_type

Whether to use the native variable type of the output variable. Set to .false. by default.

Return Value integer

function infer_netcdf_dimensions(output_stream, output_variable, time_axis) result(netcdf_dimensions)

Infers the appropriate netCDF dimensions for a given output variable based on its data shape and the grid type of the output stream.

Arguments

Type IntentOptional Attributes Name
type(cable_output_stream_t), intent(in) :: output_stream

The output stream for which to infer the netCDF dimensions.

type(cable_output_variable_t), intent(in) :: output_variable

The output variable for which to infer the netCDF dimensions.

logical, intent(in), optional :: time_axis

Whether to include the time axis as a dimension. By default, the time axis will not be included.

Return Value type(cable_output_dim_t), allocatable, (:)


Subroutines

subroutine set_global_attributes(output_stream)

Sets the global attributes for a given output stream.

Arguments

Type IntentOptional Attributes Name
type(cable_output_stream_t), intent(inout) :: output_stream

The output stream for which to set the global attributes.


Module Subroutines

module subroutine cable_output_define_stream(output_stream, restart)

Defines all variables, dimensions and attributes for a given output stream.

Arguments

Type IntentOptional Attributes Name
type(cable_output_stream_t), intent(inout) :: output_stream

The output stream to define.

logical, intent(in), optional :: restart

Whether this is a restart stream definition.