Skip to content

Commit

Permalink
Add ICBM global ocean and Black Sea examples from Romeniello & Derry …
Browse files Browse the repository at this point in the history
…(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
sjdaines committed Jun 18, 2024
1 parent 53aa5b9 commit eb9129e
Show file tree
Hide file tree
Showing 25 changed files with 3,622 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ LocalPreferences.toml
*.nc
*.zip
examples/shelf1D/S2P3_transport_20240614
examples/romglb/romaniello2010_transport
3 changes: 2 additions & 1 deletion docs/src/PALEOocean_Reactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ CurrentModule = PALEOocean.Ocean
OceanNoTransport.ReactionOceanNoTransport
OceanTransport3box.ReactionOceanTransport3box
OceanTransport6box.ReactionOceanTransport6box
OceanTransportTMM.ReactionOceanTransportTMM
OceanTransportColumn.ReactionOceanTransportColumn
OceanTransportRomaniello2010.ReactionOceanTransportRomanielloICBM
OceanTransportTMM.ReactionOceanTransportTMM
```

## Vertical Transport
Expand Down
23 changes: 23 additions & 0 deletions docs/src/paleo_references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,29 @@ @article{Ridgwell2007
pages = {87--104},
}

@article{Romaniello2010a,
author = {Romaniello, Stephen J. and Derry, Louis A},
doi = {10.1029/2009GC002712},
journal = {Geochemistry Geophysics Geosystems},
month = {aug},
number = {8},
pages = {1--18},
title = {{Validation of an intermediate-complexity model for simulating marine biogeochemistry under anoxic conditions in the modern Black Sea}},
volume = {11},
year = {2010}
}

@article{Romaniello2010,
author = {Romaniello, Stephen J. and Derry, Louis A},
doi = {10.1029/2009GC002711},
journal = {Geochemistry Geophysics Geosystems},
month = {aug},
number = {8},
pages = {1--33},
title = {{An intermediate-complexity model for simulating marine biogeochemistry in deep time: Validation against the modern global ocean}},
volume = {11},
year = {2010}
}

@article{Sarmiento1984,
author = {Sarmiento, Jorge L and Toggweiler, J. R.},
Expand Down
58 changes: 58 additions & 0 deletions examples/blacksea/PALEO_examples_blacksea_O2_only.jl
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
59 changes: 59 additions & 0 deletions examples/blacksea/PALEO_examples_blacksea_P_O2.jl
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
58 changes: 58 additions & 0 deletions examples/blacksea/PALEO_examples_blacksea_P_O2_SO4.jl
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
Loading

0 comments on commit eb9129e

Please sign in to comment.