20#include "pism/coupler/SeaLevel.hh"
22#include "pism/util/MaxTimestep.hh"
24#include "pism/util/pism_utilities.hh"
25#include "pism/util/Logger.hh"
35 m_sea_level(grid,
"sea_level") {
38 .
long_name(
"sea level elevation, relative to the geoid")
56 double z_s =
m_config->get_number(
"sea_level.constant.value");
58 m_log->message(2,
"* Using constant sea level at %f meters...\n", z_s);
70 double z_s =
m_config->get_number(
"sea_level.constant.value");
99namespace diagnostics {
106 m_vars[0].long_name(
"sea level elevation, relative to the geoid").units(
"meters");
111 auto result = allocate<array::Scalar>(
"sea_level");
113 result->copy_from(
model->elevation());
std::shared_ptr< const Config > m_config
configuration database used by this component
std::shared_ptr< const Logger > 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".
std::vector< VariableMetadata > m_vars
metadata corresponding to NetCDF variables
const units::System::Ptr m_sys
the unit system
std::shared_ptr< Diagnostic > Ptr
std::shared_ptr< const Grid > m_grid
the grid
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.
VariableMetadata & metadata(unsigned int N=0)
Returns a reference to the VariableMetadata object containing metadata for the compoment N.
void update(const Geometry &geometry, double t, double dt)
virtual std::set< VariableMetadata > state_impl() const
virtual TSDiagnosticList scalar_diagnostics_impl() const
std::shared_ptr< SeaLevel > m_input_model
array::Scalar m_sea_level
virtual void update_impl(const Geometry &geometry, double t, double dt)
SeaLevel(std::shared_ptr< const Grid > g, std::shared_ptr< SeaLevel > input)
virtual void init_impl(const Geometry &geometry)
virtual DiagnosticList spatial_diagnostics_impl() const
virtual MaxTimestep max_timestep_impl(double t) const
virtual void write_state_impl(const OutputFile &output) const
The default (empty implementation).
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)