20 #include "pism/verification/TemperatureModel_Verification.hh"
22 #include "pism/util/error_handling.hh"
23 #include "pism/verification/tests/exactTestsFG.hh"
24 #include "pism/verification/tests/exactTestK.h"
25 #include "pism/verification/tests/exactTestO.h"
26 #include "pism/energy/utilities.hh"
27 #include "pism/util/Time.hh"
28 #include "pism/util/Context.hh"
35 static const double ST = 1.67e-5;
36 static const double Tmin = 223.15;
39 std::shared_ptr<const Grid> grid,
40 std::shared_ptr<const stressbalance::StressBalance> stress_balance,
int testname,
44 m_bedrock_is_ice(bedrock_is_ice) {
70 climatic_mass_balance, basal_heat_flux);
87 for (
auto p =
m_grid->points(); p; p.next()) {
88 const int i = p.i(), j = p.j();
104 const unsigned int Mz =
m_grid->Mz();
111 for (
unsigned int k = 0;
k < Mz;
k++) {
124 for (
auto p =
m_grid->points(); p; p.next()) {
const Time & time() const
const std::shared_ptr< const Grid > m_grid
grid used by this component
void failed()
Indicates a failure of a parallel section.
double current() const
Current time, in seconds.
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
void set_column(int i, int j, double c)
Set all values of scalar quantity to given a single value in a particular column.
void set(double c)
Result: v[j] <- c for all j.
void update_ghosts()
Updates ghost points.
const array::Scalar & basal_melt_rate() const
Basal melt rate in grounded areas. (It is set to zero elsewhere.)
array::Array3D m_ice_enthalpy
array::Scalar m_basal_melt_rate
TemperatureModel_Verification(std::shared_ptr< const Grid > grid, std::shared_ptr< const stressbalance::StressBalance > stress_balance, int testname, bool bedrock_is_ice)
void initialize_impl(const array::Scalar &basal_melt_rate, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
const array::Array3D & temperature() const
void initialize_impl(const array::Scalar &basal_melt_rate, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
array::Array3D m_ice_temperature
struct TestKParameters exactK(double t, double z, int bedrock_is_ice)
struct TestOParameters exactO(double z)
double max(const array::Scalar &input)
Finds maximum over all the values in an array::Scalar object. Ignores ghosts.
static const double ApforG
static const double LforFG
void compute_enthalpy_cold(const array::Array3D &temperature, const array::Scalar &ice_thickness, array::Array3D &result)
Compute ice enthalpy from temperature temperature by assuming the ice has zero liquid fraction.
double radius(const Grid &grid, int i, int j)
Returns the distance from the point (i,j) to the origin.
TestFGParameters exactFG(double t, double r, const std::vector< double > &z, double Cp)