findAlk: function to minimize to determine the amount of acid to add...

View source: R/findAlk.R

findAlkR Documentation

function to minimize to determine the amount of acid to add for target alk and dic

Description

used as input function for optimize() in addAcid()

Usage

findAlk(acid, targetAlk, initAlk, initDIC, pCO2, acidConc, targetS, targetT)

Arguments

acid

volume of acid added (L); this is the optimization parameter

targetAlk

target alkalinity (mol/kg)

initAlk

intial alkalinity (mol/kg)

initDIC

intial DIC (mol/kg)

pCO2

atmospheric pCO2 (uatm)

acidConc

acid concentration (N)

targetS

target salinity (psu)

targetT

target temperature (degrees C)

Value

squared difference between target alkalinty and alkalinity with particular input parameters


pmcelhany/aws documentation built on Jan. 10, 2023, 8:56 p.m.