PISM, A Parallel Ice Sheet Model stable 0.4.1779
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends

IceModel Class Reference

#include <iceModel.hh>

Inheritance diagram for IceModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IceModel (IceGrid &g, NCConfigVariable &config, NCConfigVariable &overrides)
virtual ~IceModel ()
virtual PetscErrorCode grid_setup ()
 Sets up the computational grid.
virtual PetscErrorCode allocate_submodels ()
 Allocate PISM's sub-models implementing some physical processes.
virtual PetscErrorCode allocate_flowlaw ()
 Decide which ice flow law to use.
virtual PetscErrorCode allocate_enthalpy_converter ()
 Decide which enthalpy converter to use.
virtual PetscErrorCode allocate_basal_resistance_law ()
 Decide which basal resistance law to use.
virtual PetscErrorCode allocate_stressbalance ()
 Decide which stress balance model to use.
virtual PetscErrorCode allocate_bed_deformation ()
virtual PetscErrorCode allocate_bedrock_thermal_unit ()
 Decide which bedrock thermal unit to use.
virtual PetscErrorCode allocate_basal_yield_stress ()
 Decide which basal yield stress model to use.
virtual PetscErrorCode init_couplers ()
 Initializes atmosphere and ocean couplers.
virtual PetscErrorCode set_grid_from_options ()
 Initalizes the grid from options.
virtual PetscErrorCode set_grid_defaults ()
 Set default values of grid parameters.
virtual PetscErrorCode model_state_setup ()
 Sets the starting values of model state variables.
virtual PetscErrorCode set_vars_from_options ()
 Sets starting values of model state variables using command-line options.
virtual PetscErrorCode allocate_internal_objects ()
 Allocates work vectors.
virtual PetscErrorCode misc_setup ()
 Miscellaneous initialization tasks plus tasks that need the fields that can come from regridding.
virtual PetscErrorCode init_diagnostics ()
virtual PetscErrorCode init_ocean_kill ()
 Initialize the mask used by the -ocean_kill code.
PetscErrorCode init ()
 Manage the initialization of the IceModel object.
virtual PetscErrorCode run ()
 Do the time-stepping for an evolution run.
virtual PetscErrorCode step (bool do_mass_continuity, bool do_energy, bool do_age, bool do_skip, bool use_ssa_when_grounded)
 Do the contents of the main PISM time-step.
virtual PetscErrorCode setExecName (const char *my_executable_short_name)
virtual IceFlowLawFactorygetIceFlowLawFactory ()
virtual IceFlowLawgetIceFlowLaw ()
virtual void reset_counters ()
virtual PetscErrorCode bootstrapFromFile (const char *fname)
 Read file and use heuristics to initialize PISM from typical 2d data available through remote sensing.
virtual PetscErrorCode bootstrap_2d (const char *fname)
virtual PetscErrorCode bootstrap_3d ()
virtual PetscErrorCode putTempAtDepth ()
 Create a temperature field within ice and bedrock from given surface temperature and geothermal flux maps.
virtual PetscErrorCode setFromOptions ()
 Read runtime (command line) options and alter the corresponding parameters or flags as appropriate.
virtual PetscErrorCode set_output_size (string option, string description, string default_value, set< string > &result)
 Assembles a list of variables corresponding to an output file size.
virtual void attach_surface_model (PISMSurfaceModel *surf)
virtual void attach_ocean_model (PISMOceanModel *ocean)
virtual PetscErrorCode additionalAtStartTimestep ()
 Virtual. Does nothing in IceModel. Derived classes can do more computation in each time step.
virtual PetscErrorCode additionalAtEndTimestep ()
 Virtual. Does nothing in IceModel. Derived classes can do more computation in each time step.
virtual PetscErrorCode compute_cell_areas ()
virtual PetscErrorCode initFromFile (const char *)
 Read a saved PISM model state in NetCDF format, for complete initialization of an evolution or diagnostic run.
virtual PetscErrorCode writeFiles (const char *default_filename)
 Save model state in NetCDF format.
virtual PetscErrorCode write_model_state (const char *filename)
virtual PetscErrorCode write_metadata (const char *filename)
 Write metadata (global attributes, overrides and mapping parameters) to a file.
virtual PetscErrorCode write_variables (const char *filename, set< string > vars, nc_type nctype)
 Writes variables listed in vars to filename, using nctype to write fields stored in dedicated IceModelVecs.

Protected Member Functions

virtual PetscErrorCode createVecs ()
 Allocate all IceModelVecs defined in IceModel.
virtual PetscErrorCode deallocate_internal_objects ()
 De-allocate internal objects.
virtual PetscErrorCode computeMax3DVelocities ()
 Compute the maximum velocities for time-stepping and reporting to user.
virtual PetscErrorCode computeMax2DSlidingSpeed ()
 Compute the CFL constant associated to first-order upwinding for the sliding contribution to mass continuity.
virtual PetscErrorCode adaptTimeStepDiffusivity ()
 Compute the maximum time step allowed by the diffusive SIA.
virtual PetscErrorCode determineTimeStep (const bool doTemperatureCFL)
 Use various stability criteria to determine the time step for an evolution run.
virtual PetscErrorCode countCFLViolations (PetscScalar *CFLviol)
 Because of the -skip mechanism it is still possible that we can have CFL violations: count them.
virtual PetscErrorCode ageStep ()
 Take a semi-implicit time-step for the age equation.
virtual PetscErrorCode bed_def_step (bool &bed_changed)
virtual PetscErrorCode eigenCalving ()
 Uses principal strain rates to apply "eigencalving" with constant K.
virtual PetscErrorCode calvingAtThickness ()
PetscErrorCode setDefaults ()
 Assigns default values to the many parameters and flags in IceModel.
virtual PetscErrorCode energyStep ()
 Manage the solution of the energy equation, and related parallel communication.
virtual PetscErrorCode get_bed_top_temp (IceModelVec2S &result)
 Extract from enthalpy field (Enth3) the temperature which the top of the bedrock thermal layer will see.
virtual bool checkThinNeigh (PetscScalar E, PetscScalar NE, PetscScalar N, PetscScalar NW, PetscScalar W, PetscScalar SW, PetscScalar S, PetscScalar SE)
 Is one of my neighbors below a critical thickness to apply advection in enthalpy or temperature equation?
virtual PetscErrorCode compute_enthalpy_cold (IceModelVec3 &temperature, IceModelVec3 &result)
 Compute Enth3 from temperature T3 by assuming the ice has zero liquid fraction.
virtual PetscErrorCode compute_enthalpy (IceModelVec3 &temperature, IceModelVec3 &liquid_water_fraction, IceModelVec3 &result)
 Compute Enth3 from temperature T3 and liquid fraction.
virtual PetscErrorCode compute_liquid_water_fraction (IceModelVec3 &enthalpy, IceModelVec3 &result)
 Compute the liquid fraction corresponding to Enth3, and put in a global IceModelVec3 provided by user.
virtual PetscErrorCode setCTSFromEnthalpy (IceModelVec3 &useForCTS)
 Compute the CTS field, CTS = E/E_s(p), from Enth3, and put in a global IceModelVec3 provided by user.
virtual PetscErrorCode getEnthalpyCTSColumn (PetscScalar p_air, PetscScalar thk, PetscInt ks, const PetscScalar *Enth, const PetscScalar *w, PetscScalar *lambda, PetscScalar **Enth_s)
 Compute the CTS value of enthalpy in an ice column, and the lambda for BOMBPROOF.
virtual PetscErrorCode enthalpyAndDrainageStep (PetscScalar *vertSacrCount, PetscScalar *liquifiedVol, PetscScalar *bulgeCount)
 Update ice enthalpy field based on conservation of energy.
virtual PetscErrorCode updateSurfaceElevationAndMask ()
 Update the surface elevation and the flow-type mask when the geometry has changed.
virtual PetscErrorCode update_mask ()
virtual PetscErrorCode update_surface_elevation ()
virtual PetscErrorCode massContExplicitStep ()
 Update the thickness from the diffusive flux and sliding velocity, and the surface and basal mass balance rates.
virtual PetscErrorCode killIceBergs ()
 Identify and eliminate free-floating icebergs, which cause well-posedness (invertibility) problems for stress solvers.
virtual PetscErrorCode findIceBergCandidates ()
 This routine comes from PISM-PIK.
virtual PetscErrorCode identifyNotAnIceBerg ()
virtual PetscErrorCode killIdentifiedIceBergs ()
virtual PetscErrorCode killEasyIceBergs ()
virtual PetscErrorCode set_time_from_options ()
 Determine the run length, starting and ending years using command-line options.
virtual PetscErrorCode dumpToFile (const char *filename)
virtual PetscErrorCode regrid (int dimensions)
 Manage regridding based on user options. Call IceModelVec::regrid() to do each selected variable.
virtual PetscErrorCode regrid_variables (string filename, set< string > regrid_vars, int ndims)
PetscErrorCode cell_interface_velocities (bool do_part_grid, int i, int j, planeStar< PetscScalar > &vel_output)
 Compute staggered grid velocities according to mask and regular grid velocities.
PetscReal get_average_thickness (bool do_redist, planeStar< int > M, planeStar< PetscScalar > H)
 For ice-free (or partially-filled) cells adjacent to "full" floating cells, update Href.
virtual PetscErrorCode redistResiduals ()
 Redistribute residual ice mass from subgrid-scale parameterization, when using -part_redist option.
virtual PetscErrorCode calculateRedistResiduals ()
virtual PetscErrorCode volumeArea (PetscScalar &gvolume, PetscScalar &garea, PetscScalar &gvolSIA, PetscScalar &gvolstream, PetscScalar &gvolshelf)
 Computes volume and area of ice sheet, for reporting purposes.
virtual PetscErrorCode energyStats (PetscScalar iarea, PetscScalar &gmeltfrac, PetscScalar &gtemp0)
virtual PetscErrorCode ageStats (PetscScalar ivol, PetscScalar &gorigfrac)
virtual PetscErrorCode summary (bool tempAndAge)
virtual PetscErrorCode summaryPrintLine (PetscTruth printPrototype, bool tempAndAge, PetscScalar year, PetscScalar delta_t, PetscScalar volume, PetscScalar area, PetscScalar meltfrac, PetscScalar H0, PetscScalar T0)
 Print a line to stdout which summarizes the state of the modeled ice sheet at the end of the time step.
virtual PetscErrorCode ice_mass_bookkeeping ()
virtual PetscErrorCode compute_ice_volume (PetscScalar &result)
 Computes the ice volume, in m^3.
virtual PetscErrorCode compute_ice_volume_temperate (PetscScalar &result)
 Computes the temperate ice volume, in m^3.
virtual PetscErrorCode compute_ice_volume_cold (PetscScalar &result)
 Computes the cold ice volume, in m^3.
virtual PetscErrorCode compute_ice_area (PetscScalar &result)
 Computes ice area, in m^2.
virtual PetscErrorCode compute_ice_area_temperate (PetscScalar &result)
 Computes temperate ice area, in m^2.
virtual PetscErrorCode compute_ice_area_cold (PetscScalar &result)
 Computes cold ice area, in m^2.
virtual PetscErrorCode compute_ice_area_grounded (PetscScalar &result)
 Computes grounded ice area, in m^2.
virtual PetscErrorCode compute_ice_area_floating (PetscScalar &result)
 Computes floating ice area, in m^2.
virtual PetscErrorCode compute_ice_enthalpy (PetscScalar &result)
 Computes the total ice enthalpy in J.
virtual PetscErrorCode compute_by_name (string name, PetscScalar &result)
 Compute a scalar diagnostic quantity by name.
virtual PetscErrorCode excessToFromBasalMeltLayer (const PetscScalar rho_c, const PetscScalar z, const PetscScalar dz, PetscScalar *Texcess, PetscScalar *Hmelt)
 Compute the melt water which should go to the base if $T$ is above pressure-melting.
virtual PetscErrorCode temperatureStep (PetscScalar *vertSacrCount, PetscScalar *bulgeCount)
 Takes a semi-implicit time-step for the temperature equation.
virtual int endOfTimeStepHook ()
 Catch signals -USR1, -USR2 and -TERM.
virtual PetscErrorCode stampHistoryCommand ()
 Build a history string from the command which invoked PISM.
virtual PetscErrorCode stampHistoryEnd ()
virtual PetscErrorCode stampHistory (string)
 Get time and user/host name and add it to the given string.
virtual PetscErrorCode check_maximum_thickness ()
 Check if the thickness of the ice is too large and extend the grid if necessary.
virtual PetscErrorCode check_maximum_thickness_hook (const int old_Mz)
 Allows derived classes to extend their own IceModelVec3's in vertical.
virtual bool issounding (const PetscInt i, const PetscInt j)
PetscErrorCode init_snapshots ()
 Initializes the snapshot-saving mechanism.
PetscErrorCode write_snapshot ()
 Writes a snapshot of the model state (if necessary)
PetscErrorCode init_timeseries ()
 Initializes the code writing scalar time-series.
PetscErrorCode create_timeseries ()
 Creates DiagnosticTimeseries objects used to store and report scalar diagnostic quantities.
PetscErrorCode flush_timeseries ()
 Flush scalar time-series.
PetscErrorCode write_timeseries ()
 Write time-series.
PetscErrorCode ts_max_timestep (double t_years, double &dt_years)
 Computes the maximum time-step we can take and still hit all the requested years.
PetscErrorCode init_extras ()
 Initialize the code saving spatially-variable diagnostic quantities.
PetscErrorCode write_extras ()
 Write spatially-variable diagnostic quantities.
PetscErrorCode extras_max_timestep (double t_years, double &dt_years)
 Computes the maximum time-step we can take and still hit all the requested years.
PetscErrorCode init_backups ()
 Initialize the backup (snapshot-on-wallclock-time) mechanism.
PetscErrorCode write_backup ()
 Write a backup (i.e. an intermediate result of a run).
virtual PetscErrorCode init_viewers ()
 Initialize run-time diagnostic viewers.
virtual PetscErrorCode update_viewers ()
 Update the runtime graphical viewers.

Protected Attributes

