native_to_netcdf_dimensions Function

function native_to_netcdf_dimensions(native_dimension, grid_type, reduction_method) result(netcdf_dimensions)

Returns the netCDF dimension(s) corresponding to a given output variable dimension, taking into account the output grid type and reduction method. This function is used to determine the dimensions of netCDF variables based on the in-memory data shapes of CABLE variables as described by cable_output_dim_t instances.

Arguments

Type IntentOptional Attributes Name
type(cable_output_dim_t), intent(in) :: native_dimension

The in-memory dimension.

character(len=*), intent(in) :: grid_type

The output grid type. See allowed_grid_types for the available grid types.

character(len=*), intent(in) :: reduction_method

The reduction method applied to the variable. See allowed_reduction_methods for the available reduction methods.

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