This PR introduces two functions to src/framework/mpas_stream_manager.F to help compute the max byte size given a field pool from an output stream. This information can be used to decide whether to use CDF2 or CDF5 as the output file format. See https://github.com/MPAS-Dev/MPAS-Model/pull/1219
function stream_max_var_size accepts a field pool and iterates through each field calling global_dim_size to obtain the dimension size of the current field over the entire domain, then computes the number of bytes occupied and the max bytes size over all the fields in the pool
function global_dim_size iterates over all the dimensions in a given field to compute the overall field size, obtaining the global dimension size if the dimension is decomposed. If isVarArray=.true., it skips over the left-most dim, which tracks the size of the variable list, and is not present in the output file.
This PR introduces two functions to
src/framework/mpas_stream_manager.F
to help compute the max byte size given a field pool from an output stream. This information can be used to decide whether to use CDF2 or CDF5 as the output file format. See https://github.com/MPAS-Dev/MPAS-Model/pull/1219function
stream_max_var_size
accepts a field pool and iterates through each field callingglobal_dim_size
to obtain the dimension size of the current field over the entire domain, then computes the number of bytes occupied and the max bytes size over all the fields in the poolfunction
global_dim_size
iterates over all the dimensions in a given field to compute the overall field size, obtaining the global dimension size if the dimension is decomposed. IfisVarArray=.true.
, it skips over the left-most dim, which tracks the size of the variable list, and is not present in the output file.