IceGrid & grid
NCConfigVariable mapping
 grid projection (mapping) parameters
NCConfigVariable & config
 configuration flags and parameters
NCConfigVariable & overrides
 flags and parameters overriding config, see -config_override
NCGlobalAttributes global_attributes
IceFlowLawFactory iceFactory
IceFlowLawice
PISMYieldStressbasal_yield_stress
IceBasalResistancePlasticLawbasal
EnthalpyConverterEC
PISMBedThermalUnitbtu
PISMSurfaceModelsurface
PISMOceanModelocean
PISMBedDefbeddef
PISMVars variables
 A dictionary with pointers to IceModelVecs below, for passing them from the IceModel core to other components (such as surface and ocean models)
IceModelVec2S vh
 ice surface elevation; ghosted
IceModelVec2S vH
 ice thickness; ghosted
IceModelVec2S vdHdt
 $ \frac{dH}{dt} $; ghosted to simplify the code computing it
IceModelVec2S vtauc
 yield stress for basal till (plastic or pseudo-plastic model); ghosted
IceModelVec2S vHmelt
 thickness of the basal meltwater; ghosted (because of the diffusion)
IceModelVec2S vbmr
 rate of production of basal meltwater (ice-equivalent); no ghosts
IceModelVec2S vLongitude
 Longitude; ghosted to compute cell areas.
IceModelVec2S vLatitude
 Latitude; ghosted to compute cell areas.
IceModelVec2S vbed
 bed topography; ghosted
IceModelVec2S vuplift
 bed uplift rate; ghosted to simplify the code computing it
IceModelVec2S vGhf
 geothermal flux; no ghosts
IceModelVec2S bedtoptemp
IceModelVec2S vHref
 accumulated mass advected to a partially filled grid cell
IceModelVec2S vHresidual
 residual ice mass of a not any longer partially (fully) filled grid cell
IceModelVec2S vPrinStrain1
 major principal component of horizontal strain-rate tensor
IceModelVec2S vPrinStrain2
 minor principal component of horizontal strain-rate tensor
IceModelVec2S acab
 accumulation/ablation rate; no ghosts
IceModelVec2S artm
 ice temperature at the ice surface but below firn; no ghosts
IceModelVec2S liqfrac_surface
 ice liquid water fraction at the top surface of the ice
IceModelVec2S shelfbtemp
 ice temperature at the shelf base; no ghosts
IceModelVec2S shelfbmassflux
 ice mass flux into the ocean at the shelf base; no ghosts
IceModelVec2S cell_area
 cell areas (computed using the WGS84 datum)
IceModelVec2Int vMask
 mask for flow type with values ice_free_bedrock, grounded_ice, floating_ice, ice_free_ocean
IceModelVec2Int ocean_kill_mask
 mask used by the -ocean_kill code
IceModelVec2Int vIcebergMask
 mask for iceberg identification
IceModelVec2Int vBCMask
 mask to determine Dirichlet boundary locations
IceModelVec2V vBCvel
 Dirichlet boundary velocities.
IceModelVec3 T3
 absolute temperature of ice; K (ghosted)
IceModelVec3 Enth3
 enthalpy; J / kg (ghosted)
IceModelVec3 tau3
 age of ice; s (ghosted because it is evaluated on the staggered-grid)
PetscReal dt
 mass continuity time step, s
PetscReal t_years_TempAge
 time of last update for enthalpy/temperature
PetscReal dt_years_TempAge
 enthalpy/temperature and age time-steps
PetscReal maxdt_temporary
PetscReal dt_force
PetscReal CFLviolcount
 really is just a count, but PetscGlobalSum requires this type
PetscReal dt_from_diffus
PetscReal dt_from_cfl
PetscReal CFLmaxdt
PetscReal CFLmaxdt2D
PetscReal gDmax
PetscReal gmaxu
PetscReal gmaxv
PetscReal gmaxw
PetscReal gdHdtav
 average value in map-plane (2D) of dH/dt, where there is ice; m s-1
PetscReal total_sub_shelf_ice_flux
PetscReal total_basal_ice_flux
PetscReal total_surface_ice_flux
PetscReal nonneg_rule_flux
PetscReal ocean_kill_flux
PetscReal float_kill_flux
PetscReal dvoldt
 d(total ice volume)/dt; m3 s-1
PetscInt skipCountDown
PetscScalar standard_gravity
PetscTruth updateHmelt
PetscTruth shelvesDragToo
PetscTruth allowAboveMelting
PetscTruth repeatRedist
PetscTruth putOnTop
char adaptReasonFlag
string stdout_flags
string stdout_ssa
string executable_short_name
PetscScalar last_bed_def_update
IceModelVec2S vWork2d [nWork2d]
IceModelVec2V vWork2dV
IceModelVec3 vWork3d
PISMStressBalancestress_balance
map< string, PISMDiagnostic * > diagnostics
set< stringoutput_vars
string snapshots_filename
bool save_snapshots
bool snapshots_file_is_ready
bool split_snapshots
vector< double > snapshot_times
set< stringsnapshot_vars
unsigned int current_snapshot
bool save_ts
string ts_filename
 true if the user requested time-series output
vector< double > ts_times
 file to write time-series to
unsigned int current_ts
 times requested
set< stringts_vars
 index of the current time
vector< DiagnosticTimeseries * > timeseries
 variables requested
bool save_extra
bool extra_file_is_ready
bool split_extra
string extra_filename
vector< double > extra_times
unsigned int current_extra
set< stringextra_vars
double backup_interval
string backup_filename
PetscReal last_backup_time
set< stringbackup_vars
set< stringmap_viewers
set< stringslice_viewers
set< stringsounding_viewers
PetscInt id
PetscInt jd
map< string, PetscViewer > viewers

Static Protected Attributes

static const PetscInt nWork2d = 2

Private Attributes

PetscLogDouble start_time
int event_step
 total time spent doing time-stepping
int event_velocity
 total velocity computation
int event_energy
 energy balance computation
int event_mass
 mass continuity computation
int event_age
 age computation
int event_beddef
 bed deformation step
int event_output
 time spent writing the output file
int event_snapshots
 time spent writing snapshots
int event_backups
 time spent writing backups files

Friends

class IceModel_hardav
class IceModel_bwp
class IceModel_cts
class IceModel_dhdt
class IceModel_temp
class IceModel_temp_pa
class IceModel_temppabase
class IceModel_enthalpybase
class IceModel_enthalpysurf
class IceModel_tempbase
class IceModel_tempsurf
class IceModel_liqfrac
class IceModel_tempicethk
class IceModel_tempicethk_basal
class IceModel_new_mask

Detailed Description

The base class for PISM. Contains all essential variables, parameters, and flags for modelling an ice sheet.

Definition at line 66 of file iceModel.hh.


Constructor & Destructor Documentation

IceModel ( IceGrid &  g,
NCConfigVariable &  config,
NCConfigVariable &  overrides 
)
~IceModel ( ) [virtual]

Member Function Documentation

PetscErrorCode adaptTimeStepDiffusivity ( ) [protected, virtual]

Compute the maximum time step allowed by the diffusive SIA.

Note adapt_ratio * 2 is multiplied by dx^2/(2*maxD) so dt <= adapt_ratio * dx^2/maxD (if dx=dy)

Reference: [MortonMayers] pp 62--63.

Definition at line 127 of file iMadaptive.cc.

References adaptReasonFlag, config, dt, dt_from_diffus, gDmax, PISMStressBalance::get_max_diffusivity(), grid, skipCountDown, and stress_balance.

Referenced by determineTimeStep().

PetscErrorCode additionalAtEndTimestep ( ) [virtual]

Virtual. Does nothing in IceModel. Derived classes can do more computation in each time step.

Reimplemented in IceCompModel, IcePSTexModel, and IceMISMIPModel.

Definition at line 32 of file iMutil.cc.

Referenced by step().

PetscErrorCode additionalAtStartTimestep ( ) [virtual]

Virtual. Does nothing in IceModel. Derived classes can do more computation in each time step.

Reimplemented in IceCompModel, and IceMISMIPModel.

Definition at line 26 of file iMutil.cc.

Referenced by step().

PetscErrorCode ageStats ( PetscScalar  ivol,
PetscScalar &  gorigfrac 
) [protected, virtual]

Computes fraction of the ice which is as old as the start of the run (original). Communication occurs here.

Definition at line 123 of file iMreport.cc.

References config, e, grid, secpera, tau3, and vH.

Referenced by summary().

PetscErrorCode ageStep ( ) [protected, virtual]

Take a semi-implicit time-step for the age equation.

The age equation is $d\tau/dt = 1$, that is,

\[ \frac{\partial \tau}{\partial t} + u \frac{\partial \tau}{\partial x} + v \frac{\partial \tau}{\partial y} + w \frac{\partial \tau}{\partial z} = 1\]

where $\tau(t,x,y,z)$ is the age of the ice and $(u,v,w)$ is the three dimensional velocity field. This equation is purely advective. And it is hyperbolic.

The boundary condition is that when the ice falls as snow it has age zero. That is, $\tau(t,x,y,h(t,x,y)) = 0$ in accumulation areas, while there is no boundary condition elsewhere, as the characteristics go outward in the ablation zone. (Some more numerical-analytic attention to this is worthwhile.)

