Open RichardLaBrie opened 3 years ago
There have been different equations of state over the years, so there's a chance the oce
package uses a slightly different version than rLakeAnalyzer. The equations used by water.density
are in the function, so it's very easy to see how it's calculated. The ones in oce
are more buried, so you'd have to dig into that package to compare. I'm not sure about the pressure issue.
Hi I need to convert temperature and salinity data into density. I tried with your package and the OCE package. I have approximately the same result in both cases when I put the pressure term in the OCE package to 0.
Here's a speudo replicable example (would work with any Temp, Sal, Pressure matrix) density_oce = swRho(salinity = data$Salinity_PSU, temperature = data$Temperature_C, pressure = data$Sea_Pressure_dbar) density_oce_0 = swRho(salinity = data$Salinity_PSU, temperature = data$Temperature_C, pressure = 0) density_lake = water.density(data$Temperature_C, sal = data$Salinity_PSU) LakeDensity.pdf
There is also a small difference (about 0.02) between Lake Analyzer density and OCE density (without pressure) that I can't explain. Do you have any idea why? DensityDifference.pdf
Thanks!