Skip to content

Commit

Permalink
Merge pull request #26 from fund-model/add-acch4_0-param
Browse files Browse the repository at this point in the history
Add acch4_0 parameter
  • Loading branch information
davidanthoff authored Aug 24, 2019
2 parents b33d885 + 2f20488 commit 9d54bf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ClimateCH4CycleComponent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
# CH4 pre industrial
ch4pre = Parameter(default = 790.0)

# Initial acch4 value
acch4_0 = Parameter(default = 1222.0)

function run_timestep(p, v, d, t)

if is_first(t)
v.ch4decay = 1.0 / p.lifech4

v.acch4[1] = 1222.0
v.acch4[1] = p.acch4_0
else
# Calculate CH4 concentrations
v.acch4[t] = v.acch4[t - 1] + 0.3597 * p.globch4[t] - v.ch4decay * (v.acch4[t - 1] - p.ch4pre)
Expand Down

0 comments on commit 9d54bf6

Please sign in to comment.