PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Simple.hh
Go to the documentation of this file.
1 // Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 PISM Authors
2 //
3 // This file is part of PISM.
4 //
5 // PISM is free software; you can redistribute it and/or modify it under the
6 // terms of the GNU General Public License as published by the Free Software
7 // Foundation; either version 3 of the License, or (at your option) any later
8 // version.
9 //
10 // PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with PISM; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef _PSSIMPLE_H_
20 #define _PSSIMPLE_H_
21 
22 #include "pism/coupler/SurfaceModel.hh"
23 
24 namespace pism {
25 namespace surface {
26 
27 //! \brief A class implementing a primitive surface model.
28 /*!
29  This is an "invisible" surface processes model which "passes through"
30  information from the atmosphere above directly to the ice below the surface
31  layers. It implements two modeling choices:
32  \li accumulation which is obtained from an atmosphere model is interpreted
33  as surface mass flux;
34  \li mean-annual near-surface air temperature is interpreted as instantaneous
35  temperature of the ice at the ice surface.
36 
37  The second choice means that the upper boundary condition of the conservation of
38  energy scheme for the ice fluid is exactly the 2m air temperature.
39 */
40 class Simple : public SurfaceModel {
41 public:
42  Simple(std::shared_ptr<const Grid> g, std::shared_ptr<atmosphere::AtmosphereModel> atmosphere);
43 protected:
44  virtual void init_impl(const Geometry &geometry);
45  virtual void update_impl(const Geometry &geometry, double t, double dt);
46 
47  const array::Scalar& mass_flux_impl() const;
48  const array::Scalar& temperature_impl() const;
49 
50  const array::Scalar& accumulation_impl() const;
51  const array::Scalar& melt_impl() const;
52  const array::Scalar& runoff_impl() const;
53 
54  std::shared_ptr<array::Scalar> m_mass_flux;
55  std::shared_ptr<array::Scalar> m_temperature;
56 };
57 
58 } // end of namespace surface
59 } // end of namespace pism
60 
61 #endif /* _PSSIMPLE_H_ */
const array::Scalar & accumulation_impl() const
Definition: Simple.cc:66
Simple(std::shared_ptr< const Grid > g, std::shared_ptr< atmosphere::AtmosphereModel > atmosphere)
Definition: Simple.cc:27
const array::Scalar & temperature_impl() const
Definition: Simple.cc:62
virtual void update_impl(const Geometry &geometry, double t, double dt)
Definition: Simple.cc:45
std::shared_ptr< array::Scalar > m_mass_flux
Definition: Simple.hh:54
const array::Scalar & mass_flux_impl() const
Definition: Simple.cc:58
std::shared_ptr< array::Scalar > m_temperature
Definition: Simple.hh:55
const array::Scalar & melt_impl() const
Definition: Simple.cc:70
virtual void init_impl(const Geometry &geometry)
Definition: Simple.cc:34
const array::Scalar & runoff_impl() const
Definition: Simple.cc:74
A class implementing a primitive surface model.
Definition: Simple.hh:40
The interface of PISM's surface models.
Definition: SurfaceModel.hh:42
static const double g
Definition: exactTestP.cc:36