PISM, A Parallel Ice Sheet Model  stable v2.0.4 committed by Constantine Khrulev on 2022-05-25 12:02:27 -0800

◆ ForcingField()

std::shared_ptr< IceModelVec2T > pism::IceModelVec2T::ForcingField ( IceGrid::ConstPtr  grid,
const File file,
const std::string &  short_name,
const std::string &  standard_name,
int  max_buffer_size,
bool  periodic,
InterpolationType  interpolation_type = PIECEWISE_CONSTANT 
)
static

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

Definition at line 109 of file iceModelVec2T.cc.

References buffer_size(), pism::IceModelVec::grid(), pism::LINEAR, pism::max(), pism::min(), and pism::File::nrecords().

Referenced by pism::atmosphere::Anomaly::Anomaly(), pism::ocean::Anomaly::Anomaly(), pism::surface::Anomaly::Anomaly(), pism::calving::CalvingAtThickness::CalvingAtThickness(), pism::ocean::sea_level::Delta_SL_2D::Delta_SL_2D(), pism::atmosphere::ElevationChange::ElevationChange(), pism::surface::ElevationChange::ElevationChange(), pism::atmosphere::Frac_P::Frac_P(), pism::atmosphere::Given::Given(), pism::ocean::Given::Given(), pism::surface::Given::Given(), pism::bed::Given::Given(), pism::ocean::GivenTH::GivenTH(), pism::IceModel::IceModel(), pism::frontalmelt::DischargeGiven::init_impl(), pism::frontalmelt::DischargeRouting::init_impl(), pism::frontalmelt::Given::init_impl(), pism::surface::ISMIP6::ISMIP6(), pism::MohrCoulombYieldStress::MohrCoulombYieldStress(), pism::ocean::Pico::Pico(), pism::PrescribedRetreat::PrescribedRetreat(), and pism::surface::TemperatureIndex::TemperatureIndex().