19 #include "pism/coupler/ocean/Constant.hh"
21 #include "pism/util/ConfigInterface.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/util/MaxTimestep.hh"
24 #include "pism/geometry/Geometry.hh"
39 melt_rate =
m_config->get_number(
"ocean.constant.melt_rate",
"m second-1"),
40 ice_density =
m_config->get_number(
"constants.ice.density"),
41 water_density =
m_config->get_number(
"constants.sea_water.density"),
42 g =
m_config->get_number(
"constants.standard_gravity"),
43 mass_flux = melt_rate * ice_density;
56 m_log->message(2,
"* Initializing the constant ocean model...\n");
57 m_log->message(2,
" Sub-shelf melt rate set to %f m/year.\n",
58 m_config->get_number(
"ocean.constant.melt_rate",
"m year-1"));
61 ice_density =
m_config->get_number(
"constants.ice.density"),
62 water_density =
m_config->get_number(
"constants.sea_water.density"),
63 g =
m_config->get_number(
"constants.standard_gravity");
80 T0 =
m_config->get_number(
"constants.fresh_water.melting_point_temperature"),
81 beta_CC =
m_config->get_number(
"constants.ice.beta_Clausius_Clapeyron"),
82 g =
m_config->get_number(
"constants.standard_gravity"),
83 ice_density =
m_config->get_number(
"constants.ice.density");
87 for (
auto p =
m_grid->points(); p; p.next()) {
88 const int i = p.i(), j = p.j();
89 const double pressure = ice_density *
g * depth(i, j);
91 result(i, j) = T0 -
beta_CC * pressure;
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
array::Scalar2 ice_thickness
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.
std::shared_ptr< array::Scalar > m_shelf_base_mass_flux
std::shared_ptr< array::Scalar > m_shelf_base_temperature
void update_impl(const Geometry &geometry, double t, double dt)
MaxTimestep max_timestep_impl(double t) const
void init_impl(const Geometry &geometry)
Constant(std::shared_ptr< const Grid > g)
void melting_point_temperature(const array::Scalar &depth, array::Scalar &result) const
std::shared_ptr< array::Scalar > m_water_column_pressure
static const double beta_CC
bool ocean(int M)
An ocean cell (floating ice or ice-free).
void compute_average_water_column_pressure(const Geometry &geometry, double ice_density, double water_density, double g, array::Scalar &result)