Skip to content

Commit

Permalink
use external sealevel generated in the sealevel-extraction.jl as input
Browse files Browse the repository at this point in the history
  • Loading branch information
xyl96 committed Oct 20, 2023
1 parent df6eac9 commit eba8bf5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/cap-extSL.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ~/~ begin <<docs/src/ca-with-production.md#examples/cap-extSL.jl>>[init]
using CarboKitten.CaProd
using DataFrames
using CSV
using Interpolations
#datasl = CSV.read("data/bs92-sealevel-curve.csv", DataFrame, header=1)

DEFAULT_INPUT = CaProd.Input(
sea_level = t -> CSV.read("data/all-sealevel/sl.csv", DataFrame, header=1)[!,1][round(Int,t*1000)+1],
subsidence_rate=50.0,
initial_depth=x -> x / 2.0,
grid_size=(50, 100),
phys_scale=1,
Δt=0.001,
write_interval=1,
time_steps=1000,
facies=[
CaProd.Facies((4, 10), (6, 10), 500.0, 0.8, 300),
CaProd.Facies((4, 10), (6, 10), 400.0, 0.1, 300),
CaProd.Facies((4, 10), (6, 10), 100.0, 0.005, 300)
],
insolation=2000.0
)

CaProd.main(DEFAULT_INPUT, "data/ca-extSL.h5")
# ~/~ end

1 comment on commit eba8bf5

@EmiliaJarochowska
Copy link
Member

Choose a reason for hiding this comment

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

I found out how to download data using OSF.jl, but it requires sharing a token. So this solution cannot be shared in a public GitHub repository, unless we leave the token to be provided by the user each time. The author of OSF.jl is helpful so I discuss with him if this can be expanded, but for now please use a solution for downloading that does not require sharing a token :-)

Please sign in to comment.