Project Open RaDOM

 Open-source code for Radium Derived Ocean Modeling (Project Open RaDOM)


About Project RaDOM

Nick Barnes argues that the best way to move scientific modeling forward is to share our code!  Through this project I hope to (1) increase the accessibility of submarine groundwater discharge (SGD) scientists to more refined/less problematic radium-based modeling, (2) encourage other scientists to build upon, alter, and improve my SGD models, (3) increase the accessibility of R to SGD scientists.  You do not need to know R to use these models, just read the instructions below!

For each version of code there is a linked R script that can be downloaded, altered, and run locally or a link to an RStudio Online workspace you can run remotely in any browser (although Crome is best).  To use the online workspace all you need in an email to set up a free RStudio Online account.  The scripts are fully described in the paper Open-Source Code of Radium-Derived Ocean-Groundwater Modeling: Project Open RaDOM.



Box Models

These box models are based off of the method described in Lecher, 2022 to calculate the flux of water sources to a coastal area using radium isotopes.  They require a minimum of 2 Ra isotopes, but can utilize 3 Ra isotopes for an over-constrained model to increase accuracy.  The models can solve for 1 source (e.g. just groundwater), 2 sources (e.g. groundwater and river water), or 3 sources (e.g. 2 different groundwaters and river water OR groundwater, river water, and deep water as described in Lecher et al, 2016).  The sink terms are (1) radioactive decay and advection offshore.  Note: this advection term is solved by the model using a best-fit method, not using isotope ratios as utilized in some other Ra-based flux models.  

This script uses the  Lawson-Hanson algorithm for non-negative least squares to solve for the contribution of sources and the nnls packge must be downloaded first by typing "install.packages("nnls")" into
the console first.  You only need to install the package once.  Using the Lawson-Hanson method prevents the creation of non-real products (like a negative residence time).  

The script will print (1) the flux of the sources in m^3/day, (2) the residence time in days, and (3) the residuals, which can be used to assess fit.  Further instructions and details are give in the scripts themselves.  One model with example data is provided.

Model Scripts Available                                                

1 Source, 2 Ra Tracers with Example Data
1 Source, 2 Ra Tracers
1 Source, 3 Ra Tracers
2 Source, 3 Ra Tracers

See Lecher et al., 2016 and Lecher et al, 2015 for examples of execution of this model.  

Mixing Models

These mixing models are based off of the method described in Lecher et al, 2022 to calculate the relative contributions of different source waters to a given set of locations.  The equations are originally based on Moore, 2003, but solved differently.  This script uses the  Lawson-Hanson algorithm for non-negative least squares to solve for the contribution of sources and the nnls packge must be downloaded first by typing "install.packages("nnls")" into the console first.  You only need to install the package once.  This allows for models to be over-constrained, e.g. 4 tracers to determine 3 sources to increase the accuracy of the model.  The model works best with the long-lived Ra isotopes Ra-228 and Ra-226 as described in Moore, 2003, but can be utilized with shorter lived Ra isotopes when other tracers such as Si or Cl are used to better constrain the model. 

The script will (1) print the fraction contribution to each of the locations, (3) print the residuals of each location to describe the fit of the model, and (3) create a stacked bar chart of the fraction contributions at each location.  Further instructions and details are give in the scripts themselves.

Model Scripts Available

2 Source, 2 Tracers
2 Source, 3 Tracers
3 Sources, 3 Tracers
3 Sources, 4 Tracers

See Lecher et al., 2016 for an example of execution of this model.


I Have No Idea How to Use R!

These scripts are designed to be able to be used by scientists who have no experience with R.  While the license allows for adaptation and modification of the scripts, they are at the simplest "plug and chug" models.  Follow these instructions on how to edit and run a Project Open RaDOM model.

References

Lecher, A., (2022) Open-source code for radium-derived ocean-groundwater modeling: project open RaDOM, Hydrology, 9(6).

Lecher, A., Fisher., A., Paytan., A., (2016) Submarine groundwater discharge in Northern Monterey Bay,California: Evaluation by mixing and mass balance models, Marine Chemistry.

Lecher, A. Kessler, J., Sparrow, K., Garcia-Tigeros, F., Dimova, N., Murray, J., Tulaczyk, S., Paytan, A., (2015) Methane Transport through submarine groundwater discharge to the North Pacific and Arctic Ocean at two Alaskan sites, Limnology and Oceanography, Methane Special Issue.

Moore, W. S. (2003). Sources and fluxes of submarine groundwater discharge delineated by radium isotopes. Biogeochemistry, 66(1), 75-93.

License

Copyright 2022 Alanna L Lecher, PhD

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OFOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.