If the velocity in the bottom cell of ice is upward (

 (w[i][j][0] > 0 

) then we also apply an age = 0 boundary condition. This is the case where ice freezes on at the base, either grounded basal ice freezing on stored water in till, or marine basal ice.

The numerical method is first-order upwind but the vertical advection term is computed implicitly. (Thus there is no CFL-type stability condition for that part.)

We use a finely-spaced, equally-spaced vertical grid in the calculation. Note that the IceModelVec3 methods getValColumn...() and setValColumn..() interpolate back and forth between the grid on which calculation is done and the storage grid. Thus the storage grid can be either equally spaced or not.

Definition at line 165 of file iMage.cc.

References dt_years_TempAge, ageSystemCtx::dtAge, ageSystemCtx::dx, ageSystemCtx::dy, ageSystemCtx::dzEQ, PISMStressBalance::get_3d_velocity(), grid, ageSystemCtx::initAllColumns(), issounding(), columnSystemCtx::reportColumnZeroPivotErrorMFile(), secpera, columnSystemCtx::setIndicesAndClearThisColumn(), ageSystemCtx::solveThisColumn(), stress_balance, tau3, ageSystemCtx::tau3, ageSystemCtx::u, ageSystemCtx::v, vH, columnSystemCtx::viewColumnInfoMFile(), vWork3d, ageSystemCtx::w, and exactV::x.

Referenced by step().

PetscErrorCode allocate_basal_resistance_law ( ) [virtual]

Decide which basal resistance law to use.

Reimplemented in IceMISMIPModel.

Definition at line 655 of file iMinit.cc.

References basal, config, and secpera.

Referenced by allocate_submodels().

PetscErrorCode allocate_basal_yield_stress ( ) [virtual]

Decide which basal yield stress model to use.

Reimplemented in IcePSTexModel.

Definition at line 632 of file iMinit.cc.

References basal_yield_stress, config, and grid.

Referenced by allocate_submodels().

PetscErrorCode allocate_bed_deformation ( ) [virtual]

Reimplemented in IceCompModel.

Definition at line 21 of file iMbeddef.cc.

References beddef, config, and grid.

Referenced by allocate_submodels().

PetscErrorCode allocate_bedrock_thermal_unit ( ) [virtual]

Decide which bedrock thermal unit to use.

Reimplemented in IceCompModel.

Definition at line 621 of file iMinit.cc.

References btu, config, and grid.

Referenced by allocate_submodels().

PetscErrorCode allocate_enthalpy_converter ( ) [virtual]

Decide which enthalpy converter to use.

Reimplemented in IceCompModel.

Definition at line 550 of file iMinit.cc.

References config, EC, and EnthalpyConverter::viewConstants().

Referenced by allocate_submodels().

PetscErrorCode allocate_flowlaw ( ) [virtual]

Decide which ice flow law to use.

Reimplemented in IceCompModel, IceEISModel, and IceMISMIPModel.

Definition at line 515 of file iMinit.cc.

References config, IceFlowLawFactory::create(), grid, ice, iceFactory, IceFlowLaw::setFromOptions(), and IceFlowLawFactory::setFromOptions().

Referenced by allocate_submodels().

PetscErrorCode allocate_internal_objects ( ) [virtual]

Allocates work vectors.

Definition at line 722 of file iMinit.cc.

References grid, nWork2d, vWork2d, vWork2dV, and vWork3d.

Referenced by init().

PetscErrorCode allocate_stressbalance ( ) [virtual]

Decide which stress balance model to use.

Reimplemented in IceCompModel, IceEISModel, IcePSTexModel, and IceMISMIPModel.

Definition at line 567 of file iMinit.cc.

References basal, config, EC, grid, ice, PISMStressBalance::init(), ocean, PISMStressBalance::set_basal_melt_rate(), stress_balance, variables, and vbmr.

Referenced by allocate_submodels().

PetscErrorCode allocate_submodels ( ) [virtual]

Allocate PISM's sub-models implementing some physical processes.

This method is called after memory allocation but before filling any of IceModelVecs because all the physical parameters should be initialized before setting up the coupling or filling model-state variables.

Definition at line 680 of file iMinit.cc.

References allocate_basal_resistance_law(), allocate_basal_yield_stress(), allocate_bed_deformation(), allocate_bedrock_thermal_unit(), allocate_enthalpy_converter(), allocate_flowlaw(), and allocate_stressbalance().

Referenced by init().

void attach_ocean_model ( PISMOceanModel ocean) [virtual]

Definition at line 291 of file iMutil.cc.

References ocean.

Referenced by main().

void attach_surface_model ( PISMSurfaceModel surf) [virtual]

Definition at line 287 of file iMutil.cc.

References surface.

Referenced by main().

PetscErrorCode bed_def_step ( bool bed_changed) [protected, virtual]

Definition at line 62 of file iMbeddef.cc.

References beddef, config, dt, grid, last_bed_def_update, PISMBedDef::update(), updateSurfaceElevationAndMask(), and vbed.

Referenced by step().

PetscErrorCode bootstrap_2d ( const char *  fname) [virtual]
PetscErrorCode bootstrap_3d ( ) [virtual]

Definition at line 166 of file iMbootstrap.cc.

References config, grid, putTempAtDepth(), secpera, and tau3.

Referenced by bootstrapFromFile().

PetscErrorCode bootstrapFromFile ( const char *  filename) [virtual]

Read file and use heuristics to initialize PISM from typical 2d data available through remote sensing.

This procedure is called by the base class when option -boot_file is used.

See chapter 4 of the User's Manual. We read only 2D information from the bootstrap file.

Definition at line 29 of file iMbootstrap.cc.

References bootstrap_2d(), bootstrap_3d(), grid, ocean, regrid(), surface, PISMComponent_TS::update(), and updateSurfaceElevationAndMask().

Referenced by set_vars_from_options().

PetscErrorCode calculateRedistResiduals ( ) [protected, virtual]
PetscErrorCode calvingAtThickness ( ) [protected, virtual]

This calving condition applies for terminal floating ice shelf grid cells when their thickness is less than a threshold.

Requires -part_grid to be "on".

Definition at line 235 of file iMcalving.cc.

References config, grid, ocean, PISMOceanModel::sea_level_elevation(), vbed, vH, and vWork2d.

Referenced by massContExplicitStep().

PetscErrorCode cell_interface_velocities ( bool  do_part_grid,
int  i,
int  j,
planeStar< PetscScalar > &  vel 
) [protected]

Compute staggered grid velocities according to mask and regular grid velocities.

In the finite volume interpretation, these are normal velocities at the faces of the cell. The method avoids differencing velocities from ice free ocean locations.

Definition at line 33 of file iMpartgrid.cc.

References PISMStressBalance::get_advective_2d_velocity(), stress_balance, and vMask.

Referenced by massContExplicitStep().

PetscErrorCode check_maximum_thickness ( ) [protected, virtual]
PetscErrorCode check_maximum_thickness_hook ( const int  old_Mz) [protected, virtual]

Allows derived classes to extend their own IceModelVec3's in vertical.

Base class version does absolutely nothing.

Definition at line 279 of file iMutil.cc.

Referenced by check_maximum_thickness().

bool checkThinNeigh ( PetscScalar  E,
PetscScalar  NE,
PetscScalar  N,
PetscScalar  NW,
PetscScalar  W,
PetscScalar  SW,
PetscScalar  S,
PetscScalar  SE 
) [protected, virtual]

Is one of my neighbors below a critical thickness to apply advection in enthalpy or temperature equation?

Definition at line 173 of file iMenergy.cc.

Referenced by enthalpyAndDrainageStep(), and temperatureStep().

PetscErrorCode compute_by_name ( string  name,
PetscScalar &  result 
) [protected, virtual]
PetscErrorCode compute_cell_areas ( ) [virtual]

Compute corrected cell areas. Uses linear interpolation to find latitudes and longitudes of grid corners, WGS84 parameters to compute cartesian (geocentric) coordinates of grid corners and vector products to compute areas of resulting triangles.

Note:
Latitude and longitude fields are not periodic, so computing corrected areas for cells at the grid boundary is not feasible. This should not matter, since these cells should be (and in most cases are) ice-free.
Using linear interpolation introduces errors in lon/lat coordinates of cell corners, but the corresponding ice volume error (present day Greenland, 5km grid) is about 3.11e-04 %.

Definition at line 360 of file iMutil.cc.

References cell_area, config, geo_x(), geo_y(), geo_z(), grid, mapping, triangle_area(), vLatitude, and vLongitude.

Referenced by misc_setup().

PetscErrorCode compute_enthalpy ( IceModelVec3 &  temperature,
IceModelVec3 &  liquid_water_fraction,
IceModelVec3 &  result 
) [protected, virtual]

Compute Enth3 from temperature T3 and liquid fraction.

Because Enth3 gets set, does ghost communication to finish.

Definition at line 74 of file iMenthalpy.cc.

References EC, EnthalpyConverter::getEnthPermissive(), EnthalpyConverter::getPressureFromDepth(), grid, and vH.

Referenced by initFromFile().

PetscErrorCode compute_enthalpy_cold ( IceModelVec3 &  temperature,
IceModelVec3 &  result 
) [protected, virtual]

Compute Enth3 from temperature T3 by assuming the ice has zero liquid fraction.

First this method makes sure the temperatures is at most the pressure-melting value, before computing the enthalpy for that temperature, using zero liquid fraction.

Because of how EnthalpyConverter::getPressureFromDepth() works, the energy content in the air is set to the value that ice would have if it a chunk of it occupied the air; the atmosphere actually has much lower energy content. It is done this way for regularity (i.e. dEnth/dz computations).

Because Enth3 gets set, does ghost communication to finish.

Definition at line 40 of file iMenthalpy.cc.

References EC, EnthalpyConverter::getEnthPermissive(), EnthalpyConverter::getPressureFromDepth(), grid, and vH.

Referenced by energyStep(), initFromFile(), putTempAtDepth(), IceCompModel::set_vars_from_options(), and IceMISMIPModel::set_vars_from_options().

PetscErrorCode compute_ice_area ( PetscScalar &  result) [protected, virtual]

Computes ice area, in m^2.

Definition at line 427 of file iMreport.cc.

References cell_area, grid, and vH.

Referenced by compute_by_name(), and massContExplicitStep().

PetscErrorCode compute_ice_area_cold ( PetscScalar &  result) [protected, virtual]

Computes cold ice area, in m^2.

Definition at line 471 of file iMreport.cc.

References cell_area, EC, Enth3, EnthalpyConverter::getPressureFromDepth(), grid, EnthalpyConverter::isTemperate(), vH, and vWork2d.

Referenced by compute_by_name().

PetscErrorCode compute_ice_area_floating ( PetscScalar &  result) [protected, virtual]

Computes floating ice area, in m^2.

Definition at line 517 of file iMreport.cc.

References cell_area, grid, and vMask.

Referenced by compute_by_name().

PetscErrorCode compute_ice_area_grounded ( PetscScalar &  result) [protected, virtual]

Computes grounded ice area, in m^2.

Definition at line 495 of file iMreport.cc.

References cell_area, grid, and vMask.

Referenced by compute_by_name().

PetscErrorCode compute_ice_area_temperate ( PetscScalar &  result) [protected, virtual]

Computes temperate ice area, in m^2.

Definition at line 447 of file iMreport.cc.

References cell_area, EC, Enth3, EnthalpyConverter::getPressureFromDepth(), grid, EnthalpyConverter::isTemperate(), vH, and vWork2d.

Referenced by compute_by_name().

PetscErrorCode compute_ice_enthalpy ( PetscScalar &  result) [protected, virtual]

Computes the total ice enthalpy in J.

Units of the specific enthalpy field $E=$(IceModelVec3::Enth3) are J kg-1. We integrate $E(t,x,y,z)$ over the entire ice fluid region $\Omega(t)$, multiplying by the density to get units of energy:

\[ E_{\text{total}}(t) = \int_{\Omega(t)} E(t,x,y,z) \rho_i \,dx\,dy\,dz. \]

Definition at line 546 of file iMreport.cc.

References config, Enth3, grid, and vH.

Referenced by compute_by_name().

PetscErrorCode compute_ice_volume ( PetscScalar &  result) [protected, virtual]

Computes the ice volume, in m^3.

Definition at line 338 of file iMreport.cc.

References cell_area, grid, and vH.

Referenced by compute_by_name().

PetscErrorCode compute_ice_volume_cold ( PetscScalar &  result) [protected, virtual]

Computes the cold ice volume, in m^3.

Definition at line 393 of file iMreport.cc.

References cell_area, EC, Enth3, EnthalpyConverter::getPressureFromDepth(), grid, EnthalpyConverter::isTemperate(), and vH.

Referenced by compute_by_name().

PetscErrorCode compute_ice_volume_temperate ( PetscScalar &  result) [protected, virtual]

Computes the temperate ice volume, in m^3.

Definition at line 359 of file iMreport.cc.

References cell_area, EC, Enth3, EnthalpyConverter::getPressureFromDepth(), grid, EnthalpyConverter::isTemperate(), and vH.

Referenced by compute_by_name().

PetscErrorCode compute_liquid_water_fraction ( IceModelVec3 &  enthalpy,
IceModelVec3 &  result 
) [protected, virtual]

Compute the liquid fraction corresponding to Enth3, and put in a global IceModelVec3 provided by user.

Does not communicate ghosts for IceModelVec3 useForLiquidFrac.

Definition at line 112 of file iMenthalpy.cc.

References EC, EnthalpyConverter::getPressureFromDepth(), EnthalpyConverter::getWaterFraction(), grid, and vH.

PetscErrorCode computeMax2DSlidingSpeed ( ) [protected, virtual]

Compute the CFL constant associated to first-order upwinding for the sliding contribution to mass continuity.

This procedure computes the maximum horizontal speed in the SSA areas. In particular it computes CFL constant for the upwinding, in massContExplicitStep(), which applies to the basal component of mass flux.

That is, because the map-plane mass continuity is advective in the sliding case we have a CFL condition.

Definition at line 92 of file iMadaptive.cc.

References CFLmaxdt2D, config, PISMStressBalance::get_advective_2d_velocity(), grid, secpera, stress_balance, exactV::v(), and vMask.

Referenced by step().

PetscErrorCode computeMax3DVelocities ( ) [protected, virtual]

Compute the maximum velocities for time-stepping and reporting to user.

Computes the maximum magnitude of the components $u,v,w$ of the 3D velocity. Then sets CFLmaxdt, the maximum time step allowed under the Courant-Friedrichs-Lewy (CFL) condition on the horizontal advection scheme for age and for temperature.

Under BOMBPROOF there is no CFL condition for the vertical advection. The maximum vertical velocity is computed but it does not affect CFLmaxdt.

Definition at line 34 of file iMadaptive.cc.

References CFLmaxdt, config, PISMStressBalance::get_3d_velocity(), gmaxu, gmaxv, gmaxw, grid, secpera, stress_balance, exactV::v(), and vH.

Referenced by step().

PetscErrorCode countCFLViolations ( PetscScalar *  CFLviol) [protected, virtual]

Because of the -skip mechanism it is still possible that we can have CFL violations: count them.

This applies to the horizontal part of the three-dimensional advection problem solved by IceModel::ageStep() and the advection, ice-only part of the problem solved by temperatureStep(). These methods use a fine vertical grid, and so we consider CFL violations on that same fine grid. (FIXME: should we actually use the fine grid?)

Communication is needed to determine total CFL violation count over entire grid. It is handled by temperatureAgeStep(), not here.

Definition at line 242 of file iMadaptive.cc.

References dt_years_TempAge, PISMStressBalance::get_3d_velocity(), grid, secpera, stress_balance, exactV::v(), and vH.

Referenced by energyStep().

PetscErrorCode create_timeseries ( ) [protected]

Creates DiagnosticTimeseries objects used to store and report scalar diagnostic quantities.

Definition at line 113 of file iMtimeseries.cc.

References config, grid, timeseries, ts_filename, and ts_vars.

Referenced by init_timeseries().

PetscErrorCode createVecs ( ) [protected, virtual]

Allocate all IceModelVecs defined in IceModel.

This procedure allocates the memory used to store model state, diagnostic and work vectors and sets metadata.

Default values should not be set here; please use set_vars_from_options().

All the memory allocated here is freed by IceModelVecs' destructors.

Reimplemented in IceCompModel, IceEISModel, and IceMISMIPModel.

Definition at line 138 of file iceModel.cc.

References acab, artm, bedtoptemp, cell_area, config, Enth3, grid, liqfrac_surface, ocean_kill_mask, shelfbmassflux, shelfbtemp, T3, tau3, variables, vBCMask, vBCvel, vbed, vbmr, vdHdt, vGhf, vH, vh, vHmelt, vHref, vHresidual, vIcebergMask, vLatitude, vLongitude, vMask, vPrinStrain1, vPrinStrain2, vtauc, and vuplift.

Referenced by init().

PetscErrorCode deallocate_internal_objects ( ) [protected, virtual]

De-allocate internal objects.

This includes Vecs that are not in an IceModelVec, SSA tools and the bed deformation model.

Definition at line 470 of file iceModel.cc.

Referenced by ~IceModel().

PetscErrorCode determineTimeStep ( const bool  doTemperatureCFL) [protected, virtual]

Use various stability criteria to determine the time step for an evolution run.

The main loop in run() approximates many physical processes. Several of these approximations, including the mass continuity and temperature equations in particular, involve stability criteria. This procedure builds the length of the next time step by using these criteria and by incorporating choices made by options (e.g. -max_dt) and by derived classes.

Definition at line 167 of file iMadaptive.cc.

References adaptReasonFlag, adaptTimeStepDiffusivity(), btu, CFLmaxdt, CFLmaxdt2D, config, dt, dt_force, dt_from_cfl, grid, PISMBedThermalUnit::max_timestep(), maxdt_temporary, secpera, and skipCountDown.

Referenced by step().

PetscErrorCode dumpToFile ( const char *  filename) [protected, virtual]

Definition at line 107 of file iMIO.cc.

References grid, vnreport::nc, write_metadata(), and write_model_state().

Referenced by endOfTimeStepHook(), and writeFiles().

PetscErrorCode eigenCalving ( ) [protected, virtual]

Uses principal strain rates to apply "eigencalving" with constant K.

See equation (26) in [Winkelmannetal2010TCD].

Definition at line 30 of file iMcalving.cc.

References config, dt, e, grid, vfnow::N, ocean, PISMOceanModel::sea_level_elevation(), vbed, vH, vHref, vMask, vPrinStrain1, vPrinStrain2, and vWork2d.

Referenced by massContExplicitStep().

int endOfTimeStepHook ( ) [protected, virtual]

Catch signals -USR1, -USR2 and -TERM.

Signal SIGTERM makes PISM end, saving state under original -o name (or default name). We also add an indication to the history attribute of the output NetCDF file.

Signal SIGUSR1 makes PISM save state under a filename based on the the name of the executable (e.g. pismr or pismv) and the current model year. In addition the time series (-ts_file, etc.) is flushed out There is no indication of these actions in the history attribute of the output (-o) NetCDF file because there is no effect on it, but there is an indication at stdout.

Signal SIGUSR2 makes PISM flush time-series, without saving model state.

Definition at line 50 of file iMutil.cc.

References dumpToFile(), executable_short_name, flush_timeseries(), grid, pism_signal, and stampHistory().

Referenced by run().

PetscErrorCode energyStats ( PetscScalar  iarea,
PetscScalar &  gmeltfrac,
PetscScalar &  gtemp0 
) [protected, virtual]

Computes fraction of the base which is melted and the ice basal temperature at the center of the ice sheet.

Communication occurs here.

Definition at line 77 of file iMreport.cc.

References e, EC, Enth3, EnthalpyConverter::getAbsTemp(), EnthalpyConverter::getPressureFromDepth(), grid, EnthalpyConverter::isTemperate(), vH, and vWork2d.

Referenced by summary().

PetscErrorCode energyStep ( ) [protected, virtual]

Manage the solution of the energy equation, and related parallel communication.

This method updates three fields:

  • IceModelVec3 Enth3
  • IceModelVec2 vbmr
  • IceModelVec2 vHmelt That is, energyStep() is in charge of calling other methods that actually update, and then it is in charge of doing the ghost communication as needed. If do_cold_ice_methods == true, then energyStep() must also update this field
  • IceModelVec3 T3

Normally calls the method enthalpyAndDrainageStep(). Calls temperatureStep() if do_cold_ice_methods == true.

Definition at line 38 of file iMenergy.cc.

References bedtoptemp, btu, CFLviolcount, compute_enthalpy_cold(), config, countCFLViolations(), dt_years_TempAge, Enth3, enthalpyAndDrainageStep(), get_bed_top_temp(), grid, stdout_flags, T3, t_years_TempAge, temperatureStep(), PISMBedThermalUnit::update(), vbmr, and vWork3d.

Referenced by step().

PetscErrorCode enthalpyAndDrainageStep ( PetscScalar *  vertSacrCount,
PetscScalar *  liquifiedVol,
PetscScalar *  bulgeCount 
) [protected, virtual]

Update ice enthalpy field based on conservation of energy.

This method is documented by the page BOMBPROOF, PISM's numerical scheme for conservation of energy and by [AschwandenBuelerKhroulevBlatter].

This method updates IceModelVec3 vWork3d = vEnthnew, IceModelVec2S vbmr, and IceModelVec2S vHmelt. No communication of ghosts is done for any of these fields.

We use an instance of enthSystemCtx.

Regarding drainage, see [AschwandenBuelerKhroulevBlatter] and references therein.

Definition at line 261 of file iMenthalpy.cc.

References artm, btu, checkThinNeigh(), config, dt_years_TempAge, EC, enthSystemCtx::Enth, Enth3, enthSystemCtx::Enth_s, PISMStressBalance::get_3d_velocity(), PISMStressBalance::get_basal_frictional_heating(), DrainageCalculator::get_drainage_rate(), PISMBedThermalUnit::get_upward_geothermal_flux(), PISMStressBalance::get_volumetric_strain_heating(), getEnthalpyCTSColumn(), EnthalpyConverter::getEnthPermissive(), EnthalpyConverter::getMeltingTemp(), EnthalpyConverter::getPressureFromDepth(), EnthalpyConverter::getWaterFraction(), grid, ice, PISMSurfaceModel::ice_surface_liquid_water_fraction(), PISMSurfaceModel::ice_surface_temperature(), enthSystemCtx::initAllColumns(), issounding(), EnthalpyConverter::isTemperate(), IceFlowLaw::k, L, liqfrac_surface, ocean, columnSystemCtx::reportColumnZeroPivotErrorMFile(), IceFlowLaw::rho, secpera, enthSystemCtx::setBoundaryValuesThisColumn(), enthSystemCtx::setDirichletBasal(), columnSystemCtx::setIndicesAndClearThisColumn(), enthSystemCtx::setNeumannBasal(), enthSystemCtx::setSchemeParamsThisColumn(), PISMOceanModel::shelf_base_mass_flux(), PISMOceanModel::shelf_base_temperature(), shelfbmassflux, shelfbtemp, enthSystemCtx::Sigma, enthSystemCtx::solveThisColumn(), stress_balance, surface, enthSystemCtx::u, enthSystemCtx::v, vbmr, vH, vHmelt, columnSystemCtx::viewColumnInfoMFile(), enthSystemCtx::viewConstants(), EnthalpyConverter::viewConstants(), vMask, vWork2d, vWork3d, and enthSystemCtx::w.

Referenced by energyStep().

PetscErrorCode excessToFromBasalMeltLayer ( const PetscScalar  rho_c,
const PetscScalar  z,
const PetscScalar  dz,
PetscScalar *  Texcess,
PetscScalar *  Hmelt 
) [protected, virtual]

Compute the melt water which should go to the base if $T$ is above pressure-melting.

Definition at line 28 of file iMtemp.cc.

References allowAboveMelting, grid, ice, IceFlowLaw::latentHeat, IceFlowLaw::rho, and updateHmelt.

Referenced by temperatureStep().

PetscErrorCode extras_max_timestep ( double  t_years,
double &  dt_years 
) [protected]

Computes the maximum time-step we can take and still hit all the requested years.

Sets dt_years to -1 if any time-step is OK.

Definition at line 677 of file iMtimeseries.cc.

References config, extra_times, and save_extra.

Referenced by step().

PetscErrorCode findIceBergCandidates ( ) [protected, virtual]

This routine comes from PISM-PIK.

The aim of this routine is to find floating regions that *might* be icebergs. If these regions actually *are* icebergs is checked in identifyNotAnIceBerg().

Definition at line 66 of file iMicebergs.cc.

References config, grid, exactV::Mx, ocean, PISMOceanModel::sea_level_elevation(), vbed, vH, vIcebergMask, and vMask.

Referenced by killIceBergs().

PetscErrorCode flush_timeseries ( ) [protected]

Flush scalar time-series.

Definition at line 736 of file iMtimeseries.cc.

References timeseries.

Referenced by endOfTimeStepHook(), write_backup(), and write_snapshot().

PetscReal get_average_thickness ( bool  do_redist,
planeStar< int >  M,
planeStar< PetscScalar >  H 
) [protected]

For ice-free (or partially-filled) cells adjacent to "full" floating cells, update Href.

Should only be called if one of the neighbors is floating.

FIXME: does not account for grounded tributaries: thin ice shelves may evolve from grounded tongue

Definition at line 90 of file iMpartgrid.cc.

References grid, vfnow::N, and secpera.

Referenced by massContExplicitStep().

PetscErrorCode get_bed_top_temp ( IceModelVec2S &  result) [protected, virtual]

Extract from enthalpy field (Enth3) the temperature which the top of the bedrock thermal layer will see.

Definition at line 118 of file iMenergy.cc.

References artm, EC, Enth3, EnthalpyConverter::getAbsTemp(), EnthalpyConverter::getPressureFromDepth(), grid, PISMSurfaceModel::ice_surface_temperature(), ocean, PISMOceanModel::shelf_base_temperature(), shelfbtemp, surface, vH, and vMask.

Referenced by energyStep(), and model_state_setup().

PetscErrorCode getEnthalpyCTSColumn ( PetscScalar  p_air,
PetscScalar  thk,
PetscInt  ks,
const PetscScalar *  Enth,
const PetscScalar *  w,
PetscScalar *  lambda,
PetscScalar **  Enth_s 
) [protected, virtual]

Compute the CTS value of enthalpy in an ice column, and the lambda for BOMBPROOF.

Return argument Enth_s[Mz] has the enthalpy value for the pressure-melting temperature at the corresponding z level.

Parameters:
p_airatmospheric pressure
thkice thickness
ksindex of the level just below the surface
EnthEnthalpy
wvert. velocity
lambdalambda
Enth_senthalpy for the pr.-melting temp.

Definition at line 184 of file iMenthalpy.cc.

References IceFlowLaw::c_p, EC, EnthalpyConverter::getEnthalpyCTS(), EnthalpyConverter::getPressureFromDepth(), grid, ice, IceFlowLaw::k, IceFlowLaw::rho, and secpera.

Referenced by enthalpyAndDrainageStep().

virtual IceFlowLaw* getIceFlowLaw ( ) [inline, virtual]

Definition at line 120 of file iceModel.hh.

virtual IceFlowLawFactory& getIceFlowLawFactory ( ) [inline, virtual]

Definition at line 119 of file iceModel.hh.

PetscErrorCode grid_setup ( ) [virtual]

Sets up the computational grid.

There are two cases here:

1) Initializing from a PISM ouput file, in which case all the options influencing the grid (currently: -Mx, -My, -Mz, -Mbz, -Lx, -Ly, -Lz, -z_spacing, -zb_spacing) are ignored.

