User Tools

Site Tools



A standalone application for rapid calculation of depth profiles of fluxes and conversion rates from multiple concentration profiles, based on a diffusion-reaction model. The user can set and fine-tune calculation parameters either through a text-based or graphical user interface.

Installation instructions

are written here.

Input data format

The data files with the profiles must have the following format:

column 1 column 2 column 3
depth concentration standard deviation of concentration

Data files in such format are produced by mprplotter/getdSdz.sci.


The algorithm employed by calfluxrate to calculate the fluxes and rates is as follows:

  • At a given depth, N data points around this depth are fitted with a polynomial with the order k, which is varied between k-min and k-max.
  • If the fit by the polynomial of order k+1 results in a significantly better fit than that by the polynomial of order k, then the fluxes and rates are calculated from the fit by the (k+1)–order polynomial. Otherwise the k-order polynomial is used.
  • The significance level of the test can be set by the user. The closer to 0 it is, the more likely will the higher order polynomial be used to fit the data points, and thus the more likely will the calculated rate be non-zero. Vice versa, the closer to 1 the significance level is, the more likely will the lower order polynomial be used to fit the data points, and thus the more likely will the calculated rate be zero (of course, only if line, i.e., a polynomial of order 1, is also included in the fit).

Calculating fluxes and rates with calfluxrate (using TEXT based interface)

  1. Edit the calfluxrate.ini file to set and fine-tune input/output/calculation parameters for calfluxrate.exe, and save it under a filename of your choice, e.g., o2profs2-light.ini. Proceed according to the comments available in the *.ini file.
    • Enter full paths to the input data files. Use one entry file=PATH\filename.dat per line. Do NOT use spaces in the filenames or directory names!!!
    • Enter a full path to the file where the graphical output (EPS) will be stored. Again, do not use spaces.
    • Define diffusion coefficient in the sediment.
    • Define a depth interval dz over which the final calculated rates will be averaged. The layers of thickness dz start from the sediment surface (i.e., z=0), not from the beginning of the profile.
    • Set number_of_points_to_fit to N, i.e., the number of data points to be fitted at each depth (see algorithm above).
    • Set min_polynomial_order to k-min and max_polynomial_order to k-max (see algorithm above for their meaning).
    • Set stat_significance_level to a number between 0.05 and 0.95 (see algorithm above for its meaning).
    • Set plot_flag to 1 if you want to see the calculation progress (recommended) or to 0 if you don’t.
    • Set fit_delay to a time interval in seconds. This delay will be made after every fit. The higher the delay, the slower the fitting progresses, and thus the more time you will have to observe it. (fit_delay=0.001 gives a very fast fitting, fit_delay=0.5 gives a rather slow fitting).
  2. Edit the calfluxrate.bat file, changing the ini file argument after calfluxrate.exe to the filename you chose in step 1, e.g., o2profs2-light.ini.
  3. Run the calfluxrate.bat program by double-clicking on it or by typing calfluxrate.bat in a command prompt (cmd) window. This will open a window where you can observe the progress of the calculation. When the calculation is finished for all profiles, the results are displayed on the screen and stored in the same directory as the input files as follows:
    • The graphical output is stored in the EPS file specified in the ini file, e.g., o2profs2-light-p2+5.eps (use Ghostscript + Ghostview, a freeware available at, to view this file);
    • The profiles of concentrations, fluxes and rates are saved in the *-cfr.dat files, separately for each profile, with column 1 = depth, column 2 = concentration, column 3 = flux, column 4 = rate.
    • The rates averaged over the depth interval dz_avg, together with the standard deviations, are stored in the *-rdr.dat file, separately for each profile, with column 1 = depth, column 2 = average rate, column 3 = std rate.
  4. The results can be plotted in a third-party software such as Origin or SigmaPlot, as shown below.
  5. To interpret the results, you can use some advice from this brief theory.

Calculating fluxes and rates with calfluxrate (using GRAPHICAL user interface)

  1. Double click on calfluxrate_gui.exe.
  2. Define all calculation parameters in the GUI (see above for the explanation of what they mean).
  3. Click on Define input files and select as many input files as you wish.
  4. Click on Define output file and select the output filename.
  5. Specify whether you want your final graphical output in the EPS or PNG format.
  6. Click on Fit to start fitting.
  7. To finish, close all the graphs and the main GUI window.

Download CalFluxRate

Download the program from the Download center.

microprofiling/calfluxrate_howto.txt · Last modified: 2013/09/10 12:35 by lpolerec

Page Tools