20 #include "pism/coupler/ocean/sea_level/Initialization.hh"
22 #include "pism/coupler/util/init_step.hh"
29 std::shared_ptr<SeaLevel> in)
47 m_log->message(2,
"* Reading effective sea level forcing from '%s' for re-starting...\n",
51 const unsigned int time_length = file.
nrecords();
52 const unsigned int last_record = time_length > 0 ? time_length - 1 : 0;
58 m_log->message(2,
"* Performing a 'fake' sea level forcing time-step for bootstrapping...\n");
const Time & time() const
const Config::ConstPtr m_config
configuration database used by this component
const Logger::ConstPtr m_log
logger (for easy access)
@ 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)
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 define(const File &file, io::Type default_type) const
Define variables corresponding to an Array in a file opened using file.
void write(const std::string &filename) const
SpatialVariableMetadata & metadata(unsigned int N=0)
Returns a reference to the SpatialVariableMetadata 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)
void write_model_state_impl(const File &output) const
The default (empty implementation).
void define_model_state_impl(const File &output) const
The default (empty implementation).
void init_impl(const Geometry &geometry)
void update_impl(const Geometry &geometry, double t, double dt)
std::shared_ptr< SeaLevel > m_input_model
array::Scalar m_sea_level
virtual void update_impl(const Geometry &geometry, double t, double dt)
@ PISM_READONLY
open an existing file for reading only
bool ocean(int M)
An ocean cell (floating ice or ice-free).
InputOptions process_input_options(MPI_Comm com, Config::ConstPtr config)
void init_step(M *model, const Geometry &geometry, const Time &time)