-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ICBM global ocean and Black Sea examples from Romeniello & Derry …
…(2010) examples/romglb/ examples/blacksea/ See README.md for details including how to download data files. These use 'ReactionOceanTransportRomanielloICBM' which reads the Matlab .mat files containing transport matrix and geometry for the ICBM models of global ocean and Black sea from: - Romaniello & Derry (2010) 'An intermediate-complexity model for simulating marine biogeochemistry in deep time: Validation against the modern global ocean', GGG, <https://dx.doi.org/10.1029/2009GC002711> - Romaniello & Derry (2010) 'Validation of an intermediate-complexity model for simulating marine biogeochemistry under anoxic conditions in the modern Black Sea', GGG, <https://dx.doi.org/10.1029/2009GC002712>
- Loading branch information
Showing
25 changed files
with
3,622 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using Logging | ||
using DiffEqBase | ||
using Sundials | ||
|
||
using Plots | ||
|
||
import PALEOboxes as PB | ||
import PALEOmodel | ||
import PALEOocean | ||
|
||
|
||
global_logger(ConsoleLogger(stderr,Logging.Info)) | ||
|
||
include("config_ocean_blacksea_expts.jl") | ||
include("plot_ocean_blacksea.jl") | ||
|
||
# abiotic atmosphere-ocean, O2 only | ||
model = PB.create_model_from_config( | ||
joinpath(@__DIR__, "PALEO_examples_blacksea_cfg.yaml"), "blacksea_abiotic_O2", | ||
modelpars=Dict( | ||
"matdir"=>joinpath(@__DIR__, "../romglb/romaniello2010_transport") # assume zip file has been downloaded and unpacked in this subfolder | ||
) | ||
) | ||
|
||
config_ocean_blacksea_expts(model, ["baseline"]); tspan=(0, 1e4) | ||
|
||
initial_state, modeldata = PALEOmodel.initialize!(model) | ||
|
||
paleorun = PALEOmodel.Run(model=model, output = PALEOmodel.OutputWriters.OutputMemory()) | ||
|
||
# No carbonate system, so can integrate as an ODE | ||
PALEOmodel.ODE.integrateForwardDiff( | ||
paleorun, initial_state, modeldata, tspan, | ||
solvekwargs=(reltol=1e-5,), | ||
) | ||
|
||
|
||
######################################## | ||
# Plot output | ||
######################################## | ||
|
||
# individual plots | ||
# plotlyjs(size=(750, 565)) | ||
# pager = PALEOmodel.DefaultPlotPager() | ||
|
||
# assemble plots onto screens with 6 subplots | ||
gr(size=(1200, 900)) | ||
pager=PALEOmodel.PlotPager((2, 3), (legend_background_color=nothing, margin=(5, :mm))) | ||
|
||
plot_totals(paleorun.output; species=["T", "O2"], pager=pager) | ||
plot_airsea(paleorun.output; species=["O2"], pager=pager) | ||
plot_ocean_tracers( | ||
paleorun.output; | ||
tracers=["insol", "T_conc", "O2_conc"], | ||
tcol=[-Inf, 10.0, 100.0, 1000.0, 1e4, 1e5], | ||
pager=pager | ||
) | ||
pager(:newpage) # flush output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Logging | ||
using DiffEqBase | ||
using Sundials | ||
|
||
using Plots | ||
|
||
import PALEOboxes as PB | ||
import PALEOmodel | ||
import PALEOocean | ||
|
||
|
||
global_logger(ConsoleLogger(stderr,Logging.Info)) | ||
|
||
include("config_ocean_blacksea_expts.jl") | ||
include("plot_ocean_blacksea.jl") | ||
|
||
# abiotic atmosphere-ocean, O2 only | ||
model = PB.create_model_from_config( | ||
joinpath(@__DIR__, "PALEO_examples_blacksea_cfg.yaml"), "blacksea_P_O2", | ||
modelpars=Dict( | ||
"matdir"=>joinpath(@__DIR__, "../romglb/romaniello2010_transport") # assume zip file has been downloaded and unpacked in this subfolder | ||
) | ||
) | ||
|
||
config_ocean_blacksea_expts(model, ["baseline"]); tspan=(0, 1e5) | ||
|
||
initial_state, modeldata = PALEOmodel.initialize!(model) | ||
|
||
paleorun = PALEOmodel.Run(model=model, output = PALEOmodel.OutputWriters.OutputMemory()) | ||
|
||
# No carbonate system, so can integrate as an ODE | ||
PALEOmodel.ODE.integrateForwardDiff( | ||
paleorun, initial_state, modeldata, tspan, | ||
solvekwargs=(reltol=1e-5,), | ||
) | ||
|
||
|
||
######################################## | ||
# Plot output | ||
######################################## | ||
|
||
# individual plots | ||
# plotlyjs(size=(750, 565)) | ||
# pager = PALEOmodel.DefaultPlotPager() | ||
|
||
# assemble plots onto screens with 6 subplots | ||
gr(size=(1200, 900)) | ||
pager=PALEOmodel.PlotPager((2, 3), (legend_background_color=nothing, margin=(5, :mm))) | ||
|
||
plot_totals(paleorun.output; species=["T", "O2", "P"], pager=pager) | ||
plot_airsea(paleorun.output; species=["O2"], pager=pager) | ||
pager(:newpage) | ||
plot_ocean_tracers( | ||
paleorun.output; | ||
tracers=["insol", "T_conc", "O2_conc", "P_conc"], | ||
tcol=[-Inf, 10.0, 100.0, 1000.0, 1e4, 1e5], | ||
pager=pager | ||
) | ||
pager(:newpage) # flush output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using Logging | ||
using DiffEqBase | ||
using Sundials | ||
|
||
using Plots | ||
|
||
import PALEOboxes as PB | ||
import PALEOmodel | ||
import PALEOocean | ||
|
||
|
||
global_logger(ConsoleLogger(stderr,Logging.Info)) | ||
|
||
include("config_ocean_blacksea_expts.jl") | ||
include("plot_ocean_blacksea.jl") | ||
|
||
model = PB.create_model_from_config( | ||
joinpath(@__DIR__, "PALEO_examples_blacksea_cfg.yaml"), "blacksea_P_O2_SO4", | ||
modelpars=Dict( | ||
"matdir"=>joinpath(@__DIR__, "../romglb/romaniello2010_transport") # assume zip file has been downloaded and unpacked in this subfolder | ||
) | ||
) | ||
|
||
config_ocean_blacksea_expts(model, ["baseline"]); tspan=(0, 1e5) | ||
|
||
initial_state, modeldata = PALEOmodel.initialize!(model) | ||
|
||
paleorun = PALEOmodel.Run(model=model, output = PALEOmodel.OutputWriters.OutputMemory()) | ||
|
||
# No carbonate system, so can integrate as an ODE | ||
PALEOmodel.ODE.integrateForwardDiff( | ||
paleorun, initial_state, modeldata, tspan, | ||
solvekwargs=(reltol=1e-5,), | ||
) | ||
|
||
|
||
######################################## | ||
# Plot output | ||
######################################## | ||
|
||
# individual plots | ||
# plotlyjs(size=(750, 565)) | ||
# pager = PALEOmodel.DefaultPlotPager() | ||
|
||
# assemble plots onto screens with 6 subplots | ||
gr(size=(1200, 900)) | ||
pager=PALEOmodel.PlotPager((2, 3), (legend_background_color=nothing, margin=(5, :mm))) | ||
|
||
plot_totals(paleorun.output; species=["T", "O2", "P", "S"], pager=pager) | ||
plot_airsea(paleorun.output; species=["O2"], pager=pager) | ||
pager(:newpage) | ||
plot_ocean_tracers( | ||
paleorun.output; | ||
tracers=["insol", "T_conc", "O2_conc", "P_conc", "SO4_conc", "H2S_conc"], | ||
tcol=[-Inf, 10.0, 100.0, 1000.0, 1e4, 1e5], | ||
pager=pager | ||
) | ||
pager(:newpage) # flush output |
Oops, something went wrong.