diff --git a/experiments/AMIP/components/land/climaland_bucket.jl b/experiments/AMIP/components/land/climaland_bucket.jl index d4181cfd4..3d2f5897b 100644 --- a/experiments/AMIP/components/land/climaland_bucket.jl +++ b/experiments/AMIP/components/land/climaland_bucket.jl @@ -7,7 +7,7 @@ import ClimaParams import Thermodynamics as TD import ClimaLand as CL import ClimaLand.Parameters as LP -import ClimaCoupler: FluxCalculator, Interfacer +import ClimaCoupler: Checkpointer, FluxCalculator, Interfacer ### ### Functions required by ClimaCoupler.jl for a SurfaceModelSimulation @@ -231,11 +231,11 @@ function FluxCalculator.surface_thermo_state( end """ - get_model_prog_state(sim::BucketSimulation) + Checkpointer.get_model_prog_state(sim::BucketSimulation) Extension of Checkpointer.get_model_prog_state to get the model state. """ -function get_model_prog_state(sim::BucketSimulation) +function Checkpointer.get_model_prog_state(sim::BucketSimulation) return sim.integrator.u.bucket end diff --git a/experiments/AMIP/components/ocean/eisenman_seaice.jl b/experiments/AMIP/components/ocean/eisenman_seaice.jl index 17c62c44c..4df68156f 100644 --- a/experiments/AMIP/components/ocean/eisenman_seaice.jl +++ b/experiments/AMIP/components/ocean/eisenman_seaice.jl @@ -1,7 +1,7 @@ import SciMLBase import ClimaCore as CC import ClimaTimeSteppers as CTS -import ClimaCoupler: FluxCalculator, Interfacer +import ClimaCoupler: Checkpointer, FluxCalculator, Interfacer ### ### Functions required by ClimaCoupler.jl for a SurfaceModelSimulation @@ -165,11 +165,11 @@ function FluxCalculator.update_turbulent_fluxes_point!( end """ - get_model_prog_state(sim::EisenmanIceSimulation) + Checkpointer.get_model_prog_state(sim::EisenmanIceSimulation) Extension of Checkpointer.get_model_prog_state to get the model state. """ -function get_model_prog_state(sim::EisenmanIceSimulation) +function Checkpointer.get_model_prog_state(sim::EisenmanIceSimulation) return sim.integrator.u end diff --git a/experiments/AMIP/components/ocean/prescr_seaice.jl b/experiments/AMIP/components/ocean/prescr_seaice.jl index eace4ddf7..103375cac 100644 --- a/experiments/AMIP/components/ocean/prescr_seaice.jl +++ b/experiments/AMIP/components/ocean/prescr_seaice.jl @@ -2,7 +2,7 @@ import SciMLBase import ClimaCore as CC import ClimaTimeSteppers as CTS import Thermodynamics as TD -import ClimaCoupler: BCReader, FluxCalculator, Interfacer, Regridder, Utilities +import ClimaCoupler: BCReader, Checkpointer, FluxCalculator, Interfacer, Regridder, Utilities include("../slab_utils.jl") @@ -141,11 +141,11 @@ function FluxCalculator.update_turbulent_fluxes_point!( end """ - get_model_prog_state(sim::PrescribedIceSimulation) + Checkpointer.get_model_prog_state(sim::PrescribedIceSimulation) Extension of Checkpointer.get_model_prog_state to get the model state. """ -function get_model_prog_state(sim::PrescribedIceSimulation) +function Checkpointer.get_model_prog_state(sim::PrescribedIceSimulation) return sim.integrator.u end diff --git a/experiments/AMIP/components/ocean/slab_ocean.jl b/experiments/AMIP/components/ocean/slab_ocean.jl index f53ad7cb6..5605e0c99 100644 --- a/experiments/AMIP/components/ocean/slab_ocean.jl +++ b/experiments/AMIP/components/ocean/slab_ocean.jl @@ -1,7 +1,7 @@ import SciMLBase import ClimaCore as CC import ClimaTimeSteppers as CTS -import ClimaCoupler: BCReader, FluxCalculator, Interfacer, Utilities +import ClimaCoupler: BCReader, Checkpointer, FluxCalculator, Interfacer, Utilities include("../slab_utils.jl") @@ -153,11 +153,11 @@ function FluxCalculator.update_turbulent_fluxes_point!( end """ - get_model_prog_state(sim::SlabOceanSimulation) + Checkpointer.get_model_prog_state(sim::SlabOceanSimulation) Extension of Checkpointer.get_model_prog_state to get the model state. """ -function get_model_prog_state(sim::SlabOceanSimulation) +function Checkpointer.get_model_prog_state(sim::SlabOceanSimulation) return sim.integrator.u end diff --git a/experiments/AMIP/coupler_driver.jl b/experiments/AMIP/coupler_driver.jl index 05715aec8..87184c08d 100644 --- a/experiments/AMIP/coupler_driver.jl +++ b/experiments/AMIP/coupler_driver.jl @@ -595,7 +595,7 @@ is specified in the `config_dict` dictionary. The `restart_t` field specifies th if restart_dir !== "unspecified" for sim in cs.model_sims - if get_model_prog_state(sim) !== nothing + if Checkpointer.get_model_prog_state(sim) !== nothing Checkpointer.restart_model_state!(sim, comms_ctx, restart_t; input_dir = restart_dir) end end diff --git a/experiments/AMIP/user_io/amip_visualizer.jl b/experiments/AMIP/user_io/amip_visualizer.jl index 97deb2682..f1e7797e5 100644 --- a/experiments/AMIP/user_io/amip_visualizer.jl +++ b/experiments/AMIP/user_io/amip_visualizer.jl @@ -13,6 +13,7 @@ include("plot_helper.jl") files_root = ".hdf5", fig_name = "amip_paperplots", ) + Coordinates the postprocessing and plotting of sample fields (specified in `post_spec`) of the last monthly mean file. Any specific plot customization should be done here. """ diff --git a/experiments/AMIP/user_io/user_logging.jl b/experiments/AMIP/user_io/user_logging.jl index f891822e9..a591b8600 100644 --- a/experiments/AMIP/user_io/user_logging.jl +++ b/experiments/AMIP/user_io/user_logging.jl @@ -19,7 +19,7 @@ This is a callback function that checkpoints all simulations defined in the curr """ function checkpoint_sims(cs::Interfacer.CoupledSimulation, _) for sim in cs.model_sims - if get_model_prog_state(sim) !== nothing + if Checkpointer.get_model_prog_state(sim) !== nothing t = Dates.datetime2epochms(cs.dates.date[1]) t0 = Dates.datetime2epochms(cs.dates.date0[1]) Checkpointer.checkpoint_model_state(sim, cs.comms_ctx, Int((t - t0) / 1e3), output_dir = cs.dirs.artifacts)