source: (poseidon.ohist.f90) [ c_92_rp1 release ]POSEIDON_HISTORY_MODULE
Add history information to the accumulators.
There are 3 types of items to be incremented: State variables, Forcing variables and derived diagnostics.
For the state and forcing variables, the instantaneous values are added, weighted by the "interval" parameter. It is presumed that diagnostics are already weighted, so we just use the ADD_DIAGNOSTICS routine which does
for every item within diagnostic Ohist%D that is "wanted" and then bumps the Ohist%D accumulator by the value in the D accumulator. Note that since only those items that are "wanted" in Ohist%D are added, we can have more allocated diagnostic items in ocean%diag than in Ohist%D
Ohist%D%item%val = Ohist%D%item%val + D%item%val
Because of the automatic "bumping" of the Ohist%D accumulator by ADD_DIAGNOSTICS, you should be careful about calling ACCUMULATE_OHIST more often than you reset the ocean%diag diagnostics. The first addition might get the weight 1, the second additon might get weight 2, and so on.
|TYPE (T_POSEIDON_HISTORY) :: ohist||The history object to accumulate to|
|REAL :: interval||A weight to give this sample (Typically the time interval, but anything consistent will work)|
call ACCUMULATE_OHIST(ohist, interval)
INTENT(IN) :: interval