PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
GivenClimate.hh
Go to the documentation of this file.
1 // Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2021, 2023 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 _PAGIVEN_H_
20 #define _PAGIVEN_H_
21 
22 #include "pism/coupler/AtmosphereModel.hh"
23 
24 namespace pism {
25 
26 class Geometry;
27 
28 namespace atmosphere {
29 
30 class Given : public AtmosphereModel
31 {
32 public:
33  Given(std::shared_ptr<const Grid> g);
34  virtual ~Given() = default;
35 private:
36  void init_impl(const Geometry &geometry);
37  void update_impl(const Geometry &geometry, double t, double dt);
38 
39  const array::Scalar& precipitation_impl() const;
40  const array::Scalar& air_temperature_impl() const;
41 
42  void begin_pointwise_access_impl() const;
43  void end_pointwise_access_impl() const;
44 
45  void init_timeseries_impl(const std::vector<double> &ts) const;
46  void temp_time_series_impl(int i, int j, std::vector<double> &values) const;
47  void precip_time_series_impl(int i, int j, std::vector<double> &values) const;
48 
49  std::shared_ptr<array::Forcing> m_precipitation;
50  std::shared_ptr<array::Forcing> m_air_temp;
51 };
52 
53 } // end of namespace atmosphere
54 } // end of namespace pism
55 
56 #endif /* _PAGIVEN_H_ */
A purely virtual class defining the interface of a PISM Atmosphere Model.
void end_pointwise_access_impl() const
void update_impl(const Geometry &geometry, double t, double dt)
Definition: GivenClimate.cc:90
std::shared_ptr< array::Forcing > m_air_temp
Definition: GivenClimate.hh:50
void init_impl(const Geometry &geometry)
Definition: GivenClimate.cc:74
void precip_time_series_impl(int i, int j, std::vector< double > &values) const
std::shared_ptr< array::Forcing > m_precipitation
Definition: GivenClimate.hh:49
virtual ~Given()=default
void init_timeseries_impl(const std::vector< double > &ts) const
const array::Scalar & precipitation_impl() const
void temp_time_series_impl(int i, int j, std::vector< double > &values) const
const array::Scalar & air_temperature_impl() const
void begin_pointwise_access_impl() const
Given(std::shared_ptr< const Grid > g)
Definition: GivenClimate.cc:30
static const double g
Definition: exactTestP.cc:36