|
PISM, A Parallel Ice Sheet Model stable 0.4.1779
|
A class implementing an "atmosphere modifier" model applying forcing data (anomalies, temperature offsets...) to results of another PISM atmosphere model. More...
#include <PISMAtmosphere.hh>

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 | |
| IceModelVec2T * | temp_anomaly |
| IceModelVec2T * | precip_anomaly |
| NCSpatialVariable | airtemp_var |
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.
| 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.
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] |
Reimplemented from PAModifier.
Definition at line 299 of file PAForcing.cc.
References PISMAtmosphereModel::begin_pointwise_access(), Modifier< PISMAtmosphereModel >::input_model, and temp_anomaly.
| 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] |
Reimplemented from PAModifier.
Definition at line 311 of file PAForcing.cc.
References PISMAtmosphereModel::end_pointwise_access(), Modifier< PISMAtmosphereModel >::input_model, and temp_anomaly.
| PetscErrorCode init | ( | PISMVars & | vars | ) | [virtual] |
Implements PISMComponent.
Definition at line 36 of file PAForcing.cc.
References airtemp_var, PISMComponent::config, PISMComponent::grid, PISMComponent::init(), Modifier< PISMAtmosphereModel >::input_model, precip_anomaly, and temp_anomaly.
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().
Update a model, if necessary.
Reimplemented from Modifier< PISMAtmosphereModel >.
Definition at line 217 of file PAForcing.cc.
References PISMComponent_TS::dt, e, Modifier< PISMAtmosphereModel >::input_model, precip_anomaly, PISMComponent_TS::t, temp_anomaly, and PISMComponent_TS::update().
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().
NCSpatialVariable airtemp_var [protected] |
Definition at line 216 of file PISMAtmosphere.hh.
Referenced by define_variables(), init(), and write_variables().
IceModelVec2T * precip_anomaly [protected] |
Definition at line 215 of file PISMAtmosphere.hh.
Referenced by add_vars_to_output(), define_variables(), init(), max_timestep(), mean_precip(), PAForcing(), update(), write_variables(), and ~PAForcing().
IceModelVec2T* temp_anomaly [protected] |
Definition at line 215 of file PISMAtmosphere.hh.
Referenced by add_vars_to_output(), begin_pointwise_access(), define_variables(), end_pointwise_access(), init(), max_timestep(), mean_annual_temp(), PAForcing(), temp_snapshot(), temp_time_series(), update(), write_variables(), and ~PAForcing().
1.7.3