The function histograms() creates histograms of the output fields. The number of bins used is set in parameters.h. These bins are equally spaced between the minimum and maximum field values for the histogram. These values can be set to a fixed value using the variables histogram_min and histogram_max in parameters.h. This option can be useful, for example, for generating output that is easy to compare from one time to the next. If these two values are set equal to each other, however, then histograms() calculates the appropriate range for each field by finding the minimum and maximum value of the field on the grid at each time.
The output is simply the fraction of gridpoints for each bin for which the field is in the appropriate range.
The output is in the following files. The file histogramtimes_ext contains a column with the times at which histograms were recorded plus two additional columns for each field. These columns record the minimum field value for that field and the spacing (in units of field values) between successive bins. These may thus be used to label the field values in each bin of a given histogram. These are the quantities that are rescaled if the model file sets a rescaling for all the output. See section 5.10. The histograms themselves, i.e. the counts for each bin, are in the files histogramfield_number_ext. These files contain the bin frequencies in a single column. Histograms at different times are separated by blank lines. If you are reading the data into a program for plotting and you don't remember how many bins were used in each histogram you can recover this either by looking at how many lines occur between each blank line or by dividing the total number of lines in the histogram files by the number of times in the histogramtimes file.