PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
Loading...
Searching...
No Matches

◆ check_consistency_epsg()

void pism::check_consistency_epsg ( const VariableMetadata cf_mapping,
const std::string &  proj_string 
)

Check consistency of the "mapping" variable with the EPSG code in the proj string.

If the consistency check fails, throws RuntimeError explaining the failure. Fails if info.proj does not use an EPSG code.

Definition at line 154 of file projection.cc.

References pism::VariableMetadata::all_doubles(), pism::VariableMetadata::all_strings(), epsg_to_cf(), pism::RuntimeError::formatted(), pism::VariableMetadata::get_number(), pism::VariableMetadata::has_attribute(), PISM_ERROR_LOCATION, and pism::VariableMetadata::unit_system().

Referenced by pism::MappingInfo::FromFile().