2) Initializing using defaults, command-line options and (possibly) a bootstrapping file. Derived classes requiring special grid setup should reimplement IceGrid::set_grid_from_options().

No memory allocation should happen here.

Definition at line 231 of file iMinit.cc.

References grid, mapping, vnreport::nc, set_grid_defaults(), set_grid_from_options(), and set_time_from_options().

Referenced by init().

PetscErrorCode ice_mass_bookkeeping ( ) [protected, virtual]

Computes total ice fluxes in kg s-1 at 3 interfaces:

  • the ice-atmosphere interface: gets surface mass balance rate from PISMSurfaceModel *surface,
  • the ice-ocean interface at the bottom of ice shelves: gets ocean-imposed basal melt rate from PISMOceanModel *ocean, and
  • the ice-bedrock interface: gets basal melt rate from IceModelVec2S vbmr.

A unit-conversion occurs for all three quantities, from ice-equivalent m s-1 to kg s-1. The sign convention about these fluxes is that positve flux means ice is being added to the ice fluid volume at that interface.

These quantities should be understood as instantaneous at the beginning of the time-step. Multiplying by dt will not necessarily give the corresponding change from the beginning to the end of the time-step.

FIXME: The calving rate can be computed by post-processing: divoldt = surface_ice_flux * iarea + basal_ice_flux * iareag + sub_shelf_ice_flux * iareaf + calving_flux_vol_rate

Definition at line 732 of file iMreport.cc.

References acab, cell_area, config, grid, PISMSurfaceModel::ice_surface_mass_flux(), ocean, PISMOceanModel::shelf_base_mass_flux(), shelfbmassflux, surface, total_basal_ice_flux, total_sub_shelf_ice_flux, total_surface_ice_flux, vbmr, vH, and vMask.

Referenced by step().

PetscErrorCode identifyNotAnIceBerg ( ) [protected, virtual]

Definition at line 176 of file iMicebergs.cc.

References grid, and vIcebergMask.

Referenced by killIceBergs().

PetscErrorCode init ( )

Manage the initialization of the IceModel object.

Please see the documenting comments of the functions called below to find explanations of their intended uses.

The IceModel initialization sequence is this:

1) Initialize the computational grid:

2) Process the options:

3) Memory allocation:

4) Allocate PISM components modeling some physical processes.

5) Initialize atmosphere and ocean couplers:

6) Allocate work vectors:

7) Fill the model state variables (from a PISM output file, from a bootstrapping file using some modeling choices or using formulas). Calls IceModel::regrid()

8) Report grid parameters:

9) Miscellaneous stuff: set up the bed deformation model, initialize the basal till model, initialize snapshots. This has to happen *after* regridding.

The following flow-chart illustrates the process.

/Users/constantine/pism-0.4/doc/browser/initialization-sequence.dot

IceModel initialization sequence

Definition at line 811 of file iceModel.cc.

References allocate_internal_objects(), allocate_submodels(), createVecs(), grid, grid_setup(), init_couplers(), misc_setup(), model_state_setup(), setFromOptions(), and start_time.

Referenced by main().

PetscErrorCode init_backups ( ) [protected]

Initialize the backup (snapshot-on-wallclock-time) mechanism.

Definition at line 701 of file iMIO.cc.

References backup_filename, backup_interval, backup_vars, config, executable_short_name, grid, last_backup_time, and set_output_size().

Referenced by misc_setup().

PetscErrorCode init_couplers ( ) [virtual]

Initializes atmosphere and ocean couplers.

Reimplemented in IceEISModel, and IceMISMIPModel.

Definition at line 703 of file iMinit.cc.

References grid, PISMComponent::init(), PISMSurfaceModel::init(), ocean, surface, and variables.

Referenced by init().

PetscErrorCode init_diagnostics ( ) [virtual]
PetscErrorCode init_extras ( ) [protected]

Initialize the code saving spatially-variable diagnostic quantities.

Definition at line 476 of file iMtimeseries.cc.

References PISMStressBalance::add_vars_to_output(), current_extra, extra_file_is_ready, extra_filename, extra_times, extra_vars, grid, save_extra, split_extra, stress_balance, and variables.

Referenced by misc_setup().

PetscErrorCode init_ocean_kill ( ) [virtual]

Initialize the mask used by the -ocean_kill code.

Reimplemented in IceMISMIPModel.

Definition at line 844 of file iMinit.cc.

References config, grid, ocean_kill_mask, vH, and vMask.

Referenced by misc_setup().

PetscErrorCode init_snapshots ( ) [protected]

Initializes the snapshot-saving mechanism.

Definition at line 552 of file iMIO.cc.

References current_snapshot, grid, save_snapshots, set_output_size(), snapshot_times, snapshot_vars, snapshots_file_is_ready, snapshots_filename, and split_snapshots.

Referenced by misc_setup().

PetscErrorCode init_timeseries ( ) [protected]

Initializes the code writing scalar time-series.

Definition at line 25 of file iMtimeseries.cc.

References config, create_timeseries(), current_ts, grid, vnreport::nc, save_ts, ts_filename, ts_times, and ts_vars.

Referenced by misc_setup().

PetscErrorCode init_viewers ( ) [protected, virtual]

Initialize run-time diagnostic viewers.

Definition at line 154 of file iMviewers.cc.

References config, grid, map_viewers, and sounding_viewers.

Referenced by misc_setup().

