#include <PISMAtmosphere.hh>

Public Member Functions | |
| PAYearlyCycle (IceGrid &g, const NCConfigVariable &conf) | |
| virtual PetscErrorCode | init (PISMVars &vars) |
| Allocates memory and reads in the snow precipitaion data. | |
| virtual PetscErrorCode | write_model_state (PetscReal, PetscReal, string filename) |
| Writes fields that were read from an input file and are necessary for restarting. | |
| virtual PetscErrorCode | write_diagnostic_fields (PetscReal t_years, PetscReal dt_years, string filename) |
| Updates the model and writes all the internal fields (for testing and debugging). | |
| virtual PetscErrorCode | write_fields (set< string > vars, PetscReal t_years, PetscReal dt_years, string filename) |
| virtual PetscErrorCode | update (PetscReal t_years, PetscReal dt_years)=0 |
| This method implements the parameterization. | |
| virtual PetscErrorCode | mean_precip (PetscReal t_years, PetscReal dt_years, IceModelVec2S &result) |
| Copies the stored snow precipitation field into result. | |
| virtual PetscErrorCode | mean_annual_temp (PetscReal t_years, PetscReal dt_years, 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 (PetscReal t_years, PetscReal dt_years, IceModelVec2S &result) |
| Sets result to a snapshot of temperature for the interval (t_years, dt_years). | |
Protected Attributes | |
| PetscScalar | snow_temp_july_day |
| string | reference |
| string | snowprecip_filename |
| IceModelVec2S | temp_ma |
| IceModelVec2S | temp_mj |
| IceModelVec2S | snowprecip |
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 91 of file PISMAtmosphere.hh.
| PAYearlyCycle | ( | IceGrid & | g, | |
| const NCConfigVariable & | conf | |||
| ) |
Definition at line 93 of file PISMAtmosphere.hh.
| PetscErrorCode begin_pointwise_access | ( | ) | [virtual] |
Implements PISMAtmosphereModel.
Definition at line 214 of file PAYearlyCycle.cc.
References IceModelVec.begin_access(), temp_ma, and temp_mj.
| PetscErrorCode end_pointwise_access | ( | ) | [virtual] |
Implements PISMAtmosphereModel.
Definition at line 223 of file PAYearlyCycle.cc.
References IceModelVec.end_access(), temp_ma, and temp_mj.
| PetscErrorCode init | ( | PISMVars & | vars | ) | [virtual] |
Allocates memory and reads in the snow precipitaion data.
Implements PISMComponent.
Reimplemented in PA_SeaRISE_Greenland, and PA_EISMINT_Greenland.
Definition at line 23 of file PAYearlyCycle.cc.
References IceGrid.com, PISMComponent.config, IceModelVec2S.create(), PISMComponent.find_pism_input(), NCConfigVariable.get(), PISMComponent.grid, IceModelVec.read(), reference, IceModelVec.regrid(), IceModelVec.set_attr(), IceModelVec.set_attrs(), IceModelVec.set_glaciological_units(), snow_temp_july_day, snowprecip, snowprecip_filename, temp_ma, temp_mj, IceModelVec.time_independent, verbPrintf(), and IceModelVec.write_in_glaciological_units.
| PetscErrorCode mean_annual_temp | ( | PetscReal | t_years, | |
| PetscReal | dt_years, | |||
| IceModelVec2S & | result | |||
| ) | [virtual] |
Copies the stored mean annual near-surface air temperature field into result.
Implements PISMAtmosphereModel.
Definition at line 160 of file PAYearlyCycle.cc.
References IceModelVec.copy_to(), reference, IceModelVec.set_attr(), temp_ma, and update().
| PetscErrorCode mean_precip | ( | PetscReal | t_years, | |
| PetscReal | dt_years, | |||
| IceModelVec2S & | result | |||
| ) | [virtual] |
Copies the stored snow precipitation field into result.
Implements PISMAtmosphereModel.
Reimplemented in PA_SeaRISE_Greenland.
Definition at line 145 of file PAYearlyCycle.cc.
References IceModelVec.copy_to(), IceModelVec.set_attr(), snowprecip, snowprecip_filename, and update().
| PetscErrorCode temp_snapshot | ( | PetscReal | t_years, | |
| PetscReal | dt_years, | |||
| IceModelVec2S & | result | |||
| ) | [virtual] |
Sets result to a snapshot of temperature for the interval (t_years, dt_years).
Implements PISMAtmosphereModel.
Definition at line 189 of file PAYearlyCycle.cc.
References IceModelVec.add(), PISMComponent.config, NCConfigVariable.get(), pi, reference, IceModelVec.scale(), secpera, IceModelVec.set_attr(), temp_ma, temp_mj, and update().
Referenced by write_diagnostic_fields(), and write_fields().
| 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 173 of file PAYearlyCycle.cc.
References 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.
Reimplemented from PISMComponent.
Implemented in PA_SeaRISE_Greenland, and PA_EISMINT_Greenland.
Referenced by mean_annual_temp(), mean_precip(), temp_snapshot(), write_diagnostic_fields(), and write_fields().
| PetscErrorCode write_diagnostic_fields | ( | PetscReal | , | |
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Updates the model and writes all the internal fields (for testing and debugging).
Reimplemented from PISMComponent.
Definition at line 85 of file PAYearlyCycle.cc.
References IceModelVec2S.create(), PISMComponent.grid, IceModelVec.set_attrs(), temp_ma, temp_mj, temp_snapshot(), update(), IceModelVec.write(), and write_model_state().
| PetscErrorCode write_fields | ( | set< string > | , | |
| PetscReal | , | |||
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Writes requested couplings fields to file and/or asks an attached model to do so.
Reimplemented from PISMComponent.
Definition at line 110 of file PAYearlyCycle.cc.
References IceModelVec2S.create(), PISMComponent.grid, IceModelVec.set_attrs(), snowprecip, temp_ma, temp_mj, temp_snapshot(), update(), and IceModelVec.write().
| PetscErrorCode write_model_state | ( | PetscReal | , | |
| PetscReal | , | |||
| string | ||||
| ) | [virtual] |
Writes fields that were read from an input file and are necessary for restarting.
Reimplemented from PISMComponent.
Definition at line 76 of file PAYearlyCycle.cc.
References snowprecip, and IceModelVec.write().
Referenced by write_diagnostic_fields().
string reference [protected] |
Definition at line 117 of file PISMAtmosphere.hh.
Referenced by PA_EISMINT_Greenland.init(), PA_SeaRISE_Greenland.init(), init(), mean_annual_temp(), and temp_snapshot().
PetscScalar snow_temp_july_day [protected] |
Definition at line 116 of file PISMAtmosphere.hh.
Referenced by init(), and temp_time_series().
IceModelVec2S snowprecip [protected] |
Definition at line 118 of file PISMAtmosphere.hh.
Referenced by init(), mean_precip(), write_fields(), and write_model_state().
string snowprecip_filename [protected] |
Definition at line 117 of file PISMAtmosphere.hh.
Referenced by init(), and mean_precip().
IceModelVec2S temp_ma [protected] |
Definition at line 118 of file PISMAtmosphere.hh.
Referenced by begin_pointwise_access(), end_pointwise_access(), init(), mean_annual_temp(), temp_snapshot(), temp_time_series(), PA_EISMINT_Greenland.update(), PA_SeaRISE_Greenland.update(), write_diagnostic_fields(), and write_fields().
IceModelVec2S temp_mj [protected] |
Definition at line 118 of file PISMAtmosphere.hh.
Referenced by begin_pointwise_access(), end_pointwise_access(), init(), temp_snapshot(), temp_time_series(), PA_EISMINT_Greenland.update(), PA_SeaRISE_Greenland.update(), write_diagnostic_fields(), and write_fields().
1.6.2-20100124