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/Config.hh"
25#include "pism/util/Grid.hh"
26#include "pism/util/Logger.hh"
32 std::shared_ptr<AtmosphereModel> in)
42 Z =
m_config->get_number(
"atmosphere.orographic_precipitation.grid_size_factor"),
73 m_log->message(2,
"* Initializing the atmosphere model computing precipitation using the\n"
74 " Linear Theory of Orographic Precipitation model with scalar wind speeds...\n");
77 "A Linear Theory of Orographic Precipitation. J. Atmos. Sci. 61, 1377-1391.";
104 double water_density =
m_config->get_number(
"constants.fresh_water.density");
109 std::vector<double> &result)
const {
112 result[
k] = (*m_precipitation)(i, j);
std::shared_ptr< const Grid > grid() const
std::shared_ptr< const Config > m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
std::shared_ptr< const Logger > m_log
logger (for easy access)
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)