PetscErrorCode initFromFile ( const char *  filename) [virtual]

Read a saved PISM model state in NetCDF format, for complete initialization of an evolution or diagnostic run.

Before this is run, the method IceModel::grid_setup() determines the number of grid points (Mx,My,Mz,Mbz) and the dimensions (Lx,Ly,Lz) of the computational box from the same input file.

Reimplemented in IcePSTexModel, and IceMISMIPModel.

Definition at line 321 of file iMIO.cc.

References compute_enthalpy(), compute_enthalpy_cold(), config, Enth3, global_attributes, grid, vnreport::nc, T3, tau3, variables, vHref, and vWork3d.

Referenced by model_state_setup().

bool issounding ( const PetscInt  i,
const PetscInt  j 
) [protected, virtual]

Definition at line 283 of file iMutil.cc.

References jd.

Referenced by ageStep(), enthalpyAndDrainageStep(), and temperatureStep().

PetscErrorCode killEasyIceBergs ( ) [protected, virtual]

This routine is used when strain-rate based calving is applied. It kills single grid cell icebergs and one-grid cell wide ice 'noses', because no proper strain rate eigenvalues can be derived there.

Definition at line 297 of file iMicebergs.cc.

References exactV::C, config, grid, ocean, PISMOceanModel::sea_level_elevation(), vbed, vh, vH, vHref, vMask, and vWork2d.

Referenced by killIceBergs().

PetscErrorCode killIceBergs ( ) [protected, virtual]

Identify and eliminate free-floating icebergs, which cause well-posedness (invertibility) problems for stress solvers.

Icebergs are, in this context, floating regions that are not attached, through a chain of positive thickness ice-filled cells, to at least one grounded cell. They are observed to cause unrealistically large velocities that may (numerically) affect the ice velocities everywhere. They cause the SSA operator to have a nontrivial null space, or, under approximation errors, they lead to extremely small time steps and can eventually cause a KSP-ERROR.

This method calls the routines which identify and then eliminate these icebergs.

FIXME: a fundamental aspect of the semantics here is not clear to me (bueler), namely how many times the iceberg-eliminate "sweep" might occur, and what properties control that? for now, should there be some (low-verbosity) indication that it is occurring, such as when more than one sweep happened?

FIXME: this package of methods *might* appropriately be a class

FIXME: this package of routines *should* have a regression

Definition at line 49 of file iMicebergs.cc.

References findIceBergCandidates(), identifyNotAnIceBerg(), killEasyIceBergs(), and killIdentifiedIceBergs().

Referenced by updateSurfaceElevationAndMask().

PetscErrorCode killIdentifiedIceBergs ( ) [protected, virtual]

We have distinguished icebergs from attached floating regions in identifyNotAnIceBerg(). Now we actually eliminate the former (meaning we set the ice thickness to zero and mark the boxes as icefree-ocean) and leave the latter as they are.

Definition at line 248 of file iMicebergs.cc.

References grid, vh, vH, vIcebergMask, and vMask.

Referenced by killIceBergs().

PetscErrorCode massContExplicitStep ( ) [protected, virtual]

Update the thickness from the diffusive flux and sliding velocity, and the surface and basal mass balance rates.

The partial differential equation describing the conservation of mass in the map-plane (parallel to the geoid) is

\[ \frac{\partial H}{\partial t} = M - S - \nabla\cdot \mathbf{q} \]

where

\[ \mathbf{q} = \bar{\mathbf{U}} H. \]

In these equations $H$ is the ice thickness, $M$ is the surface mass balance (accumulation or ablation), $S$ is the basal mass balance (e.g. basal melt or freeze-on), and $\bar{\mathbf{U}}$ is the vertically-averaged horizontal velocity of the ice. This procedure uses this conservation of mass equation to update the ice thickness.

The PISMSurfaceModel IceModel::surface provides $M$. The PISMOceanModel IceModel::ocean provides $S$ at locations below floating ice (ice shelves).

Even if we regard the map-plane flux as defined by the formula $\mathbf{q} = \bar{\mathbf{U}} H$, the flow of ice is at least somewhat diffusive in almost all cases, and in simplified models (the SIA model) it is exactly true that $\mathbf{q} = - D \nabla h$. In the current method the flux is split into the part from the diffusive non-sliding SIA model and a part which is a less-diffusive, presumably membrane-stress-dominated 2D advective velocity, which generally describes sliding:

\[ \mathbf{q} = - D \nabla h + \mathbf{U}_b H.\]

Here $D$ is the (positive, scalar) effective diffusivity of the non-sliding SIA and $\mathbf{U}_b$ is the less-diffusive sliding velocity. We interpret $\mathbf{U}_b$ as a basal sliding velocity in the hybrid.

The main ice-dynamical inputs to this method are identified in these lines, which get outputs from PISMStressBalance *stress_balance:

  IceModelVec2Stag *Qdiff;
  stress_balance->get_diffusive_flux(Qdiff);
  IceModelVec2V *vel_advective;
  stress_balance->get_advective_2d_velocity(vel_advective);

The diffusive flux $-D\nabla h$ is thus stored in IceModelVec2Stag *Qdiff while the less-diffusive velocity $\mathbf{U}_b$ is stored in IceModelVec2V *vel_advective.

The methods used here are first-order and explicit in time. The derivatives in $\nabla \cdot (D \nabla h)$ are computed by centered finite difference methods. The diffusive flux Qdiff is already stored on the staggered grid and it is differenced in a centered way here. The time-stepping for this part of the explicit scheme is controlled by equation (25) in [BBL], so that $\Delta t \sim \Delta x^2 / \max D$; see also [MortonMayers].

The divergence of the flux from velocity $\mathbf{U}_b$ is computed by the PIK upwinding technique [equation (25) in Winkelmannetal2010TCD]. The CFL condition for this advection scheme is checked; see computeMax2DSlidingSpeed() and determineTimeStep(). This method implements the direct-superposition (PIK) hybrid which adds the SSA velocity to the SIA velocity [equation (15) in Winkelmannetal2010TCD]. The hybrid described by equations (21) and (22) in BBL is no longer used.

Checks are made which can generate zero thickness according to minimal calving relations, specifically the mechanisms turned-on by options -ocean_kill and -float_kill.

The rate of thickness change $\partial H/\partial t$ is computed and saved, as is the rate of volume loss or gain.

Definition at line 178 of file iMgeometry.cc.

References acab, calvingAtThickness(), cell_area, cell_interface_velocities(), check_maximum_thickness(), compute_ice_area(), config, dt, dvoldt, eigenCalving(), float_kill_flux, gdHdtav, PISMStressBalance::get_advective_2d_velocity(), get_average_thickness(), PISMStressBalance::get_diffusive_flux(), PISMStressBalance::get_principal_strain_rates(), grid, PISMSurfaceModel::ice_surface_mass_flux(), nonneg_rule_flux, ocean, ocean_kill_flux, ocean_kill_mask, redistResiduals(), S(), PISMOceanModel::shelf_base_mass_flux(), shelfbmassflux, stress_balance, surface, exactV::v(), vBCMask, vBCvel, vbed, vbmr, vdHdt, vH, vHref, vHresidual, vMask, vPrinStrain1, vPrinStrain2, and vWork2d.

Referenced by step().

PetscErrorCode misc_setup ( ) [virtual]

Miscellaneous initialization tasks plus tasks that need the fields that can come from regridding.

Reimplemented in IceMISMIPModel.

Definition at line 749 of file iMinit.cc.

References compute_cell_areas(), event_age, event_backups, event_beddef, event_energy, event_mass, event_output, event_snapshots, event_step, event_velocity, grid, init_backups(), init_diagnostics(), init_extras(), init_ocean_kill(), init_snapshots(), init_timeseries(), init_viewers(), output_vars, and set_output_size().

Referenced by init().

PetscErrorCode model_state_setup ( ) [virtual]

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).

Definition at line 431 of file iMinit.cc.

References basal_yield_stress, beddef, bedtoptemp, btu, config, get_bed_top_temp(), grid, PISMComponent::init(), PISMBedThermalUnit::init(), PISMBedDef::init(), initFromFile(), last_bed_def_update, regrid(), set_vars_from_options(), stampHistoryCommand(), updateSurfaceElevationAndMask(), and variables.

Referenced by init(), and run().

PetscErrorCode putTempAtDepth ( ) [virtual]

Create a temperature field within ice and bedrock from given surface temperature and geothermal flux maps.

In bootstrapping we need to guess about the temperature within the ice and bedrock if surface temperature and geothermal flux maps are given. This rule is heuristic but seems to work well anyway. Full bootstrapping will start from the temperature computed by this procedure and then run for a long time (e.g. $10^5$ years), with fixed geometry, to get closer to thermomechanically coupled equilibrium. See the part of the User's Manual on EISMINT-Greenland.

Consider a horizontal grid point i,j. Suppose the surface temperature $T_s$ and the geothermal flux $g$ are given at that grid point. Within the corresponding column, denote the temperature by $T(z)$ for some elevation $z$ above the base of the ice. (Note ice corresponds to $z>0$ while bedrock has $z<0$.) Apply the rule that $T(z)=T_s$ is $z$ is above the top of the ice (at $z=H$).

Within the ice, set

\[T(z) = T_s + \alpha (H-z)^2 + \beta (H-z)^4\]

where $\alpha,\beta$ are chosen so that

\[\frac{\partial T}{\partial z}\Big|_{z=0} = - \frac{g}{k_i}\]

and

\[\frac{\partial T}{\partial z}\Big|_{z=H/4} = - \frac{g}{2 k_i}.\]

The point of the second condition is our observation that, in observed ice, the rate of decrease in ice temperature with elevation is significantly decreased at only one quarter of the ice thickness above the base.

The temperature within the ice is not allowed to exceed the pressure-melting temperature.

Note that the above heuristic rule for ice determines $T(0)$. Within the bedrock our rule is that the rate of change with depth is exactly the geothermal flux:

\[T(z) = T(0) - \frac{g}{k_r} z.\]

Note that $z$ here is negative, so the temperature increases as one goes down into the bed.

FIXME task #7297

Definition at line 223 of file iMbootstrap.cc.

References artm, IceFlowLaw::beta_CC_grad, compute_enthalpy_cold(), config, EC, Enth3, g, EnthalpyConverter::getEnthPermissive(), EnthalpyConverter::getPressureFromDepth(), grid, ice, PISMSurfaceModel::ice_surface_temperature(), IceFlowLaw::k, IceFlowLaw::melting_point_temp, surface, T3, vbed, vGhf, and vH.

Referenced by bootstrap_3d(), and IceEISModel::set_vars_from_options().

PetscErrorCode redistResiduals ( ) [protected, virtual]

Redistribute residual ice mass from subgrid-scale parameterization, when using -part_redist option.

See [Albrechtetal2011]. Manages the loop.

FIXME: Reporting!

FIXME: repeatRedist should be config flag?

FIXME: resolve fixed number (=3) of loops issue

Definition at line 130 of file iMpartgrid.cc.

References calculateRedistResiduals(), grid, and repeatRedist.

Referenced by massContExplicitStep().

PetscErrorCode regrid ( int  dimensions) [protected, virtual]

Manage regridding based on user options. Call IceModelVec::regrid() to do each selected variable.

For each variable selected by option -regrid_vars, we regrid it onto the current grid from the NetCDF file specified by -regrid_file.

The default, if -regrid_vars is not given, is to regrid the 3 dimensional quantities tau3, Tb3 and either T3 or Enth3. This is consistent with one standard purpose of regridding, which is to stick with current geometry through the downscaling procedure. Most of the time the user should carefully specify which variables to regrid.

This dimensions argument can be 2 (regrid 2D variables only), 3 (3D only) and 0 (everything).

Definition at line 471 of file iMIO.cc.

References config, grid, and regrid_variables().

Referenced by bootstrapFromFile(), model_state_setup(), IceMISMIPModel::set_vars_from_options(), and IceEISModel::set_vars_from_options().

PetscErrorCode regrid_variables ( string  filename,
set< string regrid_vars,
int  ndims 
) [protected, virtual]

Definition at line 526 of file iMIO.cc.

References grid, exactV::v(), and variables.

Referenced by regrid().

void reset_counters ( ) [virtual]
PetscErrorCode run ( ) [virtual]
PetscErrorCode set_grid_defaults ( ) [virtual]

Set default values of grid parameters.

Derived classes (IceCompModel, for example) reimplement this to change the grid initialization when no -i option is set.

Reimplemented in IceCompModel, IceEISModel, and IceMISMIPModel.

Definition at line 35 of file iMinit.cc.

References grid, mapping, vnreport::nc, and secpera.

Referenced by grid_setup().

PetscErrorCode set_grid_from_options ( ) [virtual]

Initalizes the grid from options.

Reads all of -Mx, -My, -Mz, -Mbz, -Lx, -Ly, -Lz, -Lbz, -z_spacing and -zb_spacing. Sets corresponding grid parameters.

Reimplemented in IceMISMIPModel.

Definition at line 144 of file iMinit.cc.

References grid.

Referenced by grid_setup().

PetscErrorCode set_output_size ( string  option,
string  description,
string  default_value,
set< string > &  result 
) [virtual]
PetscErrorCode set_time_from_options ( ) [protected, virtual]

Determine the run length, starting and ending years using command-line options.

Reimplemented in IceMISMIPModel.

Definition at line 785 of file iMinit.cc.

References config, grid, and t_years_TempAge.

Referenced by grid_setup().

PetscErrorCode set_vars_from_options ( ) [virtual]

Sets starting values of model state variables using command-line options.

Sets starting values of model state variables using command-line options and (possibly) a bootstrapping file.

In the base class there is only one case: bootstrapping.

Reimplemented in IceCompModel, IceEISModel, IcePSTexModel, and IceMISMIPModel.

Definition at line 493 of file iMinit.cc.

References bootstrapFromFile(), and grid.

Referenced by model_state_setup().

PetscErrorCode setCTSFromEnthalpy ( IceModelVec3 &  useForCTS) [protected, virtual]

Compute the CTS field, CTS = E/E_s(p), from Enth3, and put in a global IceModelVec3 provided by user.

