20#include "pism/coupler/ocean/sea_level/Initialization.hh"
22#include "pism/coupler/util/init_step.hh"
23#include "pism/util/Logger.hh"
24#include "pism/util/io/IO_Flags.hh"
31 std::shared_ptr<SeaLevel> in)
49 m_log->message(2,
"* Reading effective sea level forcing from '%s' for re-starting...\n",
53 const unsigned int time_length = file.
nrecords();
54 const unsigned int last_record = time_length > 0 ? time_length - 1 : 0;
60 m_log->message(2,
"* Performing a 'fake' sea level forcing time-step for bootstrapping...\n");
const Time & time() const
std::shared_ptr< const Config > m_config
configuration database used by this component
@ REGRID_WITHOUT_REGRID_VARS
const std::shared_ptr< const Grid > m_grid
grid used by this component
void regrid(const std::string &module_name, array::Array &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)
std::shared_ptr< const Logger > m_log
logger (for easy access)
unsigned int nrecords() const
Get the number of records. Uses the length of an unlimited dimension.
High-level PISM I/O class.
void copy_from(const Array2D< T > &source)
void read(const std::string &filename, unsigned int time)
void write(const OutputFile &file) const
VariableMetadata & metadata(unsigned int N=0)
Returns a reference to the VariableMetadata object containing metadata for the compoment N.
const array::Scalar & sea_level_elevation_impl() const
InitializationHelper(std::shared_ptr< const Grid > g, std::shared_ptr< SeaLevel > in)
std::set< VariableMetadata > state_impl() const
void init_impl(const Geometry &geometry)
void update_impl(const Geometry &geometry, double t, double dt)
void write_state_impl(const OutputFile &output) const
The default (empty implementation).
std::shared_ptr< SeaLevel > m_input_model
array::Scalar m_sea_level
virtual void update_impl(const Geometry &geometry, double t, double dt)
std::set< VariableMetadata > metadata(std::initializer_list< const Array * > vecs)
@ PISM_READONLY
open an existing file for reading only
bool ocean(int M)
An ocean cell (floating ice or ice-free).
void init_step(M *model, const In &inputs, const Time &time)
T combine(const T &a, const T &b)
InputOptions process_input_options(MPI_Comm com, std::shared_ptr< const Config > config)