Salinity Calcluations

Rob Mason robmason38 at
Wed Apr 10 06:16:31 PDT 2019

*[Apologies Dirk for spamming you earlier!]*

I'm working my way through the Buhlmann model with a view to extending the
planning functionality of SubSurface (purely self-interest in deco theory).
I'm trying to understand the salinity variance, which I think comes from
Schreiner extensions to the Buhlmann model? In core/dive.c water pressure
calculations, what does the value 0.981 represent?

*Dirk *- you answered (thanks) - "*that's gravity. We need the weight, not
the mass.*".  To confirm, this is using kN???  i.e. the standard specific
weight of water? I wanted to be absolutely sure.

/* Pa = N/m^2 - so we determine the weight (in N) of the mass of 10m
 * of water (and use standard salt water at 1.03kg per liter if we don't
know salinity)
 * and add that to the surface pressure (or to 1013 if that's unknown) */
int calculate_depth_to_mbar(int depth, pressure_t surface_pressure, int
double specific_weight;
int mbar = surface_pressure.mbar;

if (!mbar)
if (!salinity)
if (salinity < 500)
specific_weight = salinity / 10000.0 * 0.981;
mbar += lrint(depth / 10.0 * specific_weight);
return mbar;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the subsurface mailing list