20#include "pism/frontretreat/PrescribedRetreat.hh"
21#include "pism/coupler/util/options.hh"
22#include "pism/util/array/Forcing.hh"
30 unsigned int buffer_size =
m_config->get_number(
"input.forcing.buffer_size");
35 std::make_shared<array::Forcing>(
m_grid, file,
"land_ice_area_fraction_retreat",
39 .long_name(
"maximum ice extent mask")
49 "* Initializing the prescribed front retreat mechanism\n"
50 " using a time-dependent ice extent mask '%s' in '%s'...\n",
65 for (
auto p =
m_grid->points(); p; p.next()) {
66 const int i = p.i(), j = p.j();
68 double f = (*m_retreat_mask)(i, j);
71 ice_area_specific_volume(i, j) = 0.0;
72 ice_thickness(i, j) = 0.0;
73 }
else if (f < 1.0 - eps) {
74 ice_area_specific_volume(i, j) = ice_thickness(i, j) * f;
75 ice_thickness(i, j) = 0.0;
86 return MaxTimestep(dt.value(),
"prescribed ice retreat");
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
A class defining a common interface for most PISM sub-models.
High-level PISM I/O class.
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
std::shared_ptr< array::Forcing > m_retreat_mask
PrescribedRetreat(std::shared_ptr< const Grid > grid)
void update(double t, double dt, array::Scalar &ice_thickness, array::Scalar &ice_area_specific_volume)
MaxTimestep max_timestep_impl(double t) const
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
@ PISM_READONLY
open an existing file for reading only