GLEON / rLakeAnalyzer

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

internal energy #111

Open aiayalaz opened 3 years ago

aiayalaz commented 3 years ago

I have checked how rLakeAnalyzer performed the internal energy calculation and there seems to be an error in the units. Internal energy = sum(volumedensitytemperature*Cpw)/Surface area Cpw is 4186 J kg-1 degK-1, then temperature should be in kelvin as well (in the function internal.energy.R wtr is in degC)

jordansread commented 3 years ago

Hmm...I haven't dug into the code, but thermal energy is calculated relative to a base temperature, which is arbitrary, as long as you use the same base temperature when comparing states. Often 0°C is used, 0K, or 20°C. Here we're using 0°C as the base. Do you see this difference impacting the calculations? If so, can you point out where/how to help us address it or further evaluate? Either way, including the base temperature in the docs for this function seems important/useful.