tSimple.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tSimple.hh (2238B)
---
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(IceGrid::ConstPtr 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 IceModelVec2S& mass_flux_impl() const;
48 const IceModelVec2S& temperature_impl() const;
49
50 const IceModelVec2S& accumulation_impl() const;
51 const IceModelVec2S& melt_impl() const;
52 const IceModelVec2S& runoff_impl() const;
53
54 IceModelVec2S::Ptr m_mass_flux;
55 IceModelVec2S::Ptr m_temperature;
56 };
57
58 } // end of namespace surface
59 } // end of namespace pism
60
61 #endif /* _PSSIMPLE_H_ */