1 |
C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_tave.F,v 1.4 2010/01/03 00:00:52 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
6 |
|
7 |
|
8 |
CBOP |
9 |
C !ROUTINE: DO_STATEVARS_TAVE |
10 |
C !INTERFACE: |
11 |
SUBROUTINE DO_STATEVARS_TAVE( myTime, myIter, myThid ) |
12 |
|
13 |
C !DESCRIPTION: \bv |
14 |
C *==========================================================* |
15 |
C | SUBROUTINE DO_STATEVARS_TAVE |
16 |
C | o Controlling routine for state variables time-averaging |
17 |
C *==========================================================* |
18 |
C | Computing statistics of the model state (state-variables) |
19 |
C | is done at this level (after updating the halo region), |
20 |
C | as opposed to other diagnostic calls (fluxes, tendencies) |
21 |
C | that remain within the computation sequence. |
22 |
C | Note: IO are not supposed to be done at this level |
23 |
C | but later (in DO_THE_MODEL_IO) |
24 |
C *==========================================================* |
25 |
C \ev |
26 |
|
27 |
C !USES: |
28 |
IMPLICIT NONE |
29 |
C == Global variables === |
30 |
#include "SIZE.h" |
31 |
#include "EEPARAMS.h" |
32 |
#include "PARAMS.h" |
33 |
|
34 |
C !INPUT/OUTPUT PARAMETERS: |
35 |
C == Routine arguments == |
36 |
C myTime - Current time of simulation ( s ) |
37 |
C myIter - Iteration number |
38 |
C myThid - Thread number for this instance of the routine. |
39 |
_RL myTime |
40 |
INTEGER myIter |
41 |
INTEGER myThid |
42 |
CEOP |
43 |
|
44 |
#ifdef ALLOW_TIMEAVE |
45 |
C !LOCAL VARIABLES: |
46 |
C == Local variables |
47 |
INTEGER bi,bj |
48 |
|
49 |
C-- Fill-in TimeAve pkg diagnostics (for state-variables) |
50 |
|
51 |
DO bj=myByLo(myThid),myByHi(myThid) |
52 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
53 |
|
54 |
IF ( taveFreq.GT.0. ) THEN |
55 |
CALL TIMEAVE_STATVARS( myTime, myIter, bi, bj, myThid ) |
56 |
ENDIF |
57 |
# ifdef ALLOW_PTRACERS |
58 |
IF ( usePTRACERS ) THEN |
59 |
CALL PTRACERS_TIMEAVE( myTime, myIter, bi, bj, myThid ) |
60 |
ENDIF |
61 |
# endif /* ALLOW_PTRACERS */ |
62 |
|
63 |
C-- End of bi,bj loop |
64 |
ENDDO |
65 |
ENDDO |
66 |
#endif /* ALLOW_TIMEAVE */ |
67 |
|
68 |
RETURN |
69 |
END |