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

PAYearlyCycle Class Reference

#include <PISMAtmosphere.hh>

Inheritance diagram for PAYearlyCycle:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PAYearlyCycle (IceGrid &g, const NCConfigVariable &conf)
virtual PetscErrorCode init (PISMVars &vars)
 Allocates memory and reads in the precipitaion data.
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 update (PetscReal t_years, PetscReal dt_years)=0
 This method implements the parameterization.
virtual PetscErrorCode mean_precip (IceModelVec2S &result)
 Copies the stored precipitation field into result.
virtual PetscErrorCode mean_annual_temp (IceModelVec2S &result)
 Copies the stored mean annual near-surface air temperature field into result.
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 PetscErrorCode temp_snapshot (IceModelVec2S &result)
 Sets result to a snapshot of temperature for the time t_years. (For disgnostic purposes.)

Protected Attributes

PISMVars * variables
PetscScalar snow_temp_july_day
string reference
string precip_filename
IceModelVec2S temp_ma
IceModelVec2S temp_mj
IceModelVec2S precip
NCSpatialVariable airtemp_var

Detailed Description

A class containing an incomplete implementation of an atmosphere model based on a temperature parameterization using mean annual and mean July (mean summer) temperatures and a cosine yearly cycle. Uses a stored (constant in time) precipitation field.

Definition at line 89 of file PISMAtmosphere.hh.


Constructor & Destructor Documentation

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

Definition at line 91 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 86 of file PAYearlyCycle.cc.

PetscErrorCode begin_pointwise_access ( ) [virtual]

Implements PISMAtmosphereModel.

Definition at line 209 of file PAYearlyCycle.cc.

References temp_ma, and temp_mj.

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 96 of file PAYearlyCycle.cc.

References airtemp_var, precip, temp_ma, and temp_mj.

PetscErrorCode end_pointwise_access ( ) [virtual]

Implements PISMAtmosphereModel.

Definition at line 218 of file PAYearlyCycle.cc.

References temp_ma, and temp_mj.

PetscErrorCode init ( PISMVars &  vars) [virtual]

Allocates memory and reads in the precipitaion data.

Implements PISMComponent.

Reimplemented in PA_SeaRISE_Greenland, and PA_EISMINT_Greenland.

Definition at line 28 of file PAYearlyCycle.cc.

References airtemp_var, PISMComponent::config, PISMComponent::find_pism_input(), PISMComponent::grid, precip, precip_filename, reference, snow_temp_july_day, temp_ma, temp_mj, and variables.

PetscErrorCode mean_annual_temp ( IceModelVec2S &  result) [virtual]

Copies the stored mean annual near-surface air temperature field into result.

Implements PISMAtmosphereModel.

Definition at line 161 of file PAYearlyCycle.cc.

References reference, and temp_ma.

PetscErrorCode mean_precip ( IceModelVec2S &  result) [virtual]

Copies the stored precipitation field into result.

Implements PISMAtmosphereModel.

Reimplemented in PA_SeaRISE_Greenland.

Definition at line 149 of file PAYearlyCycle.cc.

References precip, and precip_filename.

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 187 of file PAYearlyCycle.cc.

References PISMComponent::config, PISMComponent_TS::dt, pi, reference, secpera, PISMComponent_TS::t, temp_ma, and temp_mj.

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 171 of file PAYearlyCycle.cc.

References vfnow::N, pi, secpera, snow_temp_july_day, temp_ma, and temp_mj.

virtual PetscErrorCode update ( PetscReal  t_years,
PetscReal  dt_years 
) [pure virtual]

This method implements the parameterization.

Implements PISMComponent_TS.

Implemented in PA_SeaRISE_Greenland, and PA_EISMINT_Greenland.

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 120 of file PAYearlyCycle.cc.

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


Member Data Documentation

NCSpatialVariable airtemp_var [protected]

Definition at line 111 of file PISMAtmosphere.hh.

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

IceModelVec2S precip [protected]

Definition at line 110 of file PISMAtmosphere.hh.

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

string precip_filename [protected]

Definition at line 109 of file PISMAtmosphere.hh.

Referenced by init(), and mean_precip().

string reference [protected]
PetscScalar snow_temp_july_day [protected]

Definition at line 108 of file PISMAtmosphere.hh.

Referenced by init(), and temp_time_series().

IceModelVec2S temp_ma [protected]
IceModelVec2S temp_mj [protected]
PISMVars* variables [protected]

Definition at line 107 of file PISMAtmosphere.hh.

Referenced by init().


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