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",
63 for (
auto p =
m_grid->points(); p; p.next()) {
64 const int i = p.i(), j = p.j();
66 double f = (*m_retreat_mask)(i, j);
69 ice_area_specific_volume(i, j) = 0.0;
70 ice_thickness(i, j) = 0.0;
72 ice_area_specific_volume(i, j) = ice_thickness(i, j) * f;
73 ice_thickness(i, j) = 0.0;
84 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