19 #include "pism/coupler/surface/ElevationChange.hh"
20 #include "pism/coupler/util/options.hh"
21 #include "pism/coupler/util/lapse_rates.hh"
22 #include "pism/geometry/Geometry.hh"
23 #include "pism/util/array/Forcing.hh"
41 auto method =
m_config->get_string(
"surface.elevation_change.smb.method");
51 unsigned int buffer_size =
m_config->get_number(
"input.forcing.buffer_size");
59 .long_name(
"ice surface elevation")
61 .standard_name(
"surface_altitude");
77 " [using temperature and mass balance lapse corrections]\n");
80 " ice upper-surface temperature lapse rate: %3.3f K per km\n",
84 double ice_density =
m_config->get_number(
"constants.ice.density");
86 " ice-equivalent surface mass balance lapse rate: %3.3f m year-1 per km\n",
90 " surface mass balance scaling factor with temperature: %3.3f Kelvin-1\n",
118 for (
auto p =
m_grid->points(); p; p.next()) {
119 const int i = p.i(), j = p.j();
const units::System::Ptr m_sys
unit system used by this component
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.
array::Scalar2 ice_surface_elevation
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
virtual void init_impl(const Geometry &geometry)
virtual void update_impl(const Geometry &geometry, double t, double dt)
std::shared_ptr< array::Scalar > m_mass_flux
const array::Scalar & melt_impl() const
const array::Scalar & accumulation_impl() const
std::shared_ptr< array::Forcing > m_reference_surface
std::shared_ptr< array::Scalar > m_temperature
const array::Scalar & temperature_impl() const
const array::Scalar & runoff_impl() const
ElevationChange(std::shared_ptr< const Grid > g, std::shared_ptr< SurfaceModel > in)
const array::Scalar & mass_flux_impl() const
static std::shared_ptr< array::Scalar > allocate_runoff(std::shared_ptr< const Grid > grid)
static std::shared_ptr< array::Scalar > allocate_mass_flux(std::shared_ptr< const Grid > grid)
void dummy_accumulation(const array::Scalar &smb, array::Scalar &result)
std::shared_ptr< array::Scalar > m_melt
static std::shared_ptr< array::Scalar > allocate_temperature(std::shared_ptr< const Grid > grid)
static std::shared_ptr< array::Scalar > allocate_accumulation(std::shared_ptr< const Grid > grid)
static std::shared_ptr< array::Scalar > allocate_melt(std::shared_ptr< const Grid > grid)
std::shared_ptr< array::Scalar > m_runoff
void dummy_melt(const array::Scalar &smb, array::Scalar &result)
std::shared_ptr< SurfaceModel > m_input_model
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
double convert(System::Ptr system, double input, const std::string &spec1, const std::string &spec2)
Convert a quantity from unit1 to unit2.
void lapse_rate_correction(const array::Scalar &surface, const array::Scalar &reference_surface, double lapse_rate, array::Scalar &result)