19#include "pism/coupler/frontalmelt/Constant.hh"
21#include "pism/util/Config.hh"
22#include "pism/util/Grid.hh"
23#include "pism/util/MaxTimestep.hh"
24#include "pism/geometry/Geometry.hh"
25#include "pism/util/Logger.hh"
28namespace frontalmelt {
34 .long_name(
"frontal melt rate")
36 .output_units(
"m day^-1");
46 melt_rate =
m_config->get_number(
"frontal_melt.constant.melt_rate",
"m second-1");
50 for (
auto p :
m_grid->points()) {
51 const int i = p.i(), j = p.j();
53 if (
apply(cell_type, i, j)) {
54 (*m_frontal_melt_rate)(i, j) = melt_rate;
56 (*m_frontal_melt_rate)(i, j) = 0.0;
69 "* Initializing the constant frontal melt model...\n"
70 " Frontal melt rate set to %f m/year.\n",
71 m_config->get_number(
"frontal_melt.constant.melt_rate",
"m year-1"));
std::shared_ptr< const Config > m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
std::shared_ptr< const Logger > m_log
logger (for easy access)
array::CellType2 cell_type
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
MaxTimestep max_timestep_impl(double t) const
void init_impl(const Geometry &geometry)
const array::Scalar & frontal_melt_rate_impl() const
void update_impl(const FrontalMeltInputs &inputs, double t, double dt)
std::shared_ptr< array::Scalar > m_frontal_melt_rate
Constant(std::shared_ptr< const Grid > g)
bool apply(const array::CellType1 &M, int i, int j) const
A very rudimentary PISM frontal melt model.