20 #include "pism/coupler/ocean/Delta_MBP.hh"
21 #include "pism/util/ScalarForcing.hh"
22 #include "pism/geometry/Geometry.hh"
34 "melange back pressure"));
48 "* Initializing melange back pressure forcing using scalar offsets...\n");
55 melange_thickness =
m_config->get_number(
"ocean.delta_MBP.melange_thickness"),
56 dP_melange =
m_forcing->value(t + 0.5 * dt);
58 const auto &P =
m_input_model->average_water_column_pressure();
63 for (
auto p =
m_grid->points(); p; p.next()) {
64 const int i = p.i(), j = p.j();
66 double dP = H(i, j) > 0.0 ? (melange_thickness * dP_melange) / H(i, j) : 0.0;
68 P_new(i, j) = P(i, j) + dP;
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
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
void update_impl(const Geometry &geometry, double t, double dt)
const array::Scalar & average_water_column_pressure_impl() const
Delta_MBP(std::shared_ptr< const Grid > g, std::shared_ptr< OceanModel > in)
void init_impl(const Geometry &geometry)
std::unique_ptr< ScalarForcing > m_forcing
std::shared_ptr< OceanModel > m_input_model
std::shared_ptr< array::Scalar > m_water_column_pressure
static std::shared_ptr< array::Scalar > allocate_water_column_pressure(std::shared_ptr< const Grid > g)
A very rudimentary PISM ocean model.
bool ocean(int M)
An ocean cell (floating ice or ice-free).