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

PSConstant Class Reference

A class implementing a constant-in-time surface model. Reads data from a PISM input file. More...

#include <PISMSurface.hh>

Inheritance diagram for PSConstant:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PSConstant (IceGrid &g, const NCConfigVariable &conf)
virtual PetscErrorCode init (PISMVars &vars)
virtual PetscErrorCode update (PetscReal t_years, PetscReal dt_years)
 Update a model, if necessary.
virtual void attach_atmosphere_model (PISMAtmosphereModel *input)
 This surface model does not use an atmosphere model.
virtual void get_diagnostics (map< string, PISMDiagnostic * > &)
 Add pointers to available diagnostic quantities to a dictionary.
virtual PetscErrorCode ice_surface_mass_flux (IceModelVec2S &result)
virtual PetscErrorCode ice_surface_temperature (IceModelVec2S &result)
virtual PetscErrorCode define_variables (set< string > vars, const NCTool &nc, nc_type nctype)
virtual PetscErrorCode write_variables (set< string > vars, string filename)
virtual void add_vars_to_output (string keyword, set< string > &result)
 Adds more variable names to result (to let sub-models respect -o_size or -save_size).

Protected Attributes

string input_file
IceModelVec2S acab
IceModelVec2S artm

Detailed Description

A class implementing a constant-in-time surface model. Reads data from a PISM input file.

This is model is just as simple as PSSimple, but it assumes results from a surface processes model are already known. But they are treated as constant in time and they are read from the input file at the beginning of the PISM run.

Specifically, these two fields are read from the -i or -boot_file file:

This surface model does not use an atmosphere model at all, so the attach_atmosphere_model() method is null. Any choice of PISMAtmosphereModel made using option -atmosphere is ignored. This may be an advantage in coupler code simplicity.

Note that a very minimal coupling of an existing atmosphere and surface processes model to the ice dynamics core in PISM could be accomplished by using this PSConstant class for relatively short ice dynamics runs, each of which starts by reading the latest acab and artm fields supplied by the atmosphere and surface processes model.

Definition at line 143 of file PISMSurface.hh.


Constructor & Destructor Documentation

PSConstant ( IceGrid &  g,
const NCConfigVariable &  conf 
) [inline]

Definition at line 145 of file PISMSurface.hh.


Member Function Documentation

void add_vars_to_output ( string  ,
set< string > &   
) [virtual]

Adds more variable names to result (to let sub-models respect -o_size or -save_size).

Keyword can be one of "small", "medium" or "big".

Reimplemented from PISMComponent.

Definition at line 219 of file PISMSurface.cc.

virtual void attach_atmosphere_model ( PISMAtmosphereModel input) [inline, virtual]

This surface model does not use an atmosphere model.

Reimplemented from PISMSurfaceModel.

Definition at line 153 of file PISMSurface.hh.

References vnreport::input.

PetscErrorCode define_variables ( set< string ,
const NCTool &  ,
nc_type   
) [virtual]

Defines requested couplings fields to file and/or asks an attached model to do so.

Reimplemented from PISMSurfaceModel.

Definition at line 225 of file PISMSurface.cc.

References acab, and artm.

virtual void get_diagnostics ( map< string, PISMDiagnostic * > &  ) [inline, virtual]

Add pointers to available diagnostic quantities to a dictionary.

Reimplemented from PISMSurfaceModel.

Definition at line 157 of file PISMSurface.hh.

PetscErrorCode ice_surface_mass_flux ( IceModelVec2S &  result) [virtual]

Implements PISMSurfaceModel.

Definition at line 199 of file PISMSurface.cc.

References acab, and input_file.

PetscErrorCode ice_surface_temperature ( IceModelVec2S &  result) [virtual]

Implements PISMSurfaceModel.

Definition at line 209 of file PISMSurface.cc.

References artm, and input_file.

PetscErrorCode init ( PISMVars &  vars) [virtual]

Reimplemented from PISMSurfaceModel.

Definition at line 150 of file PISMSurface.cc.

References acab, artm, PISMComponent::find_pism_input(), PISMComponent::grid, and input_file.

virtual PetscErrorCode update ( PetscReal  ,
PetscReal   
) [inline, virtual]

Update a model, if necessary.

Implements PISMComponent_TS.

Definition at line 150 of file PISMSurface.hh.

References PISMComponent_TS::dt, and PISMComponent_TS::t.

PetscErrorCode write_variables ( set< string ,
string   
) [virtual]

Writes requested couplings fields to file and/or asks an attached model to do so.

Reimplemented from PISMSurfaceModel.

Definition at line 241 of file PISMSurface.cc.

References acab, and artm.


Member Data Documentation

IceModelVec2S acab [protected]

Definition at line 166 of file PISMSurface.hh.

Referenced by define_variables(), ice_surface_mass_flux(), init(), and write_variables().

IceModelVec2S artm [protected]

Definition at line 166 of file PISMSurface.hh.

Referenced by define_variables(), ice_surface_temperature(), init(), and write_variables().

string input_file [protected]

Definition at line 165 of file PISMSurface.hh.

Referenced by ice_surface_mass_flux(), ice_surface_temperature(), and init().


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