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

◆ read_valid_range()

void pism::io::read_valid_range ( const File file,
const std::string &  name,
VariableMetadata variable 
)

Read the valid range information from a file.

Reads valid_min, valid_max and valid_range attributes; if valid_range is found, sets the pair valid_min and valid_max instead.

Definition at line 1297 of file io_helpers.cc.

References pism::RuntimeError::add_context(), pism::File::filename(), pism::VariableMetadata::get_string(), pism::VariableMetadata::has_attribute(), pism::File::read_double_attribute(), pism::File::read_text_attribute(), and pism::VariableMetadata::unit_system().

Referenced by regrid_spatial_variable().