19#include "pism/coupler/ocean/Constant.hh"
21#include "pism/util/Config.hh"
22#include "pism/util/Grid.hh"
23#include "pism/util/MaxTimestep.hh"
24#include "pism/geometry/Geometry.hh"
25#include "pism/util/Logger.hh"
40 melt_rate =
m_config->get_number(
"ocean.constant.melt_rate",
"m second-1"),
41 ice_density =
m_config->get_number(
"constants.ice.density"),
42 water_density =
m_config->get_number(
"constants.sea_water.density"),
43 g =
m_config->get_number(
"constants.standard_gravity"),
44 mass_flux = melt_rate * ice_density;
57 m_log->message(2,
"* Initializing the constant ocean model...\n");
58 m_log->message(2,
" Sub-shelf melt rate set to %f m/year.\n",
59 m_config->get_number(
"ocean.constant.melt_rate",
"m year-1"));
62 ice_density =
m_config->get_number(
"constants.ice.density"),
63 water_density =
m_config->get_number(
"constants.sea_water.density"),
64 g =
m_config->get_number(
"constants.standard_gravity");
81 T0 =
m_config->get_number(
"constants.fresh_water.melting_point_temperature"),
82 beta_CC =
m_config->get_number(
"constants.ice.beta_Clausius_Clapeyron"),
83 g =
m_config->get_number(
"constants.standard_gravity"),
84 ice_density =
m_config->get_number(
"constants.ice.density");
88 for (
auto p :
m_grid->points()) {
89 const int i = p.i(), j = p.j();
90 const double pressure = ice_density *
g * depth(i, j);
92 result(i, j) = T0 -
beta_CC * pressure;
std::shared_ptr< const Config > m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
std::shared_ptr< const Logger > m_log
logger (for easy access)
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
MaxTimestep max_timestep_impl(double t) const
void update_impl(const Inputs &inputs, double t, double dt)
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 standard_gravity, array::Scalar &result)