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

◆ regrid() [1/2]

void pism::IceModelVec::regrid ( const File file,
RegriddingFlag  flag,
double  default_value = 0.0 
)

Read a field from a file, interpolating onto the current grid.

When flag is set to CRITICAL, stop if could not find the variable in the provided input file; default_value is ignored.

When flag is set to OPTIONAL, fill this IceModelVec with default_value if could not find the variable in the provided input file.

When flag is set to CRITICAL_FILL_MISSING, replace missing values matching the _FillValue attribute with default_value, stop if could not find the variable.

When flag is set to OPTIONAL_FILL_MISSING, replace missing values matching the _FillValue attribute with default_value; fill the whole IceModelVec with default_value if could not find the variable.

Parameters
fileinput file
flagregridding mode, see above
default_valuedefault value, meaning depends on the regridding mode flag
Returns
0 on success

Definition at line 876 of file iceModelVec.cc.

References pism::end_time(), pism::get_time(), pism::IceModelVec::Impl::grid, inc_state_counter(), m_impl, pism::IceModelVec::Impl::name, regrid_impl(), pism::start_time(), and pism::timestamp().