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

PAForcing Class Reference

A class implementing an "atmosphere modifier" model applying forcing data (anomalies, temperature offsets...) to results of another PISM atmosphere model. More...

#include <PISMAtmosphere.hh>

Inheritance diagram for PAForcing:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PAForcing (IceGrid &g, const NCConfigVariable &conf, PISMAtmosphereModel *input)
virtual ~PAForcing ()
virtual PetscErrorCode max_timestep (PetscReal t_years, 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 init (PISMVars &vars)
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)
 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 PetscErrorCode temp_snapshot (IceModelVec2S &result)
 Sets result to a snapshot of temperature for the time t_years. (For disgnostic purposes.)

Protected Attributes

IceModelVec2Ttemp_anomaly
IceModelVec2Tprecip_anomaly
NCSpatialVariable airtemp_var

Detailed Description

A class implementing an "atmosphere modifier" model applying forcing data (anomalies, temperature offsets...) to results of another PISM atmosphere model.

Processes command-line options -anomaly_temp, -anomaly_precip.

The temperature anomaly should be interpreted as a change to the air temperature, for example at 2m. An underlying PISMSurfaceModel is in charge of producing an actual ice fluid upper surface temperature. The precipitation anomaly could include rain, and again the underlying PISMSurfaceModel is in charge of removing rain (if that's the model ...) using (for example) the 2m air temperature.

Definition at line 197 of file PISMAtmosphere.hh.


Constructor & Destructor Documentation

PAForcing ( IceGrid &  g,
const NCConfigVariable &  conf,
PISMAtmosphereModel input 
)

Definition at line 25 of file PAForcing.cc.

References precip_anomaly, and temp_anomaly.

~PAForcing ( ) [virtual]

Definition at line 31 of file PAForcing.cc.

References precip_anomaly, and temp_anomaly.


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 Modifier< PISMAtmosphereModel >.

Definition at line 138 of file PAForcing.cc.

References PISMComponent::add_vars_to_output(), Modifier< PISMAtmosphereModel >::input_model, precip_anomaly, and temp_anomaly.

PetscErrorCode begin_pointwise_access ( ) [virtual]
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 Modifier< PISMAtmosphereModel >.

Definition at line 152 of file PAForcing.cc.

References airtemp_var, PISMComponent::define_variables(), Modifier< PISMAtmosphereModel >::input_model, precip_anomaly, and temp_anomaly.

PetscErrorCode end_pointwise_access ( ) [virtual]
PetscErrorCode init ( PISMVars &  vars) [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 from Modifier< PISMAtmosphereModel >.

Definition at line 108 of file PAForcing.cc.

References Modifier< PISMAtmosphereModel >::input_model, PISMComponent_TS::max_timestep(), precip_anomaly, and temp_anomaly.

PetscErrorCode mean_annual_temp ( IceModelVec2S &  result) [virtual]

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

Reimplemented from PAModifier.

Definition at line 267 of file PAForcing.cc.

References PISMComponent::grid, Modifier< PISMAtmosphereModel >::input_model, PISMAtmosphereModel::mean_annual_temp(), PISMComponent_TS::t, and temp_anomaly.

PetscErrorCode mean_precip ( IceModelVec2S &  result) [virtual]

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

Reimplemented from PAModifier.

Definition at line 240 of file PAForcing.cc.

References PISMComponent_TS::dt, PISMComponent::grid, Modifier< PISMAtmosphereModel >::input_model, PISMAtmosphereModel::mean_precip(), precip_anomaly, and PISMComponent_TS::t.

PetscErrorCode temp_snapshot ( IceModelVec2S &  result) [virtual]

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

Reimplemented from PAModifier.

Definition at line 343 of file PAForcing.cc.

References PISMComponent_TS::dt, Modifier< PISMAtmosphereModel >::input_model, PISMComponent_TS::t, temp_anomaly, and PISMAtmosphereModel::temp_snapshot().

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()

Reimplemented from PAModifier.

Definition at line 323 of file PAForcing.cc.

References Modifier< PISMAtmosphereModel >::input_model, vfnow::N, temp_anomaly, and PISMAtmosphereModel::temp_time_series().

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

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

Reimplemented from Modifier< PISMAtmosphereModel >.

Definition at line 178 of file PAForcing.cc.

References airtemp_var, PISMComponent_TS::dt, PISMComponent::grid, Modifier< PISMAtmosphereModel >::input_model, precip_anomaly, PISMComponent_TS::t, temp_anomaly, temp_snapshot(), and PISMComponent::write_variables().


Member Data Documentation

NCSpatialVariable airtemp_var [protected]

Definition at line 216 of file PISMAtmosphere.hh.

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


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