/[MITgcm]/MITgcm/model/src/do_statevars_diags.F
ViewVC logotype

Contents of /MITgcm/model/src/do_statevars_diags.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.21 - (show annotations) (download)
Thu Jan 17 23:12:11 2013 UTC (11 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64c, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.20: +5 -17 lines
remove bi,bj from argument list of S/R LAND_DIAGNOSTICS_STATE
  and S/R THSICE_DIAGNOSTICS_STATE

1 C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_diags.F,v 1.20 2012/07/20 12:32:27 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7
8 CBOP
9 C !ROUTINE: DO_STATEVARS_DIAGS
10 C !INTERFACE:
11 SUBROUTINE DO_STATEVARS_DIAGS( myTime, seqFlag, myIter, myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE DO_STATEVARS_DIAGS
15 C | o Controlling routine for state variables diagnostics
16 C *==========================================================*
17 C | Computing diagnostics of the model state (state-variables)
18 C | is done at this level ;
19 C | by contrast, other diagnostics (fluxes, tendencies)
20 C | remain within the computation sequence.
21 C *==========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26 C == Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30
31 C !INPUT/OUTPUT PARAMETERS:
32 C == Routine arguments ==
33 C myTime :: Current time of simulation ( s )
34 C seqFlag :: flag that indicate where this S/R is called from:
35 C :: =0 called from the beginning of forward_step
36 C :: =1 called from the middle of forward_step
37 C :: =2 called from the end of forward_step
38 C myIter :: Iteration number
39 C myThid :: my Thread Id number
40 _RL myTime
41 INTEGER seqFlag
42 INTEGER myIter
43 INTEGER myThid
44 CEOP
45
46 #ifdef ALLOW_DIAGNOSTICS
47 C !LOCAL VARIABLES:
48 C == Local variables ==
49 C selectVars :: select which group of dianostics variables to fill-in
50 C = 1 :: fill-in diagnostics for tracer variables only
51 C = 2 :: fill-in diagnostics for momentum variables only
52 C = 3 :: fill-in diagnostics for momentum & tracer variables
53 C = 4 :: fill-in state variable tendency diagnostics the second time
54 INTEGER selectVars
55
56 C-- Fill-in Diagnostics pkg storage array (for state-variables)
57 IF ( usediagnostics ) THEN
58
59 C- select which group of state-var diagnostics to fill-in,
60 C depending on: where this S/R is called from (seqFlag)
61 C and stagger/synchronous TimeStep
62 selectVars = 0
63 IF ( staggerTimeStep ) THEN
64 IF ( seqFlag.EQ.0 ) selectVars = 2
65 IF ( seqFlag.EQ.1 ) selectVars = 1
66 ELSE
67 IF ( seqFlag.EQ.0 ) selectVars = 3
68 ENDIF
69 IF ( seqFlag.EQ.2 ) selectVars = 4
70 CALL DIAGNOSTICS_FILL_STATE( selectVars, myIter, myThid )
71
72 #ifdef ALLOW_GENERIC_ADVDIFF
73 IF ( seqFlag.EQ.0 .AND. useGAD ) THEN
74 CALL GAD_DIAGNOSTICS_STATE( myTime, myIter, myThid )
75 ENDIF
76 #endif /* ALLOW_GENERIC_ADVDIFF */
77
78 #ifdef ALLOW_PTRACERS
79 IF ( (selectVars.EQ.1 .OR. selectVars.EQ.3)
80 & .AND. usePTRACERS ) THEN
81 CALL PTRACERS_DIAGNOSTICS_STATE( myTime, myIter, myThid )
82 ENDIF
83 #endif /* ALLOW_PTRACERS */
84
85 #ifdef ALLOW_GMREDI
86 IF ( seqFlag.EQ.2 .AND. useGMRedi ) THEN
87 CALL GMREDI_DIAGNOSTICS_IMPL( myTime, myIter, myThid )
88 ENDIF
89 #endif /* ALLOW_GMREDI */
90
91 #ifdef ALLOW_BBL
92 IF ( seqFlag.EQ.0 .AND. useBBL ) THEN
93 CALL BBL_DIAGNOSTICS_STATE( myTime, myIter, myThid )
94 ENDIF
95 #endif /* ALLOW_BBL */
96
97 #ifdef ALLOW_SEAICE
98 IF ( seqFlag.EQ.0 .AND. useSEAICE ) THEN
99 CALL SEAICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
100 ENDIF
101 #endif /* ALLOW_SEAICE */
102
103 #ifdef ALLOW_THSICE
104 IF ( seqFlag.EQ.0 .AND. useThSIce ) THEN
105 CALL THSICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
106 ENDIF
107 #endif /* ALLOW_THSICE */
108
109 #ifdef ALLOW_STREAMICE
110 IF ( seqFlag.EQ.2 .AND. useStreamIce ) THEN
111 CALL STREAMICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
112 ENDIF
113 #endif /* ALLOW_SEAICE */
114
115 #ifdef ALLOW_LAND
116 IF ( seqFlag.EQ.0 .AND. useLand ) THEN
117 CALL LAND_DIAGNOSTICS_STATE( myTime, myIter, myThid )
118 ENDIF
119 #endif /* ALLOW_LAND */
120
121 #ifdef ALLOW_MYPACKAGE
122 IF ( seqFlag.EQ.0 .AND. useMYPACKAGE ) THEN
123 CALL MYPACKAGE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
124 ENDIF
125 #endif /* ALLOW_MYPACKAGE */
126
127 ENDIf
128 #endif /* ALLOW_DIAGNOSTICS */
129
130 RETURN
131 END

  ViewVC Help
Powered by ViewVC 1.1.22