1 |
jmc |
1.5 |
C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_tave.F,v 1.4 2010/01/03 00:00:52 jmc Exp $ |
2 |
jmc |
1.1 |
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 |
jmc |
1.3 |
|
13 |
jmc |
1.1 |
C !DESCRIPTION: \bv |
14 |
|
|
C *==========================================================* |
15 |
jmc |
1.4 |
C | SUBROUTINE DO_STATEVARS_TAVE |
16 |
jmc |
1.1 |
C | o Controlling routine for state variables time-averaging |
17 |
|
|
C *==========================================================* |
18 |
jmc |
1.4 |
C | Computing statistics of the model state (state-variables) |
19 |
jmc |
1.1 |
C | is done at this level (after updating the halo region), |
20 |
|
|
C | as opposed to other diagnostic calls (fluxes, tendencies) |
21 |
jmc |
1.4 |
C | that remain within the computation sequence. |
22 |
|
|
C | Note: IO are not supposed to be done at this level |
23 |
jmc |
1.1 |
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 |
jmc |
1.2 |
#ifdef ALLOW_TIMEAVE |
45 |
jmc |
1.1 |
C !LOCAL VARIABLES: |
46 |
|
|
C == Local variables |
47 |
|
|
INTEGER bi,bj |
48 |
|
|
|
49 |
|
|
C-- Fill-in TimeAve pkg diagnostics (for state-variables) |
50 |
|
|
|
51 |
jmc |
1.4 |
DO bj=myByLo(myThid),myByHi(myThid) |
52 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
53 |
jmc |
1.1 |
|
54 |
jmc |
1.4 |
IF ( taveFreq.GT.0. ) THEN |
55 |
|
|
CALL TIMEAVE_STATVARS( myTime, myIter, bi, bj, myThid ) |
56 |
|
|
ENDIF |
57 |
jmc |
1.1 |
# ifdef ALLOW_PTRACERS |
58 |
jmc |
1.5 |
IF ( usePTRACERS ) THEN |
59 |
jmc |
1.3 |
CALL PTRACERS_TIMEAVE( myTime, myIter, bi, bj, myThid ) |
60 |
jmc |
1.4 |
ENDIF |
61 |
jmc |
1.1 |
# endif /* ALLOW_PTRACERS */ |
62 |
|
|
|
63 |
|
|
C-- End of bi,bj loop |
64 |
|
|
ENDDO |
65 |
jmc |
1.4 |
ENDDO |
66 |
jmc |
1.1 |
#endif /* ALLOW_TIMEAVE */ |
67 |
|
|
|
68 |
|
|
RETURN |
69 |
|
|
END |