19 #include "pism/coupler/surface/GivenClimate.hh"
21 #include "pism/util/Time.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/coupler/util/options.hh"
24 #include "pism/util/array/Forcing.hh"
29 Given::Given(std::shared_ptr<const Grid> grid, std::shared_ptr<atmosphere::AtmosphereModel> input)
37 unsigned int buffer_size =
m_config->get_number(
"input.forcing.buffer_size");
51 "climatic_mass_balance",
52 "land_ice_surface_specific_mass_balance_flux",
58 .long_name(
"temperature of the ice at the ice surface but below firn processes")
62 const double smb_max =
m_config->get_number(
"surface.given.smb_max",
"kg m-2 second-1");
65 .long_name(
"surface mass balance (accumulation/ablation) rate")
67 .output_units(
"kg m-2 year-1")
68 .standard_name(
"land_ice_surface_specific_mass_balance_flux");
70 m_mass_flux->metadata()[
"valid_range"] = {-smb_max, smb_max};
76 "* Initializing the surface model reading temperature at the top of the ice\n"
77 " and ice surface mass flux from a file...\n");
const Time & time() const
const Config::ConstPtr m_config
configuration database used by this component
const Logger::ConstPtr m_log
logger (for easy access)
const std::shared_ptr< const Grid > m_grid
grid used by this component
High-level PISM I/O class.
const array::Scalar & accumulation_impl() const
const array::Scalar & melt_impl() const
const array::Scalar & runoff_impl() const
const array::Scalar & mass_flux_impl() const
Given(std::shared_ptr< const Grid > g, std::shared_ptr< atmosphere::AtmosphereModel > input)
std::shared_ptr< array::Forcing > m_temperature
void update_impl(const Geometry &geometry, double t, double dt)
void init_impl(const Geometry &geometry)
std::shared_ptr< array::Forcing > m_mass_flux
void write_model_state_impl(const File &output) const
The default (empty implementation).
const array::Scalar & temperature_impl() const
void define_model_state_impl(const File &output) const
The default (empty implementation).
void update(const Geometry &geometry, double t, double dt)
void dummy_accumulation(const array::Scalar &smb, array::Scalar &result)
std::shared_ptr< array::Scalar > m_melt
std::shared_ptr< array::Scalar > m_runoff
void dummy_melt(const array::Scalar &smb, array::Scalar &result)
std::shared_ptr< array::Scalar > m_accumulation
void dummy_runoff(const array::Scalar &smb, array::Scalar &result)
The interface of PISM's surface models.
@ PISM_READONLY
open an existing file for reading only