PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ 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 764 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::File::read_text_attribute(), pism::io::read_time_bounds(), pism::io::read_timeseries(), pism::reference_date_from_file(), set(), set_end(), and set_start().

Referenced by Time().