The actual cold-temperate transition surface (CTS) is the level set CTS = 1.

Does not communicate ghosts for IceModelVec3 useForCTS.

Definition at line 149 of file iMenthalpy.cc.

References EC, Enth3, EnthalpyConverter::getCTS(), EnthalpyConverter::getPressureFromDepth(), grid, and vH.

PetscErrorCode setDefaults ( ) [protected]

Assigns default values to the many parameters and flags in IceModel.

The order of precedence for setting parameters in PISM is:

  • default values: Reasonable values to set up the model with are given in setDefaults() and in file pism/src/base/iMdefaults. setDefaults() is called in the constructor for IceModel. It would be reasonable to have setDefaults() read the defaults from a (default!) NetCDF file of a format so that others could be substituted.
  • derived class overrides: The constructor of a derived class can choose its own defaults for data members of IceModel (and its own data members). These will override the above.
  • command line options: The driver calls IceModel::setFromOptions() after the instance of IceModel (or a derived class) is constructed. setFromOptions() is virtual but should usually be called first if a derived class has a setFromOptions.

The input file (-i or -boot_file) will not contain (in Feb 2008 version of PISM) any values for the quantities which are set in setDefaults(). (There are parameters which can be set at the command line or by the input file, like grid.Mx. For -i the data file has the final word but for -boot_file the command line options have the final word.)

The defaults should be reasonable values under all circumstances or they should indicate missing values in some manner.

Definition at line 45 of file iMdefaults.cc.

References config, executable_short_name, global_attributes, gmaxu, gmaxv, gmaxw, grid, jd, PISM_Revision, shelvesDragToo, standard_gravity, and updateHmelt.

Referenced by IceModel().

PetscErrorCode setExecName ( const char *  my_executable_short_name) [virtual]

Definition at line 474 of file iceModel.cc.

References executable_short_name.

Referenced by main().

PetscErrorCode setFromOptions ( ) [virtual]

Read runtime (command line) options and alter the corresponding parameters or flags as appropriate.

A critical principle of this procedure is that it will not alter IceModel parameters and flags unless the user sets an option to do so. This base class setFromOptions() can be called by an IceModel-derived class after the it has set its own defaults.

In fact this procedure only reads the majority of the options. Some are read in initFromOptions(), writeFiles(), and setStartRunEndYearsFromOptions(), among other places.

There are no options to directly set dx, dy, dz, Lbz, and year as the user should not directly set these grid parameters. There are, however, options for directly setting Mx, My, Mz, Mbz and also Lx, Ly, Lz.

Note that additional options are read by PISM{Atmosphere|Surface|Ocean}Model instances, including -pdd... and -d?forcing options.

Reimplemented in IceCompModel, IceEISModel, IcePSTexModel, and IceMISMIPModel.

Definition at line 41 of file iMoptions.cc.

References config, global_attributes, grid, ICE_HYBRID, iceFactory, jd, and IceFlowLawFactory::setType().

Referenced by init().

PetscErrorCode stampHistory ( string  str) [protected, virtual]

Get time and user/host name and add it to the given string.

Definition at line 143 of file iMutil.cc.

References global_attributes.

Referenced by endOfTimeStepHook(), stampHistoryCommand(), stampHistoryEnd(), write_backup(), and IceMISMIPModel::writeMISMIPFinalFiles().

PetscErrorCode stampHistoryCommand ( ) [protected, virtual]

Build a history string from the command which invoked PISM.

Definition at line 92 of file iMutil.cc.

References global_attributes, grid, PISM_Revision, and stampHistory().

Referenced by model_state_setup().

PetscErrorCode stampHistoryEnd ( ) [protected, virtual]

Build the particular history string associated to the end of a PISM run, including a minimal performance assessment.

Definition at line 112 of file iMutil.cc.

References e, grid, stampHistory(), and start_time.

Referenced by writeFiles().

PetscErrorCode step ( bool  do_mass_continuity,
bool  do_energy,
bool  do_age,
bool  do_skip,
bool  use_ssa_when_grounded 
) [virtual]

Do the contents of the main PISM time-step.

During the time-step we perform the following actions:

  • determine the maximum time-step boundary models can take
  • apply the time-step restriction from the -extra_{times,file,vars} mechanism
  • compute the bed deformation, which only depends on current thickness and bed elevation
  • update the yield stress for the plastic till model (if appropriate)
  • update the velocity field; in some cases the whole three-dimensional field is updated and in some cases just the vertically-averaged horizontal velocity is updated; see velocity()
  • determine the time step according to a variety of stability criteria; see determineTimeStep()
  • Update surface and ocean models.
  • update the age of the ice (if appropriate)
  • update the enthalpy (or temperature) field according to the conservation of energy model based (especially) on the new velocity field; see energyStep()
  • compute fluxes through ice boundaries; this method frequently updates the surface process models pre-emptively, so that massContExplicitStep() does not do that work again

Definition at line 483 of file iceModel.cc.

References adaptReasonFlag, additionalAtEndTimestep(), additionalAtStartTimestep(), ageStep(), PISMYieldStress::basal_material_yield_stress(), basal_yield_stress, bed_def_step(), beddef, computeMax2DSlidingSpeed(), computeMax3DVelocities(), determineTimeStep(), dt, dt_years_TempAge, energyStep(), event_age, event_beddef, event_energy, event_mass, event_step, event_velocity, extras_max_timestep(), grid, ice_mass_bookkeeping(), massContExplicitStep(), PISMComponent_TS::max_timestep(), maxdt_temporary, ocean, secpera, skipCountDown, stdout_flags, PISMStressBalance::stdout_report(), stress_balance, surface, t_years_TempAge, PISMStressBalance::update(), PISMComponent_TS::update(), updateSurfaceElevationAndMask(), variables, vdHdt, and vtauc.

Referenced by run().

PetscErrorCode summary ( bool  tempAndAge) [protected, virtual]

Reimplemented in IceCompModel.

Definition at line 168 of file iMreport.cc.

References ageStats(), CFLviolcount, config, dt, energyStats(), grid, stdout_flags, summaryPrintLine(), vH, and volumeArea().

Referenced by run().

PetscErrorCode summaryPrintLine ( PetscTruth  printPrototype,
bool  tempAndAge,
PetscScalar  year,
PetscScalar  delta_t,
PetscScalar  volume,
PetscScalar  area,
PetscScalar  meltfrac,
PetscScalar  H0,
PetscScalar  T0 
) [protected, virtual]

Print a line to stdout which summarizes the state of the modeled ice sheet at the end of the time step.

Generally, two lines are printed to stdout, the first starting with a space and the second starting with the character 'S' in the left-most column (column 1).

The first line shows flags for which processes executed, and the length of the time step (and/or substeps under option -skip). See IceModel::run() for meaning of these flags.

If IceModel::printPrototype is TRUE then the first line does not appear and the second line has alternate appearance. Specifically, different column 1 characters are printed:

  • 'P' line gives names of the quantities reported in the 'S' line, the "prototype", while
  • 'U' line gives units of these quantities. This column 1 convention allows automatic tools to read PISM stdout and produce time-series. The 'P' and 'U' lines are intended to appear once at the beginning of the run, while an 'S' line appears at every time step. This base class version gives a report based on the information included in the EISMINT II intercomparison of ice sheet models[EISMINT00].

Note that the inputs volume and area to this method are in m^3 and m^2, respectively. Thus all inputs to this method are in MKS except for year.

The resulting numbers on an 'S' line have the following meaning in this base class version:

  • ivol is the total ice sheet volume
  • iarea is the total area occupied by positive thickness ice
  • thick0 is the ice thickness at the center of the computational domain
  • temp0 is the ice basal temperature at the center of the computational domain The last two can be interpreted as "sanity checks", because they give information about a location which may or may not be "typical".

For more description and examples, see the PISM User's Manual. Derived classes of IceModel may redefine this method and print alternate information. Use of DiagnosticTimeseries may be superior, however.

Reimplemented in IceMISMIPModel.

Definition at line 259 of file iMreport.cc.

References config, grid, secpera, stdout_flags, and stdout_ssa.

Referenced by run(), and summary().

PetscErrorCode temperatureStep ( PetscScalar *  vertSacrCount,
PetscScalar *  bulgeCount 
) [protected, virtual]

Takes a semi-implicit time-step for the temperature equation.

This method should be kept because it is worth having alternative physics, and so that older results can be reproduced. In particular, this method is documented by papers [BBL,BBssasliding]. The new browser page BOMBPROOF, PISM's numerical scheme for conservation of energy essentially documents the cold-ice-BOMBPROOF method here, but the newer enthalpy-based method is slightly different and (we hope) a superior implementation of the conservation of energy principle.

The conservation of energy equation written in terms of temperature is

\[ \rho c_p(T) \frac{dT}{dt} = k \frac{\partial^2 T}{\partial z^2} + \Sigma,\]

where $T(t,x,y,z)$ is the temperature of the ice. This equation is the shallow approximation of the full 3D conservation of energy. Note $dT/dt$ stands for the material derivative, so advection is included. Here $\rho$ is the density of ice, $c_p$ is its specific heat, and $k$ is its conductivity. Also $\Sigma$ is the volume strain heating (with SI units of $J/(\text{s} \text{m}^3) = \text{W}\,\text{m}^{-3}$).

We handle horizontal advection explicitly by first-order upwinding. We handle vertical advection implicitly by centered differencing when possible, and retreat to implicit first-order upwinding when necessary. There is a CFL condition for the horizontal explicit upwinding [MortonMayers]. We report any CFL violations, but they are designed to not occur.

The vertical conduction term is always handled implicitly (i.e. by backward Euler).

We work from the bottom of the column upward in building the system to solve (in the semi-implicit time-stepping scheme). The excess energy above pressure melting is converted to melt-water, and that a fraction of this melt water is transported to the ice base according to the scheme in excessToFromBasalMeltLayer().

The method uses equally-spaced calculation but the methods getValColumn(), setValColumn() interpolate back-and-forth from this equally-spaced calculational grid to the (usually) non-equally spaced storage grid.

An instance of tempSystemCtx is used to solve the tridiagonal system set-up here.

In this procedure four scalar fields are modified: vHmelt, vbmr, and vWork3d. But vbmr will never need to communicate ghosted values (horizontal stencil neighbors). The ghosted values for T3 are updated from the values in vWork3d in the communication done by energyStep(). There is a diffusion model for vHmelt in diffuseHmelt() which does communication for vHmelt.

The (older) scheme cold-ice-BOMBPROOF, implemented here, is very reliable, but there is still an extreme and rare fjord situation which causes trouble. For example, it occurs in one column of ice in one fjord perhaps only once in a 200ka simulation of the whole sheet, in my (ELB) experience modeling the Greenland ice sheet. It causes the discretized advection bulge to give temperatures below that of the coldest ice anywhere, a continuum impossibility. So as a final protection there is a "bulge limiter" which sets the temperature to the surface temperature of the column minus the bulge maximum (15 K) if it is below that level. The number of times this occurs is reported as a "BPbulge" percentage.

Reimplemented in IceCompModel.

Definition at line 127 of file iMtemp.cc.

References allowAboveMelting, artm, IceFlowLaw::beta_CC_grad, btu, IceFlowLaw::c_p, checkThinNeigh(), config, dt_years_TempAge, tempSystemCtx::dtTemp, tempSystemCtx::dx, tempSystemCtx::dy, tempSystemCtx::dzEQ, excessToFromBasalMeltLayer(), PISMStressBalance::get_3d_velocity(), PISMStressBalance::get_basal_frictional_heating(), PISMBedThermalUnit::get_upward_geothermal_flux(), PISMStressBalance::get_volumetric_strain_heating(), grid, ice, tempSystemCtx::ice_c_p, tempSystemCtx::ice_k, tempSystemCtx::ice_rho, PISMSurfaceModel::ice_surface_temperature(), tempSystemCtx::initAllColumns(), issounding(), IceFlowLaw::k, IceFlowLaw::melting_point_temp, ocean, columnSystemCtx::reportColumnZeroPivotErrorMFile(), IceFlowLaw::rho, secpera, tempSystemCtx::setBasalBoundaryValuesThisColumn(), columnSystemCtx::setIndicesAndClearThisColumn(), tempSystemCtx::setSchemeParamsThisColumn(), tempSystemCtx::setSurfaceBoundaryValuesThisColumn(), PISMOceanModel::shelf_base_mass_flux(), PISMOceanModel::shelf_base_temperature(), shelfbmassflux, shelfbtemp, tempSystemCtx::Sigma, tempSystemCtx::solveThisColumn(), stress_balance, surface, tempSystemCtx::T, T3, tempSystemCtx::T3, tempSystemCtx::u, tempSystemCtx::v, vbmr, vH, vHmelt, columnSystemCtx::viewColumnInfoMFile(), vMask, vWork2d, vWork3d, tempSystemCtx::w, and exactV::x.

Referenced by energyStep().

PetscErrorCode ts_max_timestep ( double  t_years,
double &  dt_years 
) [protected]

Computes the maximum time-step we can take and still hit all the requested years.

Sets dt_years to -1 if any time-step is OK.

Definition at line 708 of file iMtimeseries.cc.

References config, save_ts, and ts_times.

PetscErrorCode update_mask ( ) [protected, virtual]

Definition at line 51 of file iMgeometry.cc.

References config, grid, ice, ocean, PISMOceanModel::sea_level_elevation(), vbed, vH, and vMask.

Referenced by updateSurfaceElevationAndMask().

PetscErrorCode update_surface_elevation ( ) [protected, virtual]

Definition at line 79 of file iMgeometry.cc.

References config, grid, ice, ocean, PISMOceanModel::sea_level_elevation(), vbed, vH, vh, and vMask.

Referenced by updateSurfaceElevationAndMask().

PetscErrorCode update_viewers ( ) [protected, virtual]

Update the runtime graphical viewers.

Most viewers are updated by this routine, but some other are updated elsewhere.

Definition at line 30 of file iMviewers.cc.

References config, diagnostics, grid, jd, map_viewers, sounding_viewers, exactV::v(), variables, and viewers.

Referenced by run().

