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

IceCompModel Class Reference

#include <iceCompModel.hh>

Inheritance diagram for IceCompModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IceCompModel (IceGrid &g, NCConfigVariable &config, NCConfigVariable &overrides, int mytest)
virtual ~IceCompModel ()
virtual PetscErrorCode set_grid_defaults ()
 Set default values of grid parameters.
virtual PetscErrorCode setFromOptions ()
 Read runtime (command line) options and alter the corresponding parameters or flags as appropriate.
virtual PetscErrorCode createVecs ()
 Allocate all IceModelVecs defined in IceModel.
virtual PetscErrorCode allocate_flowlaw ()
 Decide which ice flow law to use.
virtual PetscErrorCode allocate_stressbalance ()
 Decide which stress balance model to use.
virtual PetscErrorCode allocate_bedrock_thermal_unit ()
 Decide which bedrock thermal unit to use.
virtual PetscErrorCode allocate_bed_deformation ()
virtual PetscErrorCode allocate_enthalpy_converter ()
 Decide which enthalpy converter to use.
virtual PetscErrorCode set_vars_from_options ()
 Sets starting values of model state variables using command-line options.
PetscErrorCode reportErrors ()

Protected Member Functions

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.
PetscErrorCode computeGeometryErrors (PetscScalar &gvolexact, PetscScalar &gareaexact, PetscScalar &gdomeHexact, PetscScalar &volerr, PetscScalar &areaerr, PetscScalar &gmaxHerr, PetscScalar &gavHerr, PetscScalar &gmaxetaerr, PetscScalar &centerHerr)
virtual PetscErrorCode summary (bool tempAndAge)
PetscErrorCode initTestABCDEH ()
PetscErrorCode getCompSourcesTestCDH ()
PetscErrorCode fillSolnTestABCDH ()
PetscErrorCode fillSolnTestE ()
PetscErrorCode computeBasalVelocityErrors (PetscScalar &exactmaxspeed, PetscScalar &gmaxvecerr, PetscScalar &gavvecerr, PetscScalar &gmaxuberr, PetscScalar &gmaxvberr)
PetscErrorCode reset_thickness_tests_AE ()
 Tests A and E have a thickness B.C. (ice_thickness == 0 outside a circle of radius 750km).
PetscErrorCode initTestL ()
PetscErrorCode fillSolnTestL ()
virtual PetscErrorCode temperatureStep (PetscScalar *vertSacrCount, PetscScalar *bulgeCount)
PetscErrorCode initTestFG ()
PetscErrorCode getCompSourcesTestFG ()
PetscErrorCode fillSolnTestFG ()
PetscErrorCode computeTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr)
PetscErrorCode computeBasalTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr, PetscScalar &centerTerr)
PetscErrorCode computeSigmaErrors (PetscScalar &gmaxSigmaerr, PetscScalar &gavSigmaerr)
PetscErrorCode computeSurfaceVelocityErrors (PetscScalar &gmaxUerr, PetscScalar &gavUerr, PetscScalar &gmaxWerr, PetscScalar &gavWerr)
PetscErrorCode initTestsKO ()
PetscErrorCode fillTemperatureSolnTestsKO ()
PetscErrorCode fillBasalMeltRateSolnTestO ()
PetscErrorCode computeIceBedrockTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr, PetscScalar &gmaxTberr, PetscScalar &gavTberr)
PetscErrorCode computeBasalMeltRateErrors (PetscScalar &gmaxbmelterr, PetscScalar &gminbmelterr)
PetscErrorCode test_V_init ()
 Initialize test V.
PetscErrorCode test_V_set_thickness_bc ()
 Reset upstream thickness B.C.

Protected Attributes

ThermoGlenArrIcetgaIce
PetscTruth exactOnly
int testname
IceModelVec2S vHexactL
IceModelVec3 SigmaComp3
IceModelVec2Int bc_mask
IceModelVec2V bc_vel

Private Attributes

PetscScalar f
PetscTruth bedrock_is_ice_forK

Static Private Attributes

static const PetscScalar ablationRateOutside = 0.02
static const PetscScalar Ggeo = 0.042
static const PetscScalar ST = 1.67e-5
static const PetscScalar Tmin = 223.15
static const PetscScalar LforFG = 750000
static const PetscScalar ApforG = 200

Detailed Description

Definition at line 37 of file iceCompModel.hh.


Constructor & Destructor Documentation

IceCompModel ( IceGrid &  g,
NCConfigVariable &  config,
NCConfigVariable &  overrides,
int  mytest 
)

Definition at line 37 of file iceCompModel.cc.

References bedrock_is_ice_forK, IceModel::config, exactOnly, and testname.

virtual ~IceCompModel ( ) [inline, virtual]

Definition at line 41 of file iceCompModel.hh.


Member Function Documentation

PetscErrorCode additionalAtEndTimestep ( ) [protected, virtual]

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

Reimplemented from IceModel.

Definition at line 930 of file iceCompModel.cc.

