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

PAConstant Class Reference

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

#include <PISMAtmosphere.hh>

Inheritance diagram for PAConstant:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PAConstant (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 PetscErrorCode mean_precip (IceModelVec2S &result)
 Sets result to the mean precipitation, in m/s ice equivalent.
virtual PetscErrorCode mean_annual_temp (IceModelVec2S &result)
 Sets result to the mean annual near-surface air temperature, in degrees Kelvin.
virtual PetscErrorCode begin_pointwise_access ()
virtual PetscErrorCode end_pointwise_access ()
virtual PetscErrorCode temp_time_series (int i, int j, int N, PetscReal *ts, PetscReal *values)
 Sets a pre-allocated N-element array "values" to the time-series of near-surface air temperature (degrees Kelvin) at the point i,j on the grid. Times (in years) are specified in ts. NB! Has to be surrounded by begin_pointwise_access() and end_pointwise_access()
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).
virtual PetscErrorCode define_variables (set< string > vars, const NCTool &nc, nc_type nctype)
virtual PetscErrorCode write_variables (set< string > vars, string filename)
virtual PetscErrorCode temp_snapshot (IceModelVec2S &result)
 Sets result to a snapshot of temperature for the time t_years. (For disgnostic purposes.)

Protected Attributes

string input_file
IceModelVec2S precip
IceModelVec2S temperature
NCSpatialVariable airtemp_var

Detailed Description

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

Definition at line 61 of file PISMAtmosphere.hh.


Constructor & Destructor Documentation

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

Definition at line 63 of file PISMAtmosphere.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 126 of file PAConstant.cc.

PetscErrorCode begin_pointwise_access ( ) [virtual]

Implements PISMAtmosphereModel.

Definition at line 99 of file PAConstant.cc.

References temperature.

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

Definition at line 135 of file PAConstant.cc.

References airtemp_var, precip, and temperature.

PetscErrorCode end_pointwise_access ( ) [virtual]

Implements PISMAtmosphereModel.

Definition at line 105 of file PAConstant.cc.

References temperature.

PetscErrorCode init ( PISMVars &  vars) [virtual]
PetscErrorCode mean_annual_temp ( IceModelVec2S &  result) [virtual]

Sets result to the mean annual near-surface air temperature, in degrees Kelvin.

Implements PISMAtmosphereModel.

Definition at line 89 of file PAConstant.cc.

References input_file, and temperature.

Referenced by temp_snapshot().

PetscErrorCode mean_precip ( IceModelVec2S &  result) [virtual]

Sets result to the mean precipitation, in m/s ice equivalent.

Implements PISMAtmosphereModel.

Definition at line 79 of file PAConstant.cc.

References input_file, and precip.

PetscErrorCode temp_snapshot ( IceModelVec2S &  result) [virtual]

Sets result to a snapshot of temperature for the time t_years. (For disgnostic purposes.)

Implements PISMAtmosphereModel.

Definition at line 118 of file PAConstant.cc.

References mean_annual_temp().

Referenced by write_variables().

PetscErrorCode temp_time_series ( int  i,
int  j,
int  N,
PetscReal ts,
PetscReal values 
) [virtual]

Sets a pre-allocated N-element array "values" to the time-series of near-surface air temperature (degrees Kelvin) at the point i,j on the grid. Times (in years) are specified in ts. NB! Has to be surrounded by begin_pointwise_access() and end_pointwise_access()

Implements PISMAtmosphereModel.

Definition at line 111 of file PAConstant.cc.

References vfnow::N, and temperature.

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

Update a model, if necessary.

Implements PISMComponent_TS.

Definition at line 66 of file PISMAtmosphere.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 PISMComponent.

Definition at line 155 of file PAConstant.cc.

References airtemp_var, PISMComponent::grid, precip, temp_snapshot(), and temperature.


Member Data Documentation

NCSpatialVariable airtemp_var [protected]

Definition at line 81 of file PISMAtmosphere.hh.

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

string input_file [protected]

Definition at line 79 of file PISMAtmosphere.hh.

Referenced by init(), mean_annual_temp(), and mean_precip().

IceModelVec2S precip [protected]

Definition at line 80 of file PISMAtmosphere.hh.

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

IceModelVec2S temperature [protected]

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