21 #include "pism/util/error_handling.hh"
22 #include "pism/util/pism_utilities.hh"
23 #include "pism/util/io/File.hh"
24 #include "pism/coupler/util/init_step.hh"
25 #include "pism/util/Context.hh"
32 m_mass_flux(m_grid,
"effective_climatic_mass_balance",
WITHOUT_GHOSTS),
33 m_temperature(m_grid,
"effective_ice_surface_temp",
WITHOUT_GHOSTS)
43 "surface mass balance (accumulation/ablation) rate, as seen by the ice dynamics code (used for restarting)",
44 "kg m-2 s-1",
"kg m-2 year-1",
"", 0);
48 "temperature of the ice at the ice surface but below firn processes, as seen by the ice dynamics code (used for restarting)",
49 "Kelvin",
"Kelvin",
"", 0);
55 "liquid water fraction of the ice at the top surface, as seen by the ice dynamics code (used for restarting)",
60 m_layer_mass->metadata().set_name(
"effective_surface_layer_mass");
62 "mass held in the surface layer, as seen by the ice dynamics code (used for restarting)",
70 "thickness of the surface layer, as seen by the ice dynamics code (used for restarting)",
71 "meters",
"meters",
"", 0);
101 m_log->message(2,
"* Reading effective surface model outputs from '%s' for re-starting...\n",
105 const unsigned int last_record = file.
nrecords() - 1;
107 v->read(file, last_record);
110 m_log->message(2,
"* Performing a 'fake' surface model time-step for bootstrapping...\n");
IceGrid::ConstPtr grid() 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
virtual void regrid(const std::string &module_name, IceModelVec &variable, RegriddingFlag flag=NO_REGRID_WITHOUT_REGRID_VARS)
const IceGrid::ConstPtr m_grid
grid used by this component
unsigned int nrecords() const
Get the number of records. Uses the length of an unlimited dimension.
High-level PISM I/O class.
std::shared_ptr< const IceGrid > ConstPtr
void copy_from(const IceModelVec2S &source)
void set_attrs(const std::string &pism_intent, const std::string &long_name, const std::string &units, const std::string &glaciological_units, const std::string &standard_name, unsigned int component)
Sets NetCDF attributes of an IceModelVec object.
void set_time_independent(bool flag)
Set the time independent flag for all variables corresponding to this IceModelVec instance.
const IceModelVec2S & runoff_impl() const
void init_impl(const Geometry &geometry)
IceModelVec2S m_mass_flux
InitializationHelper(IceGrid::ConstPtr g, std::shared_ptr< SurfaceModel > in)
void update_impl(const Geometry &geometry, double t, double dt)
const IceModelVec2S & accumulation_impl() const
const IceModelVec2S & melt_impl() const
const IceModelVec2S & temperature_impl() const
const IceModelVec2S & liquid_water_fraction_impl() const
const IceModelVec2S & layer_mass_impl() const
std::vector< IceModelVec * > m_variables
void write_model_state_impl(const File &output) const
The default (empty implementation).
const IceModelVec2S & mass_flux_impl() const
const IceModelVec2S & layer_thickness_impl() const
void define_model_state_impl(const File &output) const
The default (empty implementation).
IceModelVec2S m_temperature
IceModelVec2S::Ptr m_liquid_water_fraction
static IceModelVec2S::Ptr allocate_liquid_water_fraction(IceGrid::ConstPtr grid)
IceModelVec2S::Ptr m_melt
static IceModelVec2S::Ptr allocate_melt(IceGrid::ConstPtr grid)
IceModelVec2S::Ptr m_layer_mass
IceModelVec2S::Ptr m_accumulation
std::shared_ptr< SurfaceModel > m_input_model
static IceModelVec2S::Ptr allocate_accumulation(IceGrid::ConstPtr grid)
static IceModelVec2S::Ptr allocate_layer_mass(IceGrid::ConstPtr grid)
static IceModelVec2S::Ptr allocate_runoff(IceGrid::ConstPtr grid)
IceModelVec2S::Ptr m_runoff
IceModelVec2S::Ptr m_layer_thickness
static IceModelVec2S::Ptr allocate_layer_thickness(IceGrid::ConstPtr grid)
The interface of PISM's surface models.
#define PISM_ERROR_LOCATION
InputOptions process_input_options(MPI_Comm com, Config::ConstPtr config)
@ PISM_READONLY
open an existing file for reading only
void init_step(M *model, const Geometry &geometry, const Time &time)