References exactOnly, fillBasalMeltRateSolnTestO(), fillSolnTestABCDH(), fillSolnTestE(), fillSolnTestFG(), fillSolnTestL(), fillTemperatureSolnTestsKO(), IceModel::grid, reset_thickness_tests_AE(), and testname.

PetscErrorCode additionalAtStartTimestep ( ) [protected, virtual]

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

Reimplemented from IceModel.

Definition at line 896 of file iceCompModel.cc.

References IceModel::config, IceModel::dt_force, exactOnly, getCompSourcesTestCDH(), getCompSourcesTestFG(), IceModel::grid, secpera, test_V_set_thickness_bc(), and testname.

PetscErrorCode allocate_bed_deformation ( ) [virtual]

Reimplemented from IceModel.

Definition at line 327 of file iceCompModel.cc.

References IceModel::config, f, IceModel::grid, IceModel::ice, IceFlowLaw::rho, and testname.

PetscErrorCode allocate_bedrock_thermal_unit ( ) [virtual]

Decide which bedrock thermal unit to use.

Reimplemented from IceModel.

Definition at line 241 of file iceCompModel.cc.

References bedrock_is_ice_forK, IceModel::btu, IceFlowLaw::c_p, IceModel::config, IceModel::grid, IceModel::ice, IceFlowLaw::k, IceFlowLaw::rho, and testname.

PetscErrorCode allocate_enthalpy_converter ( ) [virtual]

Decide which enthalpy converter to use.

Reimplemented from IceModel.

Definition at line 230 of file iceCompModel.cc.

References IceModel::config, and IceModel::EC.

PetscErrorCode allocate_flowlaw ( ) [virtual]

Decide which ice flow law to use.

Reimplemented from IceModel.

Definition at line 280 of file iceCompModel.cc.

References IceModel::config, IceModel::grid, IceModel::ice, IceFlowLawIsPatersonBuddCold(), CustomGlenIce::setHardness(), testname, and tgaIce.

PetscErrorCode allocate_stressbalance ( ) [virtual]

Decide which stress balance model to use.

Reimplemented from IceModel.

Definition at line 308 of file iceCompModel.cc.

References IceModel::basal, IceModel::config, IceModel::EC, IceModel::grid, IceModel::ice, PISMStressBalance::init(), IceModel::stress_balance, testname, and IceModel::variables.

PetscErrorCode computeBasalMeltRateErrors ( PetscScalar &  gmaxbmelterr,
PetscScalar &  gminbmelterr 
) [protected]

Definition at line 611 of file iCMthermo.cc.

References exactO(), IceModel::grid, testname, and IceModel::vbmr.

Referenced by reportErrors().

PetscErrorCode computeBasalTemperatureErrors ( PetscScalar &  gmaxTerr,
PetscScalar &  gavTerr,
PetscScalar &  centerTerr 
) [protected]

Definition at line 418 of file iCMthermo.cc.

References ApforG, bothexact(), IceModel::grid, LforFG, ST, IceModel::T3, testname, and Tmin.

Referenced by reportErrors().

PetscErrorCode computeBasalVelocityErrors ( PetscScalar &  exactmaxspeed,
PetscScalar &  gmaxvecerr,
PetscScalar &  gavvecerr,
PetscScalar &  gmaxuberr,
PetscScalar &  gmaxvberr 
) [protected]
PetscErrorCode computeGeometryErrors ( PetscScalar &  gvolexact,
PetscScalar &  gareaexact,
PetscScalar &  gdomeHexact,
PetscScalar &  volerr,
PetscScalar &  areaerr,
PetscScalar &  gmaxHerr,
PetscScalar &  gavHerr,
PetscScalar &  gmaxetaerr,
PetscScalar &  centerHerr 
) [protected]
PetscErrorCode computeIceBedrockTemperatureErrors ( PetscScalar &  gmaxTerr,
PetscScalar &  gavTerr,
PetscScalar &  gmaxTberr,
PetscScalar &  gavTberr 
) [protected]
PetscErrorCode computeSigmaErrors ( PetscScalar &  gmaxSigmaerr,
PetscScalar &  gavSigmaerr 
) [protected]
PetscErrorCode computeSurfaceVelocityErrors ( PetscScalar &  gmaxUerr,
PetscScalar &  gavUerr,
PetscScalar &  gmaxWerr,
PetscScalar &  gavWerr 
) [protected]
PetscErrorCode computeTemperatureErrors ( PetscScalar &  gmaxTerr,
PetscScalar &  gavTerr 
) [protected]

Definition at line 266 of file iCMthermo.cc.

References ApforG, bothexact(), IceModel::grid, exactV::H(), LforFG, IceModel::T3, testname, and IceModel::vH.

Referenced by reportErrors().

