20 #include "pism/coupler/ocean/Initialization.hh"
21 #include "pism/util/io/io_helpers.hh"
22 #include "pism/util/io/File.hh"
23 #include "pism/coupler/util/init_step.hh"
58 m_log->message(2,
"* Reading effective ocean model outputs from '%s' for re-starting...\n",
62 const unsigned int time_length = file.
nrecords();
63 const unsigned int last_record = time_length > 0 ? time_length - 1 : 0;
71 m_log->message(2,
"* Performing a 'fake' ocean model 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.
const array::Scalar & shelf_base_mass_flux_impl() const
const array::Scalar & average_water_column_pressure_impl() const
void update_impl(const Geometry &geometry, double t, double dt)
std::shared_ptr< array::Scalar > m_shelf_base_mass_flux
void write_model_state_impl(const File &output) const
The default (empty implementation).
void init_impl(const Geometry &geometry)
void define_model_state_impl(const File &output) const
The default (empty implementation).
InitializationHelper(std::shared_ptr< const Grid > g, std::shared_ptr< OceanModel > in)
const array::Scalar & shelf_base_temperature_impl() const
std::shared_ptr< array::Scalar > m_shelf_base_temperature
std::shared_ptr< OceanModel > m_input_model
std::shared_ptr< array::Scalar > m_water_column_pressure
static std::shared_ptr< array::Scalar > allocate_shelf_base_temperature(std::shared_ptr< const Grid > g)
static std::shared_ptr< array::Scalar > allocate_shelf_base_mass_flux(std::shared_ptr< const Grid > g)
static std::shared_ptr< array::Scalar > allocate_water_column_pressure(std::shared_ptr< const Grid > g)
virtual void update_impl(const Geometry &geometry, double t, double dt)
A very rudimentary PISM ocean model.
@ 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)