microprofiling:calfluxrate_howto

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.

are written here.

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).

**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).

- 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**. - 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 http://pages.cs.wisc.edu/~ghost/, 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**.

- To interpret the results, you can use some advice from this brief theory.

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

Download the program from the Download center.

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

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported