20 #include "pism/coupler/SeaLevel.hh"
22 #include "pism/util/MaxTimestep.hh"
24 #include "pism/util/pism_utilities.hh"
34 m_sea_level(grid,
"sea_level") {
37 .
long_name(
"sea level elevation, relative to the geoid")
55 double z_s =
m_config->get_number(
"sea_level.constant.value");
57 m_log->message(2,
"* Using constant sea level at %f meters...\n", z_s);
69 double z_s =
m_config->get_number(
"sea_level.constant.value");
97 namespace diagnostics {
104 m_vars[0].long_name(
"sea level elevation, relative to the geoid").units(
"meters");
109 auto result = allocate<array::Scalar>(
"sea_level");
111 result->copy_from(
model->elevation());
const Config::ConstPtr m_config
configuration database used by this component
const Logger::ConstPtr m_log
logger (for easy access)
A class defining a common interface for most PISM sub-models.
A template derived from Diagnostic, adding a "Model".
const units::System::Ptr m_sys
the unit system
std::vector< SpatialVariableMetadata > m_vars
metadata corresponding to NetCDF variables
std::shared_ptr< Diagnostic > Ptr
High-level PISM I/O class.
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
void set(double c)
Result: v[j] <- c for all j.
SpatialVariableMetadata & metadata(unsigned int N=0)
Returns a reference to the SpatialVariableMetadata object containing metadata for the compoment N.
void update(const Geometry &geometry, double t, double dt)
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
std::shared_ptr< SeaLevel > m_input_model
array::Scalar m_sea_level
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
virtual void update_impl(const Geometry &geometry, double t, double dt)
virtual TSDiagnosticList ts_diagnostics_impl() const
SeaLevel(std::shared_ptr< const Grid > g, std::shared_ptr< SeaLevel > input)
virtual void init_impl(const Geometry &geometry)
virtual DiagnosticList diagnostics_impl() const
virtual MaxTimestep max_timestep_impl(double t) const
void init(const Geometry &geometry)
const array::Scalar & elevation() const
std::shared_ptr< array::Array > compute_impl() const
bool ocean(int M)
An ocean cell (floating ice or ice-free).
std::map< std::string, TSDiagnostic::Ptr > TSDiagnosticList
std::map< std::string, Diagnostic::Ptr > DiagnosticList
T combine(const T &a, const T &b)