Skip to content

Commit

Permalink
Test C-filling property of new carbonateconversion!
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller committed Mar 28, 2024
1 parent e753969 commit 4995fef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
@@ -1,7 +1,7 @@
name = "StatGeochem"
uuid = "df4de05a-b714-11e8-3c2a-c30fb13e804c"
authors = ["C. Brenhin Keller <cbkeller@dartmouth.edu>"]
version = "0.7.6"
version = "0.7.7"

[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Expand Down
9 changes: 9 additions & 0 deletions test/testGeochemistry.jl
Expand Up @@ -49,6 +49,15 @@
@test all(C["TIC"] .≈ 0.9616817911685506*molarmass["C"]/(molarmass["C"] + 2molarmass["O"]))
@test all(C["TOC"] .≈ 1 - 0.9616817911685506*molarmass["C"]/(molarmass["C"] + 2molarmass["O"]))

D = ["CaCO3" "MgCO3" "CaO" "MgO" "CO2" "TOC" "TIC" "TC" "C"; 1 1 NaN NaN NaN NaN NaN NaN NaN; 1 1 NaN NaN NaN NaN NaN NaN NaN]
C = elementify(D, importas=:Dict)
carbonateconversion!(C)
@test all(C["MgO"] .≈ (molarmass["Mg"]+molarmass["O"])/(molarmass["Mg"]+molarmass["C"]+3molarmass["O"]))
@test all(C["CaO"] .≈ (molarmass["Ca"]+molarmass["O"])/(molarmass["Ca"]+molarmass["C"]+3molarmass["O"]))
@test all(C["CO2"] .≈ (molarmass["C"]+2molarmass["O"])/(molarmass["Ca"]+molarmass["C"]+3molarmass["O"]) + (molarmass["C"]+2molarmass["O"])/(molarmass["Mg"]+molarmass["C"]+3molarmass["O"]))
@test all(C["TIC"] .≈ 0.9616817911685506*molarmass["C"]/(molarmass["C"] + 2molarmass["O"]))
@test all(C["C"] .≈ 1e4*0.9616817911685506*molarmass["C"]/(molarmass["C"] + 2molarmass["O"]))

# Weathering indices
@test CIA(14.8577, 4.5611, 3.29641, 2.3992) 47.66582778067264
@test WIP(3.2964, 4.5611, 2.3992, 5.9121) 78.40320264846837
Expand Down

4 comments on commit 4995fef

@brenhinkeller
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/103878

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.7 -m "<description of version>" 4995fef3a7e4968dddf5e86cbf523b85ad5776a4
git push origin v0.7.7

@brenhinkeller
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register
Release notes:

  • Also fill C in carbonateconversion!, and tests thereof

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/103878

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.7 -m "<description of version>" 4995fef3a7e4968dddf5e86cbf523b85ad5776a4
git push origin v0.7.7

Please sign in to comment.