An abstract class intended to simplify creating basic surface, snow, atmosphere, ocean... models for PISM. More...
#include <PISMComponent.hh>

Public Member Functions | |
| PISMComponent (IceGrid &g, const NCConfigVariable &conf) | |
| virtual | ~PISMComponent () |
| virtual PetscErrorCode | init (PISMVars &vars)=0 |
| virtual PetscErrorCode | max_timestep (PetscReal, PetscReal &dt_years) |
| Reports the maximum time-step the model can take at t_years. Sets dt_years to -1 if any time-step is OK. | |
| virtual PetscErrorCode | write_model_state (PetscReal, PetscReal, string) |
| Writes fields that were read from an input file and are necessary for restarting. | |
| virtual PetscErrorCode | write_diagnostic_fields (PetscReal, PetscReal, string) |
| Updates the model and writes all the internal fields (for testing and debugging). | |
| virtual PetscErrorCode | write_fields (set< string >, PetscReal, PetscReal, string) |
| virtual PetscErrorCode | update (PetscReal, PetscReal) |
| Update a model, if necessary. | |
Protected Member Functions | |
| virtual PetscErrorCode | find_pism_input (string &filename, LocalInterpCtx *&lic, bool ®rid, int &start) |
| Finds PISM's input (-i or -boot_from) file using command-line options. | |
Protected Attributes | |
| IceGrid & | grid |
| const NCConfigVariable & | config |
| PetscReal | t |
| Last time used as an argument for the update() method. | |
| PetscReal | dt |
| Lasr time-step used as an argument for the update() method. | |
An abstract class intended to simplify creating basic surface, snow, atmosphere, ocean... models for PISM.
Definition at line 31 of file PISMComponent.hh.
| PISMComponent | ( | IceGrid & | g, | |
| const NCConfigVariable & | conf | |||
| ) |
Definition at line 22 of file PISMComponent.cc.
| virtual ~PISMComponent | ( | ) | [virtual] |
Definition at line 34 of file PISMComponent.hh.
| PetscErrorCode find_pism_input | ( | string & | filename, | |
| LocalInterpCtx *& | lic, | |||
| bool & | regrid, | |||
| int & | start | |||
| ) | [protected, virtual] |
Finds PISM's input (-i or -boot_from) file using command-line options.
This might be useful since coupling fields are usually in the file IceModel uses to initialize from.
| filename | name of the file found | |
| lic | local interp. context | |
| regrid | specifies whether regridding is necessary | |
| start | "start" to use when reading from filename |
Definition at line 32 of file PISMComponent.cc.
References NCTool.close(), IceGrid.com, NCTool.get_dim_length(), PISMIO.get_grid_info_2d(), grid, vnreport.nc, and NCTool.open_for_reading().
Referenced by PSConstant.init(), PAYearlyCycle.init(), PALapseRates.init(), and PAConstant.init().
| virtual PetscErrorCode init | ( | PISMVars & | vars | ) | [pure virtual] |
Implemented in PAConstant, PAYearlyCycle, PA_SeaRISE_Greenland, PAForcing, PALapseRates, POConstant, POForcing, PISMSurfaceModel, PSDummy, PSSimple, PSConstant, PSForceThickness, PSLocalMassBalance, PISMBedDef, PBPointwiseIsostasy, PBLingleClark, and PA_EISMINT_Greenland.
Referenced by PSSimple.init(), PISMSurfaceModel.init(), POForcing.init(), PAForcing.init(), IceModel.init_couplers(), and main().
| virtual PetscErrorCode max_timestep | ( | PetscReal | , | |
| PetscReal & | dt_years | |||
| ) | [virtual] |
Reports the maximum time-step the model can take at t_years. Sets dt_years to -1 if any time-step is OK.
Reimplemented in PAForcing, and PSForceThickness.
Definition at line 40 of file PISMComponent.hh.
Referenced by PSForceThickness.max_timestep(), PAForcing.max_timestep(), and IceModel.step().
| virtual PetscErrorCode update | ( | PetscReal | , | |
| PetscReal | ||||
| ) | [virtual] |
Update a model, if necessary.
Reimplemented in PAYearlyCycle, PA_SeaRISE_Greenland, PAForcing, PSLocalMassBalance, PISMBedDef, PBPointwiseIsostasy, PBLingleClark, and PA_EISMINT_Greenland.
Definition at line 62 of file PISMComponent.hh.
Referenced by PSLocalMassBalance.update().
| virtual PetscErrorCode write_diagnostic_fields | ( | PetscReal | , | |
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Updates the model and writes all the internal fields (for testing and debugging).
Reimplemented in PAConstant, PAYearlyCycle, PAForcing, POForcing, PISMSurfaceModel, PSDummy, PSConstant, and PSForceThickness.
Definition at line 51 of file PISMComponent.hh.
Referenced by PISMSurfaceModel.write_diagnostic_fields(), PAForcing.write_diagnostic_fields(), and writePCCStateAtTimes().
| virtual PetscErrorCode write_fields | ( | set< string > | , | |
| PetscReal | , | |||
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Writes requested couplings fields to file and/or asks an attached model to do so.
Reimplemented in PAConstant, PAYearlyCycle, PAForcing, PISMSurfaceModel, and PSDummy.
Definition at line 57 of file PISMComponent.hh.
Referenced by IceModel.write_extras(), PISMSurfaceModel.write_fields(), and PAForcing.write_fields().
| virtual PetscErrorCode write_model_state | ( | PetscReal | , | |
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Writes fields that were read from an input file and are necessary for restarting.
Reimplemented in PAConstant, PAYearlyCycle, PAForcing, PALapseRates, PISMSurfaceModel, PSDummy, PSConstant, and PSForceThickness.
Definition at line 45 of file PISMComponent.hh.
Referenced by IceModel.dumpToFile(), PISMSurfaceModel.write_model_state(), PAForcing.write_model_state(), and IceModel.write_snapshot().
const NCConfigVariable& config [protected] |
Definition at line 69 of file PISMComponent.hh.
Referenced by PBLingleClark.allocate(), PSLocalMassBalance.ice_surface_mass_flux(), PSLocalMassBalance.init(), POConstant.init(), PAYearlyCycle.init(), PAForcing.init(), PA_SeaRISE_Greenland.mean_precip(), PSForceThickness.PSForceThickness(), POConstant.shelf_base_mass_flux(), POConstant.shelf_base_temperature(), PAYearlyCycle.temp_snapshot(), PBPointwiseIsostasy.update(), PBLingleClark.update(), PSLocalMassBalance.update(), and PA_SeaRISE_Greenland.update().
PetscReal dt [protected] |
Lasr time-step used as an argument for the update() method.
Definition at line 70 of file PISMComponent.hh.
Referenced by PISMComponent(), PA_EISMINT_Greenland.update(), PBPointwiseIsostasy.update(), PBLingleClark.update(), PSLocalMassBalance.update(), PA_SeaRISE_Greenland.update(), and PAForcing.update().
Definition at line 68 of file PISMComponent.hh.
Referenced by PBPointwiseIsostasy.allocate(), PBLingleClark.allocate(), find_pism_input(), PSForceThickness.ice_surface_mass_flux(), PA_EISMINT_Greenland.init(), PISMBedDef.init(), PBPointwiseIsostasy.init(), PBLingleClark.init(), PSForceThickness.init(), PSLocalMassBalance.init(), PSConstant.init(), PSSimple.init(), POForcing.init(), POConstant.init(), PA_SeaRISE_Greenland.init(), PAYearlyCycle.init(), PALapseRates.init(), PAForcing.init(), PAConstant.init(), PALapseRates.mean_annual_temp(), PAForcing.mean_precip(), PBLingleClark.PBLingleClark(), PBPointwiseIsostasy.PBPointwiseIsostasy(), PISMBedDef.PISMBedDef(), PISMBedDef.pismbeddef_allocate(), POConstant.shelf_base_temperature(), PBLingleClark.transfer_from_proc0(), PBLingleClark.transfer_to_proc0(), PA_EISMINT_Greenland.update(), PBLingleClark.update(), PSLocalMassBalance.update(), PA_SeaRISE_Greenland.update(), PAYearlyCycle.write_diagnostic_fields(), PAYearlyCycle.write_fields(), PAForcing.write_fields(), PAConstant.write_fields(), PALapseRates.write_model_state(), and PBLingleClark.~PBLingleClark().
PetscReal t [protected] |
Last time used as an argument for the update() method.
Definition at line 70 of file PISMComponent.hh.
Referenced by PISMComponent(), PA_EISMINT_Greenland.update(), PBPointwiseIsostasy.update(), PBLingleClark.update(), PSLocalMassBalance.update(), PA_SeaRISE_Greenland.update(), and PAForcing.update().
1.6.2-20100124