PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches

◆ regrid_spatial_variable()

void pism::io::regrid_spatial_variable ( const VariableMetadata variable,
const Grid target_grid,
const LocalInterpCtx interp_context,
const File file,
const Logger log,
double output 
)

Regrid from a NetCDF file into a distributed array output.

  • if flag is CRITICAL or CRITICAL_FILL_MISSING, stops if the variable was not found in the input file
  • if flag is one of CRITICAL_FILL_MISSING and OPTIONAL_FILL_MISSING, replace _FillValue with default_value.
  • sets v to default_value if flag is OPTIONAL and the variable was not found in the input file
  • uses the last record in the file

Definition at line 414 of file input_helpers.cc.

References pism::LocalInterpCtx::buffer_size(), check_units(), pism::units::Converter::convert_doubles(), pism::LocalInterpCtx::count, pism::Grid::ctx(), pism::File::find_variable(), pism::VariableMetadata::get_name(), pism::Grid::info(), interpolate(), pism::File::name(), read_distributed_array(), pism::File::read_text_attribute(), pism::LocalInterpCtx::start, pism::VariableMetadata::unit_system(), pism::Grid::xm(), pism::Grid::ym(), and pism::LocalInterpCtx::z.

Referenced by pism::InputInterpolation3D::regrid_impl(), and pism::details::regrid_layer_thickness().