GLEON / rLakeAnalyzer

An R version of Lake Analyzer
43 stars 26 forks source link

Saline lake stratification #105

Open RichardLaBrie opened 3 years ago

RichardLaBrie commented 3 years ago

Hi I need to calculate the depth of each strata in my lakes. It works well for the majority of them, but I have few saline lakes in my dataset and the density gradient is driven by salinity instead of temperature (in attachment). For example in this lake, meta.depths gives me a metalimnion between 9.35 and 12.28 meters. This lake becomes hypoxic at 8 meters.

Is there a way to calculate it with density instead of temperature?

image

lawinslow commented 3 years ago

Currently isn't supported. But salinity is an option in the water.density function, https://github.com/GLEON/rLakeAnalyzer/blob/6680db3a715c158b66fc993f3fba131cb43377a5/R/water.density.R#L23

so you could update the layer functions to pass salinity through to the density calculation if you wanted to.

boshek commented 3 years ago

I've had some success with the split and merge algorithm for salinity gradients. You can at least try using it and see how well it does. It is susceptible to lower depth resolutions but worth a shot. I outlined its usage here:

https://cran.r-project.org/web/packages/rLakeAnalyzer/vignettes/sm_algorithm.html