PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ Forcing() [1/2]

pism::array::Forcing::Forcing ( std::shared_ptr< const Grid grid,
const File file,
const std::string &  short_name,
const std::string &  standard_name,
unsigned int  max_buffer_size,
bool  periodic,
InterpolationType  interpolation_type = PIECEWISE_CONSTANT 
)

Allocate an instance that will be used to load and use a forcing field from a file.

Checks the number of records in a file and allocates storage accordingly.

If periodic is true, allocate enough storage to hold all the records, otherwise allocate storage for at most max_buffer_size records.

Parameters
[in]gridcomputational grid
[in]fileinput file
[in]short_namevariable name in file
[in]standard_namestandard name (if available); leave blank to ignore
[in]max_buffer_sizemaximum buffer size for non-periodic fields
[in]periodictrue if this forcing field should be interpreted as periodic
[in]interpolation_typetype of temporal interpolation (LINEAR or PIECEWISE_CONSTANT)

Definition at line 112 of file Forcing.cc.

References allocate(), buffer_size(), pism::array::Array::grid(), pism::LINEAR, pism::array::max(), pism::array::min(), and pism::File::nrecords().

Referenced by Constant().