PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ model_state_setup()

void pism::IceModel::model_state_setup ( )
protectedvirtual

Sets the starting values of model state variables.

There are two cases:

1) Initializing from a PISM output file.

2) Setting the values using command-line options only (verification and simplified geometry runs, for example) or from a bootstrapping file, using heuristics to fill in missing and 3D fields.

Calls IceModel::regrid().

This function is called after all the memory allocation is done and all the physical parameters are set.

Calling this method should be all one needs to set model state variables. Please avoid modifying them in other parts of the initialization sequence.

Also, please avoid operations that would make it unsafe to call this more than once (memory allocation is one example).

Reimplemented in pism::IceRegionalModel.

Definition at line 123 of file initialization.cc.

References pism::args_string(), pism::array::Scalar::as_int(), bootstrap_2d(), compute_lat_lon(), pism::array::Array2D< T >::copy_from(), enforce_consistency_of_geometry(), pism::InputOptions::filename, pism::get_projection_info(), pism::VariableMetadata::get_string(), pism::Geometry::ice_thickness, pism::INIT_BOOTSTRAP, pism::INIT_OTHER, pism::INIT_RESTART, initialize_2d(), m_age_model, m_basal_melt_rate, m_basal_yield_stress, m_basal_yield_stress_model, m_beddef, m_btu, m_config, m_ctx, m_energy_model, m_geometry, m_grid, m_ice_thickness_bc_mask, m_isochrones, m_log, m_ocean, m_output_global_attributes, m_sea_level, m_stress_balance, m_subglacial_hydrology, m_surface, m_velocity_bc_mask, m_work2d, pism::io::PISM_GUESS, pism::io::PISM_READONLY, prepend_history(), pism::printf(), pism::process_input_options(), pism::MappingInfo::proj, pism::InputOptions::record, regrid(), REMOVE_ICEBERGS, reset_counters(), restart_2d(), pism::array::Array::set(), pism::InputOptions::type, and yield_stress_inputs().

Referenced by init(), and pism::IceRegionalModel::model_state_setup().