|
PISM, A Parallel Ice Sheet Model stable 0.4.1779
|
An alternative PDD implementation which simulates a random process to get the number of PDDs. More...
#include <localMassBalance.hh>

Public Member Functions | |
| PDDrandMassBalance (const NCConfigVariable &myconfig, bool repeatable) | |
| virtual | ~PDDrandMassBalance () |
| repeatable==true to seed with zero every time. | |
| virtual PetscErrorCode | getNForTemperatureSeries (PetscScalar t, PetscScalar dt, PetscInt &N) |
| virtual PetscScalar | getPDDSumFromTemperatureTimeSeries (PetscScalar pddStdDev, PetscScalar pddThresholdTemp, PetscScalar t, PetscScalar dt_series, PetscScalar *T, PetscInt N) |
| Compute the expected number of positive degree days from the input temperature time-series. | |
Protected Attributes | |
| gsl_rng * | pddRandGen |
An alternative PDD implementation which simulates a random process to get the number of PDDs.
Uses a GSL random number generator. Significantly slower because new random numbers are generated for each grid point.
The way the number of positive degree-days are used to produce a surface mass balance is identical to the base class PDDMassBalance.
Definition at line 162 of file localMassBalance.hh.
| PDDrandMassBalance | ( | const NCConfigVariable & | myconfig, |
| bool | repeatable | ||
| ) |
Initializes the random number generator (RNG). The RNG is GSL's recommended default, which seems to be "mt19937" and is DIEHARD (whatever that means ...). Seed with wall clock time in seconds in non-repeatable case, and with 0 in repeatable case.
Definition at line 248 of file localMassBalance.cc.
References pddRandGen.
| ~PDDrandMassBalance | ( | ) | [virtual] |
repeatable==true to seed with zero every time.
Definition at line 255 of file localMassBalance.cc.
References pddRandGen.
| PetscErrorCode getNForTemperatureSeries | ( | PetscScalar | t, |
| PetscScalar | dt, | ||
| PetscInt & | N | ||
| ) | [virtual] |
We need to compute simulated random temperature each actual day, or at least as close as we can reasonably get. Output N is number of days or number of days plus one.
Thus this method ignores config.get("pdd_max_temperature_evals_per_year"), which is used in the base class PDDMassBalance.
Implementation of getPDDSumFromTemperatureTimeSeries() requires returned N >= 2, so we guarantee that.
Reimplemented from PDDMassBalance.
Definition at line 274 of file localMassBalance.cc.
| PetscScalar getPDDSumFromTemperatureTimeSeries | ( | PetscScalar | pddStdDev, |
| PetscScalar | pddThresholdTemp, | ||
| PetscScalar | t, | ||
| PetscScalar | dt_series, | ||
| PetscScalar * | T, | ||
| PetscInt | N | ||
| ) | [virtual] |
Compute the expected number of positive degree days from the input temperature time-series.
Reimplemented from PDDMassBalance.
Definition at line 283 of file localMassBalance.cc.
References pddRandGen.
gsl_rng* pddRandGen [protected] |
Definition at line 176 of file localMassBalance.hh.
Referenced by getPDDSumFromTemperatureTimeSeries(), PDDrandMassBalance(), and ~PDDrandMassBalance().
1.7.3