MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
235 stars 312 forks source link

Get the size of the largest field in a stream before writing #1128

Closed dimomatt closed 7 months ago

dimomatt commented 9 months ago

Different types of output file allow for different sizes of output variables. This commit checks the size of all of the fields within a stream in preparation for selecting file type with SMIOL in a future commit. A new function is added to mpas_stream_manager.F to call mpas_field_list_get_largest_field_size on all field lists for a given stream and all of its substreams.

mpas_field_list_get_largest_field_size returns an integer(kind=I8KIND) value of the size in bytes of the largest array associated with each field in a given field list. This function sums the sizes of the arrays on each MPI task before returning the value.