infer_netcdf_dimensions Function

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, (:)