19 #include "pism/coupler/frontalmelt/Constant.hh"
21 #include "pism/util/ConfigInterface.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/util/MaxTimestep.hh"
24 #include "pism/geometry/Geometry.hh"
27 namespace frontalmelt {
33 .long_name(
"frontal melt rate")
35 .output_units(
"m day-1");
45 melt_rate =
m_config->get_number(
"frontal_melt.constant.melt_rate",
"m second-1");
49 for (
auto p =
m_grid->points(); p; p.next()) {
50 const int i = p.i(), j = p.j();
52 if (
apply(cell_type, i, j)) {
53 (*m_frontal_melt_rate)(i, j) = melt_rate;
55 (*m_frontal_melt_rate)(i, j) = 0.0;
68 "* Initializing the constant frontal melt model...\n"
69 " Frontal melt rate set to %f m/year.\n",
70 m_config->get_number(
"frontal_melt.constant.melt_rate",
"m year-1"));
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
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.