#include <iceCompModel.hh>

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 | init_physics () |
| Initialize some physical parameters. | |
| virtual PetscErrorCode | set_vars_from_options () |
| Sets starting values of model state variables using command-line options. | |
| PetscErrorCode | reportErrors () |
Protected Member Functions | |
| void | mapcoords (const PetscInt i, const PetscInt j, PetscScalar &x, PetscScalar &y, PetscScalar &r) |
| 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 ¢erHerr) |
| virtual PetscErrorCode | summary (bool tempAndAge, bool useHomoTemp) |
| PetscErrorCode | initTestABCDEH () |
| PetscErrorCode | getCompSourcesTestCDH () |
| PetscErrorCode | fillSolnTestABCDH () |
| PetscErrorCode | fillSolnTestE () |
| PetscErrorCode | computeBasalVelocityErrors (PetscScalar &exactmaxspeed, PetscScalar &gmaxvecerr, PetscScalar &gavvecerr, PetscScalar &gmaxuberr, PetscScalar &gmaxvberr) |
| virtual PetscScalar | basalVelocitySIA (PetscScalar x, PetscScalar y, PetscScalar H, PetscScalar T, PetscScalar alpha, PetscScalar mu, PetscScalar min_T) const |
| Reimplement IceModel.basalVelocitySIA(), for Test E. Gives zero SIA-type sliding in other tests. | |
| PetscErrorCode | initTestL () |
| PetscErrorCode | fillSolnTestL () |
| virtual PetscErrorCode | temperatureStep (PetscScalar *vertSacrCount, PetscScalar *bulgeCount) |
| Takes a semi-implicit time-step for the temperature equation. | |
| PetscErrorCode | initTestFG () |
| PetscErrorCode | getCompSourcesTestFG () |
| PetscErrorCode | fillSolnTestFG () |
| PetscErrorCode | computeTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr) |
| PetscErrorCode | computeBasalTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr, PetscScalar ¢erTerr) |
| PetscErrorCode | computeSigmaErrors (PetscScalar &gmaxSigmaerr, PetscScalar &gavSigmaerr) |
| PetscErrorCode | computeSurfaceVelocityErrors (PetscScalar &gmaxUerr, PetscScalar &gavUerr, PetscScalar &gmaxWerr, PetscScalar &gavWerr) |
| PetscErrorCode | initTestK () |
| PetscErrorCode | fillSolnTestK () |
| PetscErrorCode | computeIceBedrockTemperatureErrors (PetscScalar &gmaxTerr, PetscScalar &gavTerr, PetscScalar &gmaxTberr, PetscScalar &gavTberr) |
Protected Attributes | |
| ThermoGlenArrIce * | tgaIce |
| PetscTruth | exactOnly |
| int | testname |
| IceModelVec2S | vHexactL |
| IceModelVec3 | SigmaComp3 |
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 |
Definition at line 37 of file iceCompModel.hh.
| IceCompModel | ( | IceGrid & | g, | |
| NCConfigVariable & | config, | |||
| NCConfigVariable & | overrides, | |||
| int | mytest | |||
| ) |
Definition at line 52 of file iceCompModel.cc.
References bedrock_is_ice_forK, IceModel.config, exactOnly, NCVariable.set(), NCConfigVariable.set_flag(), and testname.
| virtual ~IceCompModel | ( | ) | [virtual] |
Definition at line 41 of file iceCompModel.hh.
| 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 880 of file iceCompModel.cc.
References IceGrid.com, exactOnly, fillSolnTestABCDH(), fillSolnTestE(), fillSolnTestFG(), fillSolnTestK(), fillSolnTestL(), IceModel.grid, testname, and verbPrintf().
| 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 849 of file iceCompModel.cc.
References IceGrid.com, IceModel.config, IceModel.dt_force, exactOnly, NCConfigVariable.get(), getCompSourcesTestCDH(), getCompSourcesTestFG(), IceModel.grid, secpera, testname, and verbPrintf().
| PetscScalar basalVelocitySIA | ( | PetscScalar | x, | |
| PetscScalar | y, | |||
| PetscScalar | H, | |||
| PetscScalar | T, | |||
| PetscScalar | alpha, | |||
| PetscScalar | mu, | |||
| PetscScalar | min_T | |||
| ) | const [protected, virtual] |
Reimplement IceModel.basalVelocitySIA(), for Test E. Gives zero SIA-type sliding in other tests.
Reimplemented from IceModel.
Definition at line 329 of file iceCompModel.cc.
References pi, IceFlowLaw.rho, IceModel.standard_gravity, testname, tgaIce, x, and y.
| PetscErrorCode computeBasalTemperatureErrors | ( | PetscScalar & | gmaxTerr, | |
| PetscScalar & | gavTerr, | |||
| PetscScalar & | centerTerr | |||
| ) | [protected] |
Definition at line 398 of file iCMthermo.cc.
References ApforG, IceModelVec.begin_access(), bothexact(), IceGrid.com, IceModelVec.end_access(), IceModelVec3.getValZ(), IceModel.grid, LforFG, mapcoords(), IceGrid.Mx, IceGrid.My, secpera, ST, IceModel.T3, testname, Tmin, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by reportErrors().
| PetscErrorCode computeBasalVelocityErrors | ( | PetscScalar & | exactmaxspeed, | |
| PetscScalar & | gmaxvecerr, | |||
| PetscScalar & | gavvecerr, | |||
| PetscScalar & | gmaxuberr, | |||
| PetscScalar & | gmaxvberr | |||
| ) | [protected] |
Definition at line 797 of file iceCompModel.cc.
References IceGrid.com, IceModelVec.end_access(), exactE(), IceModelVec2S.get_array(), IceModelVec2V.get_array(), IceModel.grid, mapcoords(), IceGrid.Mx, IceGrid.My, pi, testname, IceModel.vel_basal, IceModel.vH, IceGrid.xm, IceGrid.xs, IceGrid.ym, and IceGrid.ys.
Referenced by reportErrors().
| PetscErrorCode computeGeometryErrors | ( | PetscScalar & | gvolexact, | |
| PetscScalar & | gareaexact, | |||
| PetscScalar & | gdomeHexact, | |||
| PetscScalar & | volerr, | |||
| PetscScalar & | areaerr, | |||
| PetscScalar & | gmaxHerr, | |||
| PetscScalar & | gavHerr, | |||
| PetscScalar & | gmaxetaerr, | |||
| PetscScalar & | centerHerr | |||
| ) | [protected] |
Definition at line 671 of file iceCompModel.cc.
References ApforG, bothexact(), IceGrid.com, IceGrid.dx, IceGrid.dy, e, IceModelVec.end_access(), exactA(), exactB(), exactC(), exactD(), exactE(), exactH(), ThermoGlenIce.exponent(), f, IceModelVec2S.get_array(), IceModel.grid, LforFG, mapcoords(), IceGrid.Mx, IceGrid.My, secpera, testname, tgaIce, IceModel.vH, vHexactL, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by reportErrors().
| PetscErrorCode computeIceBedrockTemperatureErrors | ( | PetscScalar & | gmaxTerr, | |
| PetscScalar & | gavTerr, | |||
| PetscScalar & | gmaxTberr, | |||
| PetscScalar & | gavTberr | |||
| ) | [protected] |
Definition at line 331 of file iCMthermo.cc.
References bedrock_is_ice_forK, IceModelVec.begin_access(), IceGrid.com, IceModelVec.end_access(), exactK(), IceModelVec3.getInternalColumn(), IceModelVec3Bedrock.getInternalColumn(), IceModel.grid, IceGrid.Mbz, IceGrid.Mz, secpera, IceModel.T3, IceModel.Tb3, testname, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, IceGrid.zblevels, and IceGrid.zlevels.
Referenced by reportErrors().
| PetscErrorCode computeSigmaErrors | ( | PetscScalar & | gmaxSigmaerr, | |
| PetscScalar & | gavSigmaerr | |||
| ) | [protected] |
Definition at line 464 of file iCMthermo.cc.
References ApforG, IceModelVec.begin_access(), bothexact(), IceFlowLaw.c_p, IceGrid.com, IceModelVec.end_access(), IceModelVec2S.get_array(), IceModelVec3.getInternalColumn(), IceModel.grid, IceModel.ice, IceGrid.kBelowHeight(), LforFG, mapcoords(), IceGrid.Mz, IceFlowLaw.rho, secpera, IceModel.Sigma3, testname, IceModel.vH, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, and IceGrid.zlevels.
Referenced by reportErrors().
| PetscErrorCode computeSurfaceVelocityErrors | ( | PetscScalar & | gmaxUerr, | |
| PetscScalar & | gavUerr, | |||
| PetscScalar & | gmaxWerr, | |||
| PetscScalar & | gavWerr | |||
| ) | [protected] |
Definition at line 529 of file iCMthermo.cc.
References ApforG, IceModelVec.begin_access(), bothexact(), IceGrid.com, IceModelVec.end_access(), IceModelVec2S.get_array(), IceModelVec3.getValZ(), IceModel.grid, LforFG, mapcoords(), IceGrid.Mx, IceGrid.My, secpera, testname, IceModel.u3, IceModel.v3, IceModel.vH, IceModel.w3, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by reportErrors().
| PetscErrorCode computeTemperatureErrors | ( | PetscScalar & | gmaxTerr, | |
| PetscScalar & | gavTerr | |||
| ) | [protected] |
Definition at line 269 of file iCMthermo.cc.
References ApforG, IceModelVec.begin_access(), bothexact(), IceGrid.com, IceModelVec.end_access(), IceModelVec2S.get_array(), IceModelVec3.getInternalColumn(), IceModel.grid, IceGrid.kBelowHeight(), LforFG, mapcoords(), IceGrid.Mz, secpera, IceModel.T3, testname, IceModel.vH, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, and IceGrid.zlevels.
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 71 of file iceCompModel.cc.
References IceModel.acab, IceModel.artm, IceModelVec3.create(), IceModelVec2S.create(), IceModel.grid, IceModelVec.set_attr(), IceModelVec.set_attrs(), SigmaComp3, and vHexactL.
| PetscErrorCode fillSolnTestABCDH | ( | ) | [protected] |
Definition at line 575 of file iceCompModel.cc.
References IceModel.acab, IceModelVec.beginGhostComm(), IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), exactA(), exactB(), exactC(), exactD(), exactH(), f, IceModelVec2S.get_array(), IceModel.grid, mapcoords(), IceModelVec.scale(), secpera, testname, IceModel.vbed, IceModel.vh, IceModel.vH, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by additionalAtEndTimestep().
| PetscErrorCode fillSolnTestE | ( | ) | [protected] |
Definition at line 628 of file iceCompModel.cc.
References IceModel.acab, IceModelVec.beginGhostComm(), IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), exactE(), IceModelVec2V.get_array(), IceModelVec2S.get_array(), IceModel.grid, mapcoords(), IceModel.vel_basal, IceModel.vh, IceModel.vH, IceGrid.xm, IceGrid.xs, IceGrid.ym, and IceGrid.ys.
Referenced by additionalAtEndTimestep().
| PetscErrorCode fillSolnTestFG | ( | ) | [protected] |
Definition at line 173 of file iCMthermo.cc.
References ablationRateOutside, IceModel.acab, ApforG, IceModelVec.begin_access(), IceModelVec.beginGhostComm(), bothexact(), IceFlowLaw.c_p, IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), IceModelVec2S.get_array(), IceModel.grid, IceModel.ice, LforFG, mapcoords(), IceGrid.Mz, IceFlowLaw.rho, secpera, IceModelVec3.setColumn(), IceModelVec3.setInternalColumn(), IceModel.Sigma3, SigmaComp3, ST, IceModel.T3, testname, Tmin, Ts, IceModel.u3, IceModel.v3, IceModel.vh, IceModel.vH, IceModel.w3, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, and IceGrid.zlevels.
Referenced by additionalAtEndTimestep().
| PetscErrorCode fillSolnTestK | ( | ) | [protected] |
Definition at line 589 of file iCMthermo.cc.
References bedrock_is_ice_forK, IceModelVec.begin_access(), IceModelVec.beginGhostComm(), IceModelVec.end_access(), IceModelVec.endGhostComm(), exactK(), IceModel.grid, IceGrid.Mbz, IceGrid.Mz, secpera, IceModelVec3Bedrock.setInternalColumn(), IceModelVec3.setInternalColumn(), IceModel.T3, IceModel.Tb3, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, IceGrid.zblevels, and IceGrid.zlevels.
Referenced by additionalAtEndTimestep(), and initTestK().
| PetscErrorCode fillSolnTestL | ( | ) | [protected] |
Definition at line 655 of file iceCompModel.cc.
References IceModelVec.add(), IceModelVec.beginGhostComm(), IceModelVec.copy_from(), IceModelVec.endGhostComm(), IceModel.vbed, IceModel.vh, IceModel.vH, and vHexactL.
Referenced by additionalAtEndTimestep().
| PetscErrorCode getCompSourcesTestCDH | ( | ) | [protected] |
Definition at line 546 of file iceCompModel.cc.
References IceModel.acab, IceModelVec.end_access(), exactC(), exactD(), exactH(), f, IceModelVec2S.get_array(), IceModel.grid, mapcoords(), secpera, testname, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by additionalAtStartTimestep().
| PetscErrorCode getCompSourcesTestFG | ( | ) | [protected] |
Definition at line 125 of file iCMthermo.cc.
References ablationRateOutside, IceModel.acab, ApforG, IceModelVec.begin_access(), bothexact(), IceFlowLaw.c_p, IceModelVec.end_access(), IceModelVec2S.get_array(), IceModel.grid, IceModel.ice, LforFG, mapcoords(), IceGrid.Mz, IceFlowLaw.rho, secpera, IceModelVec3.setColumn(), IceModelVec3.setInternalColumn(), SigmaComp3, testname, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, and IceGrid.zlevels.
Referenced by additionalAtStartTimestep().
| PetscErrorCode init_physics | ( | ) | [virtual] |
Initialize some physical parameters.
This is the place for all non-trivial initialization of physical parameters. ("Non-trivial" means that the initialization requires more than just setting a value of a parameter. Such trivial changes can go here too, or earlier.) Also, this is the good place to set those parameters that a user should not be able to override using a command-line option.
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.
In the base class IceModel we just initialize the IceFlowLaw and the EnthalpyConverter.
Reimplemented from IceModel.
Definition at line 205 of file iceCompModel.cc.
References bedrock_is_ice_forK, IceFlowLaw.c_p, IceGrid.com, IceModel.config, IceModel.EC, f, NCConfigVariable.get(), NCConfigVariable.get_string(), IceModel.grid, IceModel.ice, ICE_ARR, IceModel.iceFactory, IceFlowLawIsPatersonBuddCold(), IceFlowLaw.k, PISMOptionsIsSet(), IceFlowLaw.rho, NCVariable.set(), IceFlowLawFactory.setType(), testname, tgaIce, and verbPrintf().
| PetscErrorCode initTestABCDEH | ( | ) | [protected] |
Definition at line 360 of file iceCompModel.cc.
References IceModel.acab, IceModel.artm, IceModelVec.begin_access(), IceModelVec.beginGhostComm(), IceModel.config, IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), exactA(), exactB(), exactC(), exactD(), exactE(), exactH(), f, IceModelVec2S.get_array(), Ggeo, IceModel.grid, mapcoords(), MASK_OCEAN_AT_TIME_0, MASK_SHEET, IceModelVec.scale(), secpera, NCVariable.set(), IceModelVec.set(), IceModel.T3, IceModel.Tb3, ThermoGlenArrIce.tempFromSoftness(), testname, tgaIce, IceModel.vbed, IceModel.vGhf, IceModel.vh, IceModel.vH, IceModel.vMask, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, and IceGrid.ys.
Referenced by set_vars_from_options().
| PetscErrorCode initTestFG | ( | ) | [protected] |
Definition at line 48 of file iCMthermo.cc.
References ablationRateOutside, IceModel.acab, ApforG, IceModel.artm, IceModelVec.begin_access(), IceModelVec.beginGhostComm(), bothexact(), IceModel.config, IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), NCConfigVariable.get(), IceModelVec2S.get_array(), Ggeo, IceModel.grid, LforFG, mapcoords(), MASK_SHEET, IceGrid.Mbz, IceGrid.Mz, secpera, IceModelVec.set(), IceModelVec3Bedrock.setInternalColumn(), IceModelVec3.setInternalColumn(), ST, IceModel.T3, IceModel.Tb3, testname, Tmin, Ts, IceModel.vbed, IceModel.vGhf, IceModel.vh, IceModel.vH, IceModel.vMask, IceGrid.xm, IceGrid.xs, IceGrid.year, IceGrid.ym, IceGrid.ys, IceGrid.zblevels, and IceGrid.zlevels.
Referenced by set_vars_from_options().
| PetscErrorCode initTestK | ( | ) | [protected] |
Definition at line 629 of file iCMthermo.cc.
References IceModel.acab, IceModel.artm, IceModelVec.copy_to(), fillSolnTestK(), MASK_SHEET, IceModelVec.set(), IceModel.vbed, IceModel.vGhf, IceModel.vh, IceModel.vH, IceModel.vHmelt, and IceModel.vMask.
Referenced by set_vars_from_options().
| PetscErrorCode initTestL | ( | ) | [protected] |
Definition at line 454 of file iceCompModel.cc.
References IceModel.acab, IceModelVec.add(), IceModel.artm, IceModelVec.beginGhostComm(), IceGrid.com, IceModel.config, IceModelVec.copy_to(), IceModelVec.end_access(), IceModelVec.endGhostComm(), exactL_list(), IceModelVec2S.get_array(), Ggeo, IceModel.grid, mapcoords(), MASK_SHEET, secpera, NCVariable.set(), IceModelVec.set(), IceModel.T3, IceModel.Tb3, ThermoGlenArrIce.tempFromSoftness(), testname, tgaIce, IceModel.vbed, verbPrintf(), IceModel.vGhf, IceModel.vh, IceModel.vH, vHexactL, IceModel.vMask, IceGrid.xm, IceGrid.xs, IceGrid.ym, and IceGrid.ys.
Referenced by set_vars_from_options().
| void mapcoords | ( | const PetscInt | i, | |
| const PetscInt | j, | |||
| PetscScalar & | x, | |||
| PetscScalar & | y, | |||
| PetscScalar & | r | |||
| ) | [protected] |
Definition at line 315 of file iceCompModel.cc.
References IceGrid.dx, IceGrid.dy, IceModel.grid, IceGrid.Mx, and IceGrid.My.
Referenced by computeBasalTemperatureErrors(), computeBasalVelocityErrors(), computeGeometryErrors(), computeSigmaErrors(), computeSurfaceVelocityErrors(), computeTemperatureErrors(), fillSolnTestABCDH(), fillSolnTestE(), fillSolnTestFG(), getCompSourcesTestCDH(), getCompSourcesTestFG(), initTestABCDEH(), initTestFG(), and initTestL().
| PetscErrorCode reportErrors | ( | ) |
Definition at line 935 of file iceCompModel.cc.
References NCTool.close(), IceGrid.com, computeBasalTemperatureErrors(), computeBasalVelocityErrors(), computeGeometryErrors(), computeIceBedrockTemperatureErrors(), computeSigmaErrors(), computeSurfaceVelocityErrors(), computeTemperatureErrors(), IceGrid.dx, IceGrid.dy, IceGrid.dzbMAX, IceGrid.dzMAX, ThermoGlenIce.exponent(), pism_config_editor.filename, NCTool.get_dim_length(), IceModel.global_attributes, IceModel.grid, NCTimeseries.init(), vnreport.nc, NCTool.open_for_writing(), IceGrid.rank, NCVariable.reset(), secpera, NCVariable.set_glaciological_units(), NCVariable.set_string(), NCVariable.set_units(), NCVariable.short_name, TEMPORARY_STRING_LENGTH, testname, tgaIce, verbPrintf(), NCTimeseries.write(), and NCGlobalAttributes.write().
Referenced by main().
| 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 91 of file iceCompModel.cc.
References IceGrid.bed_vertical_spacing, IceGrid.com, EQUAL, IceModel.grid, IceGrid.ice_vertical_spacing, IceGrid.Lbz, IceGrid.Lx, IceGrid.Ly, IceGrid.Lz, IceGrid.Mbz, IceGrid.periodicity, QUADRATIC, testname, and XY_PERIODIC.
| 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 270 of file iceCompModel.cc.
References IceGrid.com, IceModel.config, NCConfigVariable.get(), IceModel.grid, initTestABCDEH(), initTestFG(), initTestK(), initTestL(), IceModelVec.set(), IceModel.setEnth3FromT3_ColdIce(), SigmaComp3, stop_if_set(), testname, IceModel.vbmr, verbPrintf(), IceModel.vHmelt, IceModel.vtillphi, 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. Thus this base class setFromOptions() can be called by a derived class after the derived class has set its own defaults for base class parameters and flags.
Also, this procedure should not allocate memory or create new objects using the new operator.
In fact this procedure only reads the majority of the options. Some are read in initFromOptions(), writeFiles(), and setStartRunEndYearsFromOptions(), among other places.
Note 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 145 of file iceCompModel.cc.
References IceModel.allowAboveMelting, IceGrid.com, IceModel.config, exactOnly, IceModel.grid, PISMOptionsIsSet(), IceModel.reportPATemps, NCVariable.set(), NCConfigVariable.set_flag(), NCVariable.set_string(), testname, and verbPrintf().
| PetscErrorCode summary | ( | bool | tempAndAge, | |
| bool | useHomoTemp | |||
| ) | [protected, virtual] |
Reimplemented from IceModel.
Definition at line 929 of file iceCompModel.cc.
| 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
where
is the temperature of the ice. This equation is the shallow approximation of the full 3D conservation of energy. Note
stands for the material derivative, so advection is included. Here
is the density of ice,
is its specific heat, and
is its conductivity. Also
is the volume strain heating (with SI units of
).
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, Tb3, and Tnew3. But vbmr and Tb3 will never need to communicate ghosted values (horizontal stencil neighbors). The ghosted values for T3 are updated from the values in Tnew3 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 from IceModel.
Definition at line 33 of file iCMthermo.cc.
References IceModelVec.add(), IceModel.Sigma3, SigmaComp3, and testname.
const PetscScalar ablationRateOutside = 0.02 [static, private] |
Definition at line 117 of file iceCompModel.hh.
Referenced by fillSolnTestFG(), getCompSourcesTestFG(), and initTestFG().
const PetscScalar ApforG = 200 [static, private] |
Definition at line 124 of file iceCompModel.hh.
Referenced by computeBasalTemperatureErrors(), computeGeometryErrors(), computeSigmaErrors(), computeSurfaceVelocityErrors(), computeTemperatureErrors(), fillSolnTestFG(), getCompSourcesTestFG(), and initTestFG().
PetscTruth bedrock_is_ice_forK [private] |
Definition at line 115 of file iceCompModel.hh.
Referenced by computeIceBedrockTemperatureErrors(), fillSolnTestK(), IceCompModel(), and init_physics().
PetscTruth exactOnly [protected] |
Definition at line 55 of file iceCompModel.hh.
Referenced by additionalAtEndTimestep(), additionalAtStartTimestep(), IceCompModel(), and setFromOptions().
PetscScalar f [private] |
Definition at line 114 of file iceCompModel.hh.
Referenced by computeGeometryErrors(), fillSolnTestABCDH(), getCompSourcesTestCDH(), init_physics(), and initTestABCDEH().
const PetscScalar Ggeo = 0.042 [static, private] |
Definition at line 120 of file iceCompModel.hh.
Referenced by initTestABCDEH(), initTestFG(), and initTestL().
const PetscScalar LforFG = 750000 [static, private] |
Definition at line 123 of file iceCompModel.hh.
Referenced by computeBasalTemperatureErrors(), computeGeometryErrors(), computeSigmaErrors(), computeSurfaceVelocityErrors(), computeTemperatureErrors(), fillSolnTestFG(), getCompSourcesTestFG(), and initTestFG().
IceModelVec3 SigmaComp3 [protected] |
Definition at line 103 of file iceCompModel.hh.
Referenced by createVecs(), fillSolnTestFG(), getCompSourcesTestFG(), set_vars_from_options(), and temperatureStep().
const PetscScalar ST = 1.67e-5 [static, private] |
Definition at line 121 of file iceCompModel.hh.
Referenced by computeBasalTemperatureErrors(), fillSolnTestFG(), and initTestFG().
int testname [protected] |
Definition at line 56 of file iceCompModel.hh.
Referenced by additionalAtEndTimestep(), additionalAtStartTimestep(), basalVelocitySIA(), computeBasalTemperatureErrors(), computeBasalVelocityErrors(), computeGeometryErrors(), computeIceBedrockTemperatureErrors(), computeSigmaErrors(), computeSurfaceVelocityErrors(), computeTemperatureErrors(), fillSolnTestABCDH(), fillSolnTestFG(), getCompSourcesTestCDH(), getCompSourcesTestFG(), IceCompModel(), init_physics(), initTestABCDEH(), initTestFG(), initTestL(), reportErrors(), set_grid_defaults(), set_vars_from_options(), setFromOptions(), and temperatureStep().
ThermoGlenArrIce* tgaIce [protected] |
Definition at line 54 of file iceCompModel.hh.
Referenced by basalVelocitySIA(), computeGeometryErrors(), init_physics(), initTestABCDEH(), initTestL(), and reportErrors().
const PetscScalar Tmin = 223.15 [static, private] |
Definition at line 122 of file iceCompModel.hh.
Referenced by computeBasalTemperatureErrors(), fillSolnTestFG(), and initTestFG().
IceModelVec2S vHexactL [protected] |
Definition at line 84 of file iceCompModel.hh.
Referenced by computeGeometryErrors(), createVecs(), fillSolnTestL(), and initTestL().
1.6.2-20100124