19 #include "pism/coupler/surface/ConstantPIK.hh"
20 #include "pism/util/io/File.hh"
21 #include "pism/util/Vars.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/util/pism_utilities.hh"
24 #include "pism/util/MaxTimestep.hh"
25 #include "pism/geometry/Geometry.hh"
34 PIK::PIK(std::shared_ptr<const Grid> grid, std::shared_ptr<atmosphere::AtmosphereModel> atmosphere)
46 "* Initializing the constant-in-time surface processes model PIK.\n"
47 " It reads surface mass balance directly from the file and holds it constant.\n"
48 " Ice upper-surface temperature is parameterized as in Martin et al. 2011, equation (1).\n"
49 " Any choice of atmosphere coupler (option '-atmosphere') is ignored.\n");
55 " reading surface mass balance rate 'climatic_mass_balance' from %s ... \n",
65 " parameterizing the ice surface temperature 'ice_surface_temp' ... \n");
83 for (
auto p =
m_grid->points(); p; p.next()) {
84 const int i = p.i(), j = p.j();
85 (*m_temperature)(i, j) = 273.15 + 30 - 0.0075 * surface_elevation(i, j) - 0.68775 * latitude(i, j) * (-1.0);
std::shared_ptr< const Grid > grid() const
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
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
std::shared_ptr< array::Scalar > m_temperature
const array::Scalar & mass_flux_impl() const
const array::Scalar & runoff_impl() const
const array::Scalar & temperature_impl() const
const array::Scalar & accumulation_impl() const
PIK(std::shared_ptr< const Grid > g, std::shared_ptr< atmosphere::AtmosphereModel > atmosphere)
void write_model_state_impl(const File &output) const
The default (empty implementation).
void define_model_state_impl(const File &output) const
The default (empty implementation).
const array::Scalar & melt_impl() const
void update_impl(const Geometry &geometry, double t, double dt)
std::shared_ptr< array::Scalar > m_mass_flux
void init_impl(const Geometry &geometry)
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
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
static std::shared_ptr< array::Scalar > allocate_temperature(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< array::Scalar > m_accumulation
void dummy_runoff(const array::Scalar &smb, array::Scalar &result)
The interface of PISM's surface models.
InputOptions process_input_options(MPI_Comm com, Config::ConstPtr config)