PetscErrorCode createVecs ( ) [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 from IceModel.

Definition at line 59 of file iceCompModel.cc.

References IceModel::acab, IceModel::artm, bc_mask, bc_vel, IceModel::grid, SigmaComp3, testname, IceModel::variables, and vHexactL.

PetscErrorCode fillBasalMeltRateSolnTestO ( ) [protected]

Definition at line 682 of file iCMthermo.cc.

References exactO(), testname, and IceModel::vbmr.

Referenced by additionalAtEndTimestep().

PetscErrorCode fillSolnTestABCDH ( ) [protected]
PetscErrorCode fillSolnTestE ( ) [protected]
PetscErrorCode fillSolnTestFG ( ) [protected]
PetscErrorCode fillSolnTestL ( ) [protected]

Definition at line 687 of file iceCompModel.cc.

References IceModel::vbed, IceModel::vh, IceModel::vH, and vHexactL.

Referenced by additionalAtEndTimestep().

PetscErrorCode fillTemperatureSolnTestsKO ( ) [protected]
PetscErrorCode getCompSourcesTestCDH ( ) [protected]

Definition at line 559 of file iceCompModel.cc.

References IceModel::acab, exactC(), exactD(), exactH(), f, IceModel::grid, secpera, and testname.

Referenced by additionalAtStartTimestep().

PetscErrorCode getCompSourcesTestFG ( ) [protected]
PetscErrorCode initTestABCDEH ( ) [protected]
PetscErrorCode initTestFG ( ) [protected]
PetscErrorCode initTestL ( ) [protected]
PetscErrorCode initTestsKO ( ) [protected]
PetscErrorCode reportErrors ( )
PetscErrorCode reset_thickness_tests_AE ( ) [protected]

Tests A and E have a thickness B.C. (ice_thickness == 0 outside a circle of radius 750km).

Definition at line 587 of file iceCompModel.cc.

References IceModel::grid, and IceModel::vH.

Referenced by additionalAtEndTimestep().

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 from IceModel.

Definition at line 94 of file iceCompModel.cc.

References IceModel::config, IceModel::grid, and testname.

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 from IceModel.

Definition at line 345 of file iceCompModel.cc.

References IceModel::compute_enthalpy_cold(), IceModel::Enth3, IceModel::grid, initTestABCDEH(), initTestFG(), initTestL(), initTestsKO(), SigmaComp3, IceModel::T3, test_V_init(), testname, IceModel::vbmr, IceModel::vHmelt, and IceModel::vuplift.

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 from IceModel.

Definition at line 152 of file iceCompModel.cc.

References IceModel::allowAboveMelting, IceModel::config, exactOnly, IceModel::grid, ICE_ARR, ICE_CUSTOM, IceModel::iceFactory, IceFlowLawFactory::setType(), and testname.

PetscErrorCode summary ( bool  tempAndAge) [protected, virtual]

Reimplemented from IceModel.

Definition at line 988 of file iceCompModel.cc.

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

Re-implemented so that we can add compensatory Sigma in Tests F and G.

Reimplemented from IceModel.

Definition at line 35 of file iCMthermo.cc.

References PISMStressBalance::get_volumetric_strain_heating(), SigmaComp3, IceModel::stress_balance, and testname.

PetscErrorCode test_V_init ( ) [protected]
PetscErrorCode test_V_set_thickness_bc ( ) [protected]

Reset upstream thickness B.C.

Definition at line 1353 of file iceCompModel.cc.

References IceModel::grid, and IceModel::vH.

Referenced by additionalAtStartTimestep().


Member Data Documentation

const PetscScalar ablationRateOutside = 0.02 [static, private]

Definition at line 127 of file iceCompModel.hh.

Referenced by fillSolnTestFG(), getCompSourcesTestFG(), and initTestFG().

const PetscScalar ApforG = 200 [static, private]
IceModelVec2Int bc_mask [protected]

Definition at line 120 of file iceCompModel.hh.

Referenced by createVecs(), and test_V_init().

IceModelVec2V bc_vel [protected]

Definition at line 121 of file iceCompModel.hh.

Referenced by createVecs(), and test_V_init().

PetscTruth bedrock_is_ice_forK [private]
PetscTruth exactOnly [protected]
PetscScalar f [private]
const PetscScalar Ggeo = 0.042 [static, private]

Definition at line 130 of file iceCompModel.hh.

Referenced by initTestABCDEH(), initTestFG(), and initTestL().

const PetscScalar LforFG = 750000 [static, private]
IceModelVec3 SigmaComp3 [protected]
const PetscScalar ST = 1.67e-5 [static, private]

Definition at line 131 of file iceCompModel.hh.

Referenced by computeBasalTemperatureErrors(), fillSolnTestFG(), and initTestFG().

int testname [protected]
ThermoGlenArrIce* tgaIce [protected]

Definition at line 58 of file iceCompModel.hh.

Referenced by allocate_flowlaw(), initTestABCDEH(), and initTestL().

const PetscScalar Tmin = 223.15 [static, private]

Definition at line 132 of file iceCompModel.hh.

Referenced by computeBasalTemperatureErrors(), fillSolnTestFG(), and initTestFG().

IceModelVec2S vHexactL [protected]

Definition at line 85 of file iceCompModel.hh.

Referenced by computeGeometryErrors(), createVecs(), fillSolnTestL(), and initTestL().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines