NEONScience / NEON-dissolved-gas

Repository for a code package that calculates dissolved gas concentrations from air and equilibrated water data, from NEON's Dissolved gases in surface water (DP1.20097.001) data product.
GNU Affero General Public License v3.0
4 stars 8 forks source link

Fixed def.calc.sdg.R code to handle concentrationGasAir = NA #14

Closed jbeaulie closed 6 years ago

jbeaulie commented 6 years ago

Fixed def.calc.sdg.R code to handle instances where NAs are provided for concentrationGasAir. NAs are replaced with global average values which must be assigned to 'sourceGas', rather than 'airGas'. sourceGas is subsequently called in the dissolvedGas function. This change breaks the satGas function, but this function was already unable to handle instances of concentrationGasAir = 0 (i.e. He/N2 source gas). satGas function currently commented out, should migrate to standalone function.