Skip to content

Commit

Permalink
Chloride-only formatting and example notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamedwards committed Jun 11, 2024
1 parent 8c1816e commit 02eed70
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ After installing, just type `using CorePore` to use.

## Usage

The primary functionality of this package is hosted in the function `porewatermetropolis`. Please read the documentation for its full functionality and the underlying forward models. The example below will give you a quick start:
The primary functionality of this package is hosted in the function `porewatermetropolis`. Please read the documentation for its full functionality and the underlying forward models. The example below (also available as notebook `example.ipynb`) will give you a quick start:

```julia
using CorePore
Expand Down
57 changes: 57 additions & 0 deletions example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"using CorePore"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Proposal(20.0, 1.0e-5, 0.0001, 0.1, 0.1, 10.0, 10.0, 1.0)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"p = Proposal(5320., 1e-4,1e-3,3.5, 4.2, 1000, deepbonney()...)\n",
"jumpsize = Proposal(20., .1e-4, .1e-3, .1, .1,10, 10, 1.)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"chains = porewatermetropolis(p, jumpsize, andrill2a(); burnin=100, chainsteps=100, k=Constants(), seawater=mcmurdosound(), climate=LR04(), onlychloride=true)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.10.4",
"language": "julia",
"name": "julia-1.10"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
4 changes: 3 additions & 1 deletion src/metropolis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ function porewatermetropolis(p::Proposal, jumpsigma::Proposal, prior::CoreData;
end
end
explore = explore_
@warn "Chloride-only mode (onlychloride=true): MCMC will not explore :basalO (= $(p.basalO))"
printstyled("Chloride-only mode (onlychloride=true): ", bold=true,color=:cyan)
println(" MCMC will not explore :basalO (= $(p.basalO))\n\n")
flush(stdout)
chlorporewaterhistory!
else
porewaterhistory!
Expand Down

0 comments on commit 02eed70

Please sign in to comment.