Skip to content

Commit b236e55

Browse files
Sbozzolojuliasloan25
authored andcommitted
Add show method to CoupledSimulation
1 parent a62d04e commit b236e55

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Interfacer.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This modules contains abstract types, interface templates and model stubs for co
66
module Interfacer
77

88
import SciMLBase
9+
import ClimaComms
910
import ClimaCore as CC
1011
import Thermodynamics as TD
1112
import SciMLBase: step!, reinit! # explicitly import to extend these functions
@@ -77,6 +78,17 @@ end
7778

7879
CoupledSimulation{FT}(args...) where {FT} = CoupledSimulation{FT, typeof.(args[1:end])...}(args...)
7980

81+
function Base.show(io::IO, sim::CoupledSimulation)
82+
device_type = nameof(typeof(ClimaComms.device(sim.comms_ctx)))
83+
return print(
84+
io,
85+
"Coupled Simulation\n",
86+
"├── Running on: $(device_type)\n",
87+
"├── Output folder: $(sim.dirs.output)\n",
88+
"└── Current date: $(sim.dates.date[])",
89+
)
90+
end
91+
8092
"""
8193
float_type(::CoupledSimulation)
8294

0 commit comments

Comments
 (0)