PetscErrorCode updateSurfaceElevationAndMask ( ) [protected, virtual]

Update the surface elevation and the flow-type mask when the geometry has changed.

This procedure should be called whenever necessary to maintain consistency of geometry.

For instance, it should be called when either ice thickness or bed elevation change. In particular we always want $h = H + b$ to apply at grounded points, and, on the other hand, we want the mask to reflect that the ice is floating if the flotation criterion applies at a point.

Also calls the (PIK) routines which remove icebergs, to avoid stress balance solver problems associated to not-attached-to-grounded ice.

Definition at line 37 of file iMgeometry.cc.

References config, killIceBergs(), update_mask(), and update_surface_elevation().

Referenced by bed_def_step(), bootstrapFromFile(), IceMISMIPModel::calving(), model_state_setup(), IceEISModel::set_vars_from_options(), and step().

PetscErrorCode volumeArea ( PetscScalar &  gvolume,
PetscScalar &  garea,
PetscScalar &  gvolSIA,
PetscScalar &  gvolstream,
PetscScalar &  gvolshelf 
) [protected, virtual]

Computes volume and area of ice sheet, for reporting purposes.

Also computes ice volumes in the three mask regions SHEET, DRAGGING, FLOATING.

Communication done for global max and global sum.

Returns area in units of m^2 and volume in m^3.

Definition at line 35 of file iMreport.cc.

References cell_area, grid, vH, and vMask.

Referenced by IcePSTexModel::additionalAtEndTimestep(), and summary().

PetscErrorCode write_backup ( ) [protected]

Write a backup (i.e. an intermediate result of a run).

Definition at line 729 of file iMIO.cc.

References backup_filename, backup_interval, backup_vars, event_backups, executable_short_name, flush_timeseries(), grid, last_backup_time, vnreport::nc, stampHistory(), start_time, write_metadata(), and write_variables().

Referenced by run().

PetscErrorCode write_extras ( ) [protected]

Write spatially-variable diagnostic quantities.

Definition at line 588 of file iMtimeseries.cc.

References current_extra, executable_short_name, extra_file_is_ready, extra_filename, extra_times, extra_vars, grid, vnreport::nc, save_extra, split_extra, write_metadata(), and write_variables().

Referenced by run().

PetscErrorCode write_metadata ( const char *  filename) [virtual]

Write metadata (global attributes, overrides and mapping parameters) to a file.

Definition at line 90 of file iMIO.cc.

References config, global_attributes, mapping, and overrides.

Referenced by dumpToFile(), write_backup(), write_extras(), and write_snapshot().

PetscErrorCode write_model_state ( const char *  filename) [virtual]

Definition at line 280 of file iMIO.cc.

References config, grid, output_vars, and write_variables().

Referenced by dumpToFile().

PetscErrorCode write_snapshot ( ) [protected]
PetscErrorCode write_timeseries ( ) [protected]

Write time-series.

Definition at line 436 of file iMtimeseries.cc.

References compute_by_name(), current_ts, grid, save_ts, timeseries, and ts_times.

Referenced by run().

PetscErrorCode write_variables ( const char *  filename,
set< string vars,
nc_type  nctype 
) [virtual]
PetscErrorCode writeFiles ( const char *  default_filename) [virtual]

Save model state in NetCDF format.

Optionally allows saving of full velocity field.

Calls dumpToFile() to do the actual work.

Definition at line 34 of file iMIO.cc.

References config, dumpToFile(), event_output, grid, and stampHistoryEnd().

Referenced by main().


Friends And Related Function Documentation

friend class IceModel_bwp [friend]

Definition at line 69 of file iceModel.hh.

friend class IceModel_cts [friend]

Definition at line 70 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_dhdt [friend]

Definition at line 71 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_enthalpybase [friend]

Definition at line 75 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_enthalpysurf [friend]

Definition at line 76 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_hardav [friend]

Definition at line 68 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_liqfrac [friend]

Definition at line 79 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_new_mask [friend]

Definition at line 82 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_temp [friend]

Definition at line 72 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_temp_pa [friend]

Definition at line 73 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_tempbase [friend]

Definition at line 77 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_tempicethk [friend]

Definition at line 80 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_tempicethk_basal [friend]

Definition at line 81 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_temppabase [friend]

Definition at line 74 of file iceModel.hh.

Referenced by init_diagnostics().

friend class IceModel_tempsurf [friend]

Definition at line 78 of file iceModel.hh.

Referenced by init_diagnostics().


Member Data Documentation

IceModelVec2S acab [protected]
char adaptReasonFlag [protected]

Definition at line 247 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), determineTimeStep(), run(), and step().

PetscTruth allowAboveMelting [protected]
IceModelVec2S artm [protected]
string backup_filename [protected]

Definition at line 429 of file iceModel.hh.

Referenced by init_backups(), and write_backup().

double backup_interval [protected]

Definition at line 428 of file iceModel.hh.

Referenced by init_backups(), and write_backup().

set<string> backup_vars [protected]

Definition at line 431 of file iceModel.hh.

Referenced by init_backups(), and write_backup().

PISMBedDef* beddef [protected]
IceModelVec2S bedtoptemp [protected]

temperature seen by bedrock thermal layer, if present; no ghosts ghosted to be able to compute tauc "redundantly"

Definition at line 176 of file iceModel.hh.

Referenced by createVecs(), energyStep(), and model_state_setup().

PISMBedThermalUnit* btu [protected]
IceModelVec2S cell_area [protected]
PetscReal CFLmaxdt [protected]

Definition at line 220 of file iceModel.hh.

Referenced by computeMax3DVelocities(), determineTimeStep(), and reset_counters().

PetscReal CFLmaxdt2D [protected]

Definition at line 220 of file iceModel.hh.

Referenced by computeMax2DSlidingSpeed(), determineTimeStep(), and reset_counters().

PetscReal CFLviolcount [protected]

really is just a count, but PetscGlobalSum requires this type

Definition at line 220 of file iceModel.hh.

Referenced by energyStep(), reset_counters(), and summary().

NCConfigVariable & config [protected]

configuration flags and parameters

Definition at line 152 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), IceCompModel::additionalAtStartTimestep(), ageStats(), allocate_basal_resistance_law(), IcePSTexModel::allocate_basal_yield_stress(), allocate_basal_yield_stress(), IceCompModel::allocate_bed_deformation(), allocate_bed_deformation(), IceCompModel::allocate_bedrock_thermal_unit(), allocate_bedrock_thermal_unit(), IceCompModel::allocate_enthalpy_converter(), allocate_enthalpy_converter(), IceCompModel::allocate_flowlaw(), IceEISModel::allocate_flowlaw(), allocate_flowlaw(), IceCompModel::allocate_stressbalance(), IceEISModel::allocate_stressbalance(), allocate_stressbalance(), bed_def_step(), bootstrap_2d(), bootstrap_3d(), calculateRedistResiduals(), calvingAtThickness(), check_maximum_thickness(), compute_by_name(), compute_cell_areas(), compute_ice_enthalpy(), IceCompModel::computeGeometryErrors(), computeMax2DSlidingSpeed(), computeMax3DVelocities(), create_timeseries(), createVecs(), determineTimeStep(), eigenCalving(), energyStep(), enthalpyAndDrainageStep(), extras_max_timestep(), findIceBergCandidates(), IceMISMIPModel::getMISMIPStats(), ice_mass_bookkeeping(), IceCompModel::IceCompModel(), IceEISModel::IceEISModel(), IceMISMIPModel::IceMISMIPModel(), init_backups(), IceMISMIPModel::init_couplers(), init_ocean_kill(), init_timeseries(), init_viewers(), initFromFile(), killEasyIceBergs(), massContExplicitStep(), model_state_setup(), putTempAtDepth(), regrid(), run(), IceEISModel::set_expername_from_options(), IceCompModel::set_grid_defaults(), set_output_size(), set_time_from_options(), setDefaults(), IceCompModel::setFromOptions(), IceMISMIPModel::setFromOptions(), IcePSTexModel::setFromOptions(), IceEISModel::setFromOptions(), setFromOptions(), summary(), summaryPrintLine(), temperatureStep(), ts_max_timestep(), update_mask(), update_surface_elevation(), update_viewers(), updateSurfaceElevationAndMask(), write_metadata(), write_model_state(), and writeFiles().

unsigned int current_extra [protected]

Definition at line 421 of file iceModel.hh.

Referenced by init_extras(), and write_extras().

unsigned int current_snapshot [protected]

Definition at line 400 of file iceModel.hh.

Referenced by init_snapshots(), and write_snapshot().

unsigned int current_ts [protected]

times requested

Definition at line 408 of file iceModel.hh.

Referenced by init_timeseries(), and write_timeseries().

map<string,PISMDiagnostic*> diagnostics [protected]
PetscReal dt [protected]
PetscReal dt_force [protected]
PetscReal dt_from_cfl [protected]

Definition at line 220 of file iceModel.hh.

Referenced by determineTimeStep(), and reset_counters().

Definition at line 220 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), and reset_counters().

enthalpy/temperature and age time-steps

Definition at line 220 of file iceModel.hh.

Referenced by ageStep(), countCFLViolations(), energyStep(), enthalpyAndDrainageStep(), reset_counters(), run(), step(), and temperatureStep().

PetscReal dvoldt [protected]

d(total ice volume)/dt; m3 s-1

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), massContExplicitStep(), and reset_counters().

EnthalpyConverter* EC [protected]
IceModelVec3 Enth3 [protected]
int event_age [private]

age computation

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

int event_backups [private]

time spent writing backups files

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and write_backup().

int event_beddef [private]

bed deformation step

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

int event_energy [private]

energy balance computation

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

int event_mass [private]

mass continuity computation

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

int event_output [private]

time spent writing the output file

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and writeFiles().

int event_snapshots [private]

time spent writing snapshots

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and write_snapshot().

int event_step [private]

total time spent doing time-stepping

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

int event_velocity [private]

total velocity computation

Definition at line 445 of file iceModel.hh.

Referenced by misc_setup(), and step().

Definition at line 418 of file iceModel.hh.

Referenced by init_extras(), and write_extras().

string extra_filename [protected]

Definition at line 419 of file iceModel.hh.

Referenced by init_extras(), and write_extras().

vector<double> extra_times [protected]

Definition at line 420 of file iceModel.hh.

Referenced by extras_max_timestep(), init_extras(), and write_extras().

set<string> extra_vars [protected]

Definition at line 422 of file iceModel.hh.

Referenced by init_extras(), and write_extras().

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), and massContExplicitStep().

PetscReal gdHdtav [protected]

average value in map-plane (2D) of dH/dt, where there is ice; m s-1

Definition at line 220 of file iceModel.hh.

Referenced by massContExplicitStep(), and reset_counters().

PetscReal gDmax [protected]

Definition at line 220 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), and reset_counters().

NCGlobalAttributes global_attributes [protected]
PetscReal gmaxu [protected]

Definition at line 220 of file iceModel.hh.

Referenced by computeMax3DVelocities(), reset_counters(), and setDefaults().

PetscReal gmaxv [protected]

Definition at line 220 of file iceModel.hh.

Referenced by computeMax3DVelocities(), reset_counters(), and setDefaults().

PetscReal gmaxw [protected]

Definition at line 220 of file iceModel.hh.

Referenced by computeMax3DVelocities(), reset_counters(), and setDefaults().

IceGrid& grid [protected]

Definition at line 150 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), IceCompModel::additionalAtEndTimestep(), IcePSTexModel::additionalAtEndTimestep(), IceCompModel::additionalAtStartTimestep(), IceMISMIPModel::additionalAtStartTimestep(), ageStats(), ageStep(), IcePSTexModel::allocate_basal_yield_stress(), allocate_basal_yield_stress(), IceCompModel::allocate_bed_deformation(), allocate_bed_deformation(), IceCompModel::allocate_bedrock_thermal_unit(), allocate_bedrock_thermal_unit(), IceCompModel::allocate_flowlaw(), IceMISMIPModel::allocate_flowlaw(), allocate_flowlaw(), allocate_internal_objects(), IceCompModel::allocate_stressbalance(), IceEISModel::allocate_stressbalance(), allocate_stressbalance(), bed_def_step(), bootstrap_2d(), bootstrap_3d(), bootstrapFromFile(), calculateRedistResiduals(), IceMISMIPModel::calving(), calvingAtThickness(), check_maximum_thickness(), compute_cell_areas(), compute_enthalpy(), compute_enthalpy_cold(), compute_ice_area(), compute_ice_area_cold(), compute_ice_area_floating(), compute_ice_area_grounded(), compute_ice_area_temperate(), compute_ice_enthalpy(), compute_ice_volume(), compute_ice_volume_cold(), compute_ice_volume_temperate(), compute_liquid_water_fraction(), IceCompModel::computeBasalMeltRateErrors(), IceCompModel::computeBasalTemperatureErrors(), IceCompModel::computeBasalVelocityErrors(), IceCompModel::computeGeometryErrors(), IceCompModel::computeIceBedrockTemperatureErrors(), computeMax2DSlidingSpeed(), computeMax3DVelocities(), IceCompModel::computeSigmaErrors(), IceCompModel::computeSurfaceVelocityErrors(), IceCompModel::computeTemperatureErrors(), countCFLViolations(), create_timeseries(), IceCompModel::createVecs(), createVecs(), determineTimeStep(), dumpToFile(), eigenCalving(), endOfTimeStepHook(), energyStats(), energyStep(), enthalpyAndDrainageStep(), excessToFromBasalMeltLayer(), IceCompModel::fillSolnTestABCDH(), IceCompModel::fillSolnTestE(), IceCompModel::fillSolnTestFG(), IceCompModel::fillTemperatureSolnTestsKO(), findIceBergCandidates(), IceEISModel::generateMoundTopography(), IceEISModel::generateTroughTopography(), get_average_thickness(), get_bed_top_temp(), IceCompModel::getCompSourcesTestCDH(), IceCompModel::getCompSourcesTestFG(), getEnthalpyCTSColumn(), IceMISMIPModel::getMISMIPStats(), IceMISMIPModel::getRoutineStats(), grid_setup(), ice_mass_bookkeeping(), IceModel(), identifyNotAnIceBerg(), init(), init_backups(), IceEISModel::init_couplers(), init_couplers(), init_diagnostics(), init_extras(), IceMISMIPModel::init_ocean_kill(), init_ocean_kill(), init_snapshots(), init_timeseries(), init_viewers(), IceMISMIPModel::initFromFile(), IcePSTexModel::initFromFile(), initFromFile(), IceCompModel::initTestABCDEH(), IceCompModel::initTestFG(), IceCompModel::initTestL(), killEasyIceBergs(), killIdentifiedIceBergs(), massContExplicitStep(), IceMISMIPModel::misc_setup(), misc_setup(), model_state_setup(), IcePSTexModel::prepare_series(), putTempAtDepth(), redistResiduals(), regrid(), regrid_variables(), IceCompModel::reportErrors(), IceCompModel::reset_thickness_tests_AE(), run(), IceEISModel::set_expername_from_options(), IceCompModel::set_grid_defaults(), IceMISMIPModel::set_grid_defaults(), IceEISModel::set_grid_defaults(), set_grid_defaults(), IceMISMIPModel::set_grid_from_options(), set_grid_from_options(), set_output_size(), IceMISMIPModel::set_time_from_options(), set_time_from_options(), IceCompModel::set_vars_from_options(), IceMISMIPModel::set_vars_from_options(), IcePSTexModel::set_vars_from_options(), IceEISModel::set_vars_from_options(), set_vars_from_options(), IceMISMIPModel::setBed(), IcePSTexModel::setBedElev(), setCTSFromEnthalpy(), setDefaults(), IceCompModel::setFromOptions(), IceMISMIPModel::setFromOptions(), IcePSTexModel::setFromOptions(), IceEISModel::setFromOptions(), setFromOptions(), stampHistoryCommand(), stampHistoryEnd(), step(), summary(), IceMISMIPModel::summaryPrintLine(), summaryPrintLine(), temperatureStep(), IceCompModel::test_V_init(), IceCompModel::test_V_set_thickness_bc(), update_mask(), update_surface_elevation(), update_viewers(), volumeArea(), write_backup(), write_extras(), write_model_state(), write_snapshot(), write_timeseries(), write_variables(), writeFiles(), IceMISMIPModel::writeMISMIPasciiFile(), and IceMISMIPModel::writeMISMIPFinalFiles().

