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

◆ get_proj_parameters()

static std::string pism::get_proj_parameters ( const File input_file,
const std::string &  mapping_variable_name 
)
static

Get PROJ parameters from the grid mapping variable mapping_variable_name in input_file or from global attributes.

Return the string containing PROJ parameters.

Tries

  • reading the "crs_wkt" attribute of the grid mapping variable (CF conventions)
  • reading the "proj_params" attribute of the grid mapping variable (convention used by CDO)

If failed to discover PROJ parameters, tries global attributes "proj" and "proj4", in this order (PISM's old convention).

Definition at line 269 of file projection.cc.

References contains_epsg(), parse_epsg(), printf(), and pism::File::read_text_attribute().

Referenced by mapping_info_from_file().