19 #include "pism/coupler/atmosphere/OrographicPrecipitation.hh"
21 #include "pism/coupler/atmosphere/OrographicPrecipitationSerial.hh"
22 #include "pism/coupler/util/options.hh"
23 #include "pism/geometry/Geometry.hh"
24 #include "pism/util/ConfigInterface.hh"
25 #include "pism/util/Grid.hh"
28 namespace atmosphere {
31 std::shared_ptr<AtmosphereModel> in)
41 Z =
m_config->get_number(
"atmosphere.orographic_precipitation.grid_size_factor"),
72 m_log->message(2,
"* Initializing the atmosphere model computing precipitation using the\n"
73 " Linear Theory of Orographic Precipitation model with scalar wind speeds...\n");
76 "A Linear Theory of Orographic Precipitation. J. Atmos. Sci. 61, 1377-1391.";
103 double water_density =
m_config->get_number(
"constants.fresh_water.density");
108 std::vector<double> &result)
const {
111 result[
k] = (*m_precipitation)(i, j);
std::shared_ptr< const Grid > grid() const
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_surface_elevation
void failed()
Indicates a failure of a parallel section.
void put_on_proc0(petsc::Vec &onp0) const
Puts a local array::Scalar on processor 0.
std::shared_ptr< AtmosphereModel > m_input_model
static std::shared_ptr< array::Scalar > allocate_precipitation(std::shared_ptr< const Grid > grid)
std::vector< double > m_ts_times
A purely virtual class defining the interface of a PISM Atmosphere Model.
void update_impl(const Geometry &geometry, double t, double dt)
void end_pointwise_access_impl() const
virtual ~OrographicPrecipitation()
std::shared_ptr< petsc::Vec > m_work0
std::unique_ptr< OrographicPrecipitationSerial > m_serial_model
Serial orographic precipitation model.
const array::Scalar & precipitation_impl() const
void precip_time_series_impl(int i, int j, std::vector< double > &values) const
void begin_pointwise_access_impl() const
std::shared_ptr< array::Scalar > m_precipitation
OrographicPrecipitation(std::shared_ptr< const Grid > g, std::shared_ptr< AtmosphereModel > in)
void init_impl(const Geometry &geometry)
#define PISM_CHK(errcode, name)