IceFlowLaw* ice [protected]
PetscInt id [protected]

Definition at line 439 of file iceModel.hh.

PetscInt jd [protected]

Definition at line 439 of file iceModel.hh.

Referenced by issounding(), setDefaults(), setFromOptions(), and update_viewers().

Definition at line 430 of file iceModel.hh.

Referenced by init_backups(), and write_backup().

PetscScalar last_bed_def_update [protected]

Definition at line 269 of file iceModel.hh.

Referenced by bed_def_step(), and model_state_setup().

IceModelVec2S liqfrac_surface [protected]

ice liquid water fraction at the top surface of the ice

Definition at line 176 of file iceModel.hh.

Referenced by check_maximum_thickness(), createVecs(), and enthalpyAndDrainageStep().

set<string> map_viewers [protected]

Definition at line 438 of file iceModel.hh.

Referenced by init_viewers(), and update_viewers().

NCConfigVariable mapping [protected]

grid projection (mapping) parameters

Definition at line 152 of file iceModel.hh.

Referenced by compute_cell_areas(), grid_setup(), IceModel(), set_grid_defaults(), and write_metadata().

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), and massContExplicitStep().

const PetscInt nWork2d = 2 [static, protected]

Definition at line 381 of file iceModel.hh.

Referenced by allocate_internal_objects().

PISMOceanModel* ocean [protected]

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), and massContExplicitStep().

IceModelVec2Int ocean_kill_mask [protected]

mask used by the -ocean_kill code

Definition at line 205 of file iceModel.hh.

Referenced by createVecs(), IceMISMIPModel::init_ocean_kill(), init_ocean_kill(), and massContExplicitStep().

set<string> output_vars [protected]

Definition at line 393 of file iceModel.hh.

Referenced by misc_setup(), and write_model_state().

NCConfigVariable & overrides [protected]

flags and parameters overriding config, see -config_override

Definition at line 152 of file iceModel.hh.

Referenced by write_metadata().

PetscTruth putOnTop [protected]

Definition at line 246 of file iceModel.hh.

Referenced by calculateRedistResiduals().

PetscTruth repeatRedist [protected]

Definition at line 246 of file iceModel.hh.

Referenced by calculateRedistResiduals(), and redistResiduals().

bool save_extra [protected]

Definition at line 418 of file iceModel.hh.

Referenced by extras_max_timestep(), IceModel(), init_extras(), and write_extras().

bool save_snapshots [protected]

Definition at line 397 of file iceModel.hh.

Referenced by check_maximum_thickness(), IceModel(), init_snapshots(), and write_snapshot().

bool save_ts [protected]

Definition at line 405 of file iceModel.hh.

Referenced by IceModel(), init_timeseries(), ts_max_timestep(), and write_timeseries().

IceModelVec2S shelfbmassflux [protected]

ice mass flux into the ocean at the shelf base; no ghosts

Definition at line 176 of file iceModel.hh.

Referenced by createVecs(), enthalpyAndDrainageStep(), ice_mass_bookkeeping(), massContExplicitStep(), and temperatureStep().

IceModelVec2S shelfbtemp [protected]

ice temperature at the shelf base; no ghosts

Definition at line 176 of file iceModel.hh.

Referenced by createVecs(), enthalpyAndDrainageStep(), get_bed_top_temp(), and temperatureStep().

PetscTruth shelvesDragToo [protected]

Definition at line 245 of file iceModel.hh.

Referenced by setDefaults().

PetscInt skipCountDown [protected]

Definition at line 236 of file iceModel.hh.

Referenced by adaptTimeStepDiffusivity(), determineTimeStep(), reset_counters(), run(), and step().

set<string> slice_viewers [protected]

Definition at line 438 of file iceModel.hh.

vector<double> snapshot_times [protected]

Definition at line 398 of file iceModel.hh.

Referenced by init_snapshots(), and write_snapshot().

set<string> snapshot_vars [protected]

Definition at line 399 of file iceModel.hh.

Referenced by init_snapshots(), and write_snapshot().

Definition at line 397 of file iceModel.hh.

Referenced by check_maximum_thickness(), init_snapshots(), and write_snapshot().

Definition at line 396 of file iceModel.hh.

Referenced by check_maximum_thickness(), init_snapshots(), and write_snapshot().

set<string> sounding_viewers [protected]

Definition at line 438 of file iceModel.hh.

Referenced by init_viewers(), and update_viewers().

bool split_extra [protected]

Definition at line 418 of file iceModel.hh.

Referenced by init_extras(), and write_extras().

bool split_snapshots [protected]

Definition at line 397 of file iceModel.hh.

Referenced by check_maximum_thickness(), init_snapshots(), and write_snapshot().

PetscScalar standard_gravity [protected]

Definition at line 240 of file iceModel.hh.

Referenced by IceCompModel::computeGeometryErrors(), and setDefaults().

PetscLogDouble start_time [private]

Definition at line 443 of file iceModel.hh.

Referenced by init(), stampHistoryEnd(), and write_backup().

string stdout_flags [protected]

Definition at line 249 of file iceModel.hh.

Referenced by energyStep(), run(), step(), summary(), and summaryPrintLine().

string stdout_ssa [protected]

Definition at line 249 of file iceModel.hh.

Referenced by summaryPrintLine().

PISMSurfaceModel* surface [protected]
IceModelVec3 T3 [protected]

time of last update for enthalpy/temperature

Definition at line 220 of file iceModel.hh.

Referenced by energyStep(), run(), set_time_from_options(), and step().

IceModelVec3 tau3 [protected]

age of ice; s (ghosted because it is evaluated on the staggered-grid)

Definition at line 215 of file iceModel.hh.

Referenced by ageStats(), ageStep(), bootstrap_3d(), check_maximum_thickness(), createVecs(), and initFromFile().

vector<DiagnosticTimeseries*> timeseries [protected]

variables requested

Definition at line 410 of file iceModel.hh.

Referenced by create_timeseries(), flush_timeseries(), write_timeseries(), and ~IceModel().

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), ice_mass_bookkeeping(), and reset_counters().

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), ice_mass_bookkeeping(), and reset_counters().

Definition at line 220 of file iceModel.hh.

Referenced by compute_by_name(), ice_mass_bookkeeping(), and reset_counters().

string ts_filename [protected]

true if the user requested time-series output

Definition at line 406 of file iceModel.hh.

Referenced by create_timeseries(), and init_timeseries().

vector<double> ts_times [protected]

file to write time-series to

Definition at line 407 of file iceModel.hh.

Referenced by init_timeseries(), ts_max_timestep(), and write_timeseries().

set<string> ts_vars [protected]

index of the current time

Definition at line 409 of file iceModel.hh.

Referenced by create_timeseries(), and init_timeseries().

PetscTruth updateHmelt [protected]
PISMVars variables [protected]

A dictionary with pointers to IceModelVecs below, for passing them from the IceModel core to other components (such as surface and ocean models)

Definition at line 172 of file iceModel.hh.

Referenced by IceCompModel::allocate_stressbalance(), IceEISModel::allocate_stressbalance(), allocate_stressbalance(), IceCompModel::createVecs(), createVecs(), init_couplers(), init_diagnostics(), init_extras(), initFromFile(), model_state_setup(), regrid_variables(), set_output_size(), step(), update_viewers(), and write_variables().

IceModelVec2Int vBCMask [protected]

mask to determine Dirichlet boundary locations

Definition at line 205 of file iceModel.hh.

Referenced by bootstrap_2d(), createVecs(), and massContExplicitStep().

IceModelVec2V vBCvel [protected]

Dirichlet boundary velocities.

Definition at line 211 of file iceModel.hh.

Referenced by bootstrap_2d(), createVecs(), and massContExplicitStep().

IceModelVec2S vbed [protected]
IceModelVec2S vbmr [protected]
IceModelVec2S vdHdt [protected]

$ \frac{dH}{dt} $; ghosted to simplify the code computing it

Definition at line 176 of file iceModel.hh.

Referenced by createVecs(), IceMISMIPModel::getRoutineStats(), massContExplicitStep(), and step().

IceModelVec2S vGhf [protected]
IceModelVec2S vh [protected]
IceModelVec2S vH [protected]

ice thickness; ghosted

Definition at line 176 of file iceModel.hh.

Referenced by IcePSTexModel::additionalAtEndTimestep(), ageStats(), ageStep(), bootstrap_2d(), calculateRedistResiduals(), IceMISMIPModel::calving(), calvingAtThickness(), check_maximum_thickness(), compute_enthalpy(), compute_enthalpy_cold(), compute_ice_area(), compute_ice_area_cold(), compute_ice_area_temperate(), compute_ice_enthalpy(), compute_ice_volume(), compute_ice_volume_cold(), compute_ice_volume_temperate(), compute_liquid_water_fraction(), IceCompModel::computeBasalVelocityErrors(), IceCompModel::computeGeometryErrors(), computeMax3DVelocities(), IceCompModel::computeSigmaErrors(), IceCompModel::computeSurfaceVelocityErrors(), IceCompModel::computeTemperatureErrors(), countCFLViolations(), createVecs(), eigenCalving(), energyStats(), enthalpyAndDrainageStep(), IceCompModel::fillSolnTestABCDH(), IceCompModel::fillSolnTestE(), IceCompModel::fillSolnTestFG(), IceCompModel::fillSolnTestL(), findIceBergCandidates(), get_bed_top_temp(), IceMISMIPModel::getMISMIPStats(), IceMISMIPModel::getRoutineStats(), ice_mass_bookkeeping(), init_ocean_kill(), IceCompModel::initTestABCDEH(), IceCompModel::initTestFG(), IceCompModel::initTestL(), IceCompModel::initTestsKO(), killEasyIceBergs(), killIdentifiedIceBergs(), massContExplicitStep(), putTempAtDepth(), IceCompModel::reset_thickness_tests_AE(), IceMISMIPModel::set_vars_from_options(), IceEISModel::set_vars_from_options(), setCTSFromEnthalpy(), summary(), temperatureStep(), IceCompModel::test_V_set_thickness_bc(), update_mask(), update_surface_elevation(), volumeArea(), and IceMISMIPModel::writeMISMIPasciiFile().

IceModelVec2S vHmelt [protected]
IceModelVec2S vHref [protected]

accumulated mass advected to a partially filled grid cell

Definition at line 176 of file iceModel.hh.

Referenced by bootstrap_2d(), calculateRedistResiduals(), createVecs(), eigenCalving(), initFromFile(), killEasyIceBergs(), and massContExplicitStep().

IceModelVec2S vHresidual [protected]

residual ice mass of a not any longer partially (fully) filled grid cell

Definition at line 176 of file iceModel.hh.

Referenced by bootstrap_2d(), calculateRedistResiduals(), createVecs(), and massContExplicitStep().

IceModelVec2Int vIcebergMask [protected]

mask for iceberg identification

Definition at line 205 of file iceModel.hh.

Referenced by bootstrap_2d(), createVecs(), findIceBergCandidates(), identifyNotAnIceBerg(), and killIdentifiedIceBergs().

map<string,PetscViewer> viewers [protected]

Definition at line 440 of file iceModel.hh.

Referenced by update_viewers(), and ~IceModel().

IceModelVec2S vLatitude [protected]

Latitude; ghosted to compute cell areas.

Definition at line 176 of file iceModel.hh.

Referenced by bootstrap_2d(), compute_cell_areas(), and createVecs().

IceModelVec2S vLongitude [protected]

Longitude; ghosted to compute cell areas.

Definition at line 176 of file iceModel.hh.

Referenced by bootstrap_2d(), compute_cell_areas(), and createVecs().

IceModelVec2Int vMask [protected]

mask for flow type with values ice_free_bedrock, grounded_ice, floating_ice, ice_free_ocean

Definition at line 205 of file iceModel.hh.

Referenced by IceMISMIPModel::calving(),