22 #include "pism/hydrology/Hydrology.hh"
23 #include "pism/util/array/Staggered.hh"
84 Routing(std::shared_ptr<const Grid>
g);
145 double &maxKW)
const;
High-level PISM I/O class.
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
const array::Scalar & surface_input_rate() const
The PISM subglacial hydrology model interface.
virtual void init_impl(const array::Scalar &W_till, const array::Scalar &W, const array::Scalar &P)
array::Staggered1 m_Qstag_average
virtual void initialization_message() const
virtual std::map< std::string, Diagnostic::Ptr > diagnostics_impl() const
const array::Scalar & subglacial_water_pressure() const
array::Staggered1 m_Wstag
double max_timestep_W_diff(double KW_max) const
virtual void bootstrap_impl(const File &input_file, const array::Scalar &ice_thickness)
double max_timestep_W_cfl() const
void compute_conductivity(const array::Staggered &W, const array::Scalar &P, const array::Scalar &bed, array::Staggered &result, double &maxKW) const
Compute the nonlinear conductivity at the center of cell edges.
virtual ~Routing()=default
array::Staggered1 m_Kstag
void advective_fluxes(const array::Staggered &V, const array::Scalar &W, array::Staggered &result) const
Compute Q = V W at edge-centers (staggered grid) by first-order upwinding.
void W_change_due_to_flow(double dt, const array::Scalar1 &W, const array::Staggered1 &Wstag, const array::Staggered1 &K, const array::Staggered1 &Q, array::Scalar &result)
void update_W(double dt, const array::Scalar &surface_input_rate, const array::Scalar &basal_melt_rate, const array::Scalar1 &W, const array::Staggered1 &Wstag, const array::Scalar &Wtill, const array::Scalar &Wtill_new, const array::Staggered1 &K, const array::Staggered1 &Q, array::Scalar &W_new)
The computation of Wnew, called by update().
virtual void update_impl(double t, double dt, const Inputs &inputs)
Update the model state variables W and Wtill by applying the subglacial hydrology model equations.
void water_thickness_staggered(const array::Scalar &W, const array::CellType1 &mask, array::Staggered &result)
Average the regular grid water thickness to values at the center of cell edges.
void compute_velocity(const array::Staggered &W, const array::Scalar &P, const array::Scalar &bed, const array::Staggered &K, const array::Scalar1 *no_model_mask, array::Staggered &result) const
Get the advection velocity V at the center of cell edges.
const array::Staggered & velocity_staggered() const
array::Staggered1 m_Qstag
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
void update_Wtill(double dt, const array::Scalar &Wtill, const array::Scalar &surface_input_rate, const array::Scalar &basal_melt_rate, array::Scalar &Wtill_new)
The computation of Wtillnew, called by update().
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
Routing(std::shared_ptr< const Grid > g)
virtual std::map< std::string, TSDiagnostic::Ptr > ts_diagnostics_impl() const
virtual void restart_impl(const File &input_file, int record)
array::Scalar1 m_bottom_surface
A subglacial hydrology model which assumes water pressure equals overburden pressure.
static double K(double psi_x, double psi_y, double speed, double epsilon)
void wall_melt(const Routing &model, const array::Scalar &bed_elevation, array::Scalar &result)
Compute the wall melt rate which comes from (turbulent) dissipation of flow energy.