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

◆ regrid() [1/2]

void pism::array::Array::regrid ( const File file,
io::Default  default_value 
)

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 Array 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 Array 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 844 of file Array.cc.

References pism::RuntimeError::add_context(), pism::end_time(), pism::File::filename(), get_name(), pism::get_time(), pism::array::Array::Impl::grid, inc_state_counter(), m_impl, pism::array::Array::Impl::name, regrid_impl(), pism::start_time(), and pism::timestamp().