Skip to content

Commit

Permalink
model_calib passed
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Sep 24, 2024
1 parent ddeb4a8 commit 292186f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions scripts/calib_IGBP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ df = data[data.IGBP.==IGBP, :]
printstyled("[IGBP=$IGBP] \n", bold=true, color=:green, underline=true)

# @time theta, goal, flag = m_calib(df; IGBPcode, maxn=2500);
@time _theta, goal, flag = model_calib(df, par0; IGBPcode=df.IGBPcode[1], maxn=2500);

model_goal(df, _theta; verbose=true)

r = PMLV2_sites(df; par=theta2par(_theta))
r = cbind(df[:, [:site, :date, :ET_obs, :GPP_obs]], r)

Expand Down
9 changes: 9 additions & 0 deletions test/test-PMLV2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ end
@test GOF(df_out.ET_sim, r.ET).MAE <= 0.015
@test GOF(df_out.GPP_sim, r.GPP).MAE <= 1E-8
end


@testset "model_calib" begin
df.GPP_obs = df.GPPobs
df.ET_obs = df.ETobs
@time _theta, goal, flag = model_calib(df, par0; IGBPcode=df.IGBPcode[1], maxn=2500)
goal = model_goal(df, _theta; verbose=true)
@test goal > 0.55 # mean(KGE_GPP, KGE_ET)
end

0 comments on commit 292186f

Please sign in to comment.