From 69deb25624b870ab1960da6218b804aa7f721f21 Mon Sep 17 00:00:00 2001 From: Benoit Pasquier Date: Wed, 30 Aug 2023 12:43:43 +1000 Subject: [PATCH] Fix AIBECS function name (F instead of fun) --- Project.toml | 2 +- src/Nd_model/model_setup.jl | 4 ++-- src/Nd_model/parameter_sensitivity_test.jl | 4 ++-- src/Nd_model/single_run.jl | 4 ++-- src/Nd_model/single_run_PWtest.jl | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Project.toml b/Project.toml index 3a8a941..d28278c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GNOM" authors = ["Benoit Pasquier "] -version = "2.0.1" +version = "2.0.2" [deps] AIBECS = "ace601d6-714c-11e9-04e5-89b7fad23838" diff --git a/src/Nd_model/model_setup.jl b/src/Nd_model/model_setup.jl index eab9b53..2cbf220 100644 --- a/src/Nd_model/model_setup.jl +++ b/src/Nd_model/model_setup.jl @@ -439,9 +439,9 @@ p = Params() x = ustrip.(mol/m^3, 10pM) * ones(nb) x = [x; x] # state function and its Jacobian -fun = AIBECSFunction(T_D, Gs, nb, Params) +F = AIBECSFunction(T_D, Gs, nb, Params) # problem -prob = SteadyStateProblem(fun, x, p) +prob = SteadyStateProblem(F, x, p) resetup = false # flag for plotting to avoid resetting everything up diff --git a/src/Nd_model/parameter_sensitivity_test.jl b/src/Nd_model/parameter_sensitivity_test.jl index 46dfbbc..68a1dba 100644 --- a/src/Nd_model/parameter_sensitivity_test.jl +++ b/src/Nd_model/parameter_sensitivity_test.jl @@ -3,7 +3,7 @@ # This lines sets up the model (and `F`) only once, # so that you rerunning this file will not repeat the entire model setup -!isdefined(Main, :fun) && include("model_setup.jl") +!isdefined(Main, :F) && include("model_setup.jl") # This should create a new run name every time you run the file # And add an empty runXXX file to the single_runs folder @@ -88,7 +88,7 @@ for k in [:K_dust, :K_POC, :K_prec, :K_bSi] # "opt" is a misnomer but it is simpler for plotting scripts # Set the problem with the parameters above - prob = SteadyStateProblem(fun, x, p) + prob = SteadyStateProblem(F, x, p) # solve the system sol = solve(prob, CTKAlg(), preprint="Nd & εNd solve ", τstop=ustrip(s, 1e3Myr)).u diff --git a/src/Nd_model/single_run.jl b/src/Nd_model/single_run.jl index ef0373c..f19d999 100644 --- a/src/Nd_model/single_run.jl +++ b/src/Nd_model/single_run.jl @@ -3,7 +3,7 @@ # This lines sets up the model (and `F`) only once, # so that you rerunning this file will not repeat the entire model setup -!isdefined(Main, :fun) && include("model_setup.jl") +!isdefined(Main, :F) && include("model_setup.jl") # This should create a new run name every time you run the file # And add an empty runXXX file to the single_runs folder @@ -85,7 +85,7 @@ tp_opt = AIBECS.table(p)# table of parameters jldsave(joinpath(archive_path, "model$(headcommit)_single_run$(run_num)_$(circname).jld2"); headcommit, tp_opt) # Set the problem with the parameters above -prob = SteadyStateProblem(fun, x, p) +prob = SteadyStateProblem(F, x, p) # solve the system sol = solve(prob, CTKAlg(), preprint="Nd & εNd solve ", τstop=ustrip(s, 1e3Myr)).u diff --git a/src/Nd_model/single_run_PWtest.jl b/src/Nd_model/single_run_PWtest.jl index ef0373c..f19d999 100644 --- a/src/Nd_model/single_run_PWtest.jl +++ b/src/Nd_model/single_run_PWtest.jl @@ -3,7 +3,7 @@ # This lines sets up the model (and `F`) only once, # so that you rerunning this file will not repeat the entire model setup -!isdefined(Main, :fun) && include("model_setup.jl") +!isdefined(Main, :F) && include("model_setup.jl") # This should create a new run name every time you run the file # And add an empty runXXX file to the single_runs folder @@ -85,7 +85,7 @@ tp_opt = AIBECS.table(p)# table of parameters jldsave(joinpath(archive_path, "model$(headcommit)_single_run$(run_num)_$(circname).jld2"); headcommit, tp_opt) # Set the problem with the parameters above -prob = SteadyStateProblem(fun, x, p) +prob = SteadyStateProblem(F, x, p) # solve the system sol = solve(prob, CTKAlg(), preprint="Nd & εNd solve ", τstop=ustrip(s, 1e3Myr)).u