Skip to content

Commit

Permalink
Add show method to CoupledSimulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Mar 4, 2025
1 parent 04365bd commit 1c778f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Interfacer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This modules contains abstract types, interface templates and model stubs for co
module Interfacer

import SciMLBase
import ClimaComms
import ClimaCore as CC
import Thermodynamics as TD
import SciMLBase: step!, reinit! # explicitly import to extend these functions
Expand Down Expand Up @@ -77,6 +78,17 @@ end

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

function Base.show(io::IO, sim::CoupledSimulation)
device_type = nameof(typeof(ClimaComms.device(sim.comms_ctx)))
return print(
io,
"Coupled Simulation\n",
"├── Running on: $(device_type)\n",
"├── Output folder: $(sim.dirs.output)\n",
"└── Current date: $(sim.dates.date[])",
)
end

"""
float_type(::CoupledSimulation)
Expand Down

0 comments on commit 1c778f8

Please sign in to comment.