19#include "pism/util/array/CellType.hh"
20#include "pism/util/error_handling.hh"
21#include "pism/icebin/NullTransportHydrology.hh"
22#include "pism/geometry/Geometry.hh"
28 :
pism::hydrology::NullTransport(grid), basal_runoff_sum(m_grid,
"basal_runoff") {
31 "Effective thickness of subglacial water expelled from till (thickness of water, not ice)")
52 const double tillwat_max =
m_config->get_number(
"hydrology.tillwat_max"),
53 C =
m_config->get_number(
"hydrology.tillwat_decay_rate");
55 if (tillwat_max < 0.0) {
57 "hydrology::NullTransport: hydrology.tillwat_max is negative.\n"
58 "This is not allowed.");
66 const int i = p.i(), j = p.j();
68 if (cell_type.ocean(i, j) || cell_type.ice_free(i, j)) {
73 m_Wtill(i, j) = std::min(std::max(0.0,
m_Wtill(i, j)), tillwat_max);
const Config::ConstPtr m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
array::CellType2 cell_type
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
SpatialVariableMetadata & metadata(unsigned int N=0)
Returns a reference to the SpatialVariableMetadata object containing metadata for the compoment N.
array::Scalar m_surface_input_rate
array::Scalar m_Wtill
effective thickness of basal water stored in till
NullTransportHydrology(std::shared_ptr< const pism::Grid > grid)
pism::array::Scalar basal_runoff_sum
void update_impl(double icet, double icedt, const hydrology::Inputs &inputs)
Update the till water thickness by simply integrating the melt input.
#define PISM_ERROR_LOCATION