Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ init_from_file()

void pism::Time::init_from_file ( MPI_Comm  com,
const std::string &  filename,
const Logger log,
bool  set_start_time 
)
protected

Sets the time from a NetCDF file with a time dimension (-time_file).

Sets

  • calendar
  • reference date
  • start time
  • current time
  • end time

This allows running PISM for the duration of the available forcing.

Definition at line 759 of file Time.cc.

References pism::RuntimeError::add_context(), pism::units::Unit::format(), init_calendar(), m_config, m_time_units, m_unit_system, pism::Logger::message(), pism::io::PISM_NETCDF3, pism::io::PISM_READONLY, pism::io::read_1d_variable(), pism::io::read_bounds(), pism::File::read_text_attribute(), pism::reference_date_from_file(), set(), set_end(), and set_start().

Referenced by Time().