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

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

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


Revision 1.21 - (hide annotations) (download)
Thu Jan 17 23:12:11 2013 UTC (11 years, 4 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 jmc 1.21 C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_diags.F,v 1.20 2012/07/20 12:32:27 heimbach 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_DIAGS
10     C !INTERFACE:
11 jmc 1.5 SUBROUTINE DO_STATEVARS_DIAGS( myTime, seqFlag, myIter, myThid )
12 jmc 1.1 C !DESCRIPTION: \bv
13     C *==========================================================*
14 jmc 1.10 C | SUBROUTINE DO_STATEVARS_DIAGS
15 jmc 1.1 C | o Controlling routine for state variables diagnostics
16     C *==========================================================*
17 jmc 1.10 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 jmc 1.1 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 jmc 1.5 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 molod 1.8 C :: =2 called from the end of forward_step
38 jmc 1.5 C myIter :: Iteration number
39 jmc 1.16 C myThid :: my Thread Id number
40 jmc 1.1 _RL myTime
41 jmc 1.5 INTEGER seqFlag
42 jmc 1.1 INTEGER myIter
43     INTEGER myThid
44     CEOP
45    
46 jmc 1.5 #ifdef ALLOW_DIAGNOSTICS
47 jmc 1.1 C !LOCAL VARIABLES:
48 jmc 1.5 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 jmc 1.10 C = 4 :: fill-in state variable tendency diagnostics the second time
54 jmc 1.5 INTEGER selectVars
55 jmc 1.1
56 jmc 1.5 C-- Fill-in Diagnostics pkg storage array (for state-variables)
57     IF ( usediagnostics ) THEN
58 jmc 1.1
59 jmc 1.10 C- select which group of state-var diagnostics to fill-in,
60     C depending on: where this S/R is called from (seqFlag)
61 jmc 1.5 C and stagger/synchronous TimeStep
62     selectVars = 0
63 jmc 1.10 IF ( staggerTimeStep ) THEN
64 jmc 1.5 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 molod 1.8 IF ( seqFlag.EQ.2 ) selectVars = 4
70 jmc 1.16 CALL DIAGNOSTICS_FILL_STATE( selectVars, myIter, myThid )
71 jmc 1.1
72 jmc 1.13 #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 jmc 1.5 #ifdef ALLOW_PTRACERS
79     IF ( (selectVars.EQ.1 .OR. selectVars.EQ.3)
80 jmc 1.10 & .AND. usePTRACERS ) THEN
81 jahn 1.14 CALL PTRACERS_DIAGNOSTICS_STATE( myTime, myIter, myThid )
82 jmc 1.1 ENDIF
83 jmc 1.16 #endif /* ALLOW_PTRACERS */
84 jmc 1.1
85 jmc 1.18 #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 dimitri 1.15 #ifdef ALLOW_BBL
92     IF ( seqFlag.EQ.0 .AND. useBBL ) THEN
93     CALL BBL_DIAGNOSTICS_STATE( myTime, myIter, myThid )
94     ENDIF
95 jmc 1.16 #endif /* ALLOW_BBL */
96 dimitri 1.15
97 mlosch 1.9 #ifdef ALLOW_SEAICE
98     IF ( seqFlag.EQ.0 .AND. useSEAICE ) THEN
99 jmc 1.21 CALL SEAICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
100 mlosch 1.9 ENDIF
101     #endif /* ALLOW_SEAICE */
102    
103 jmc 1.6 #ifdef ALLOW_THSICE
104     IF ( seqFlag.EQ.0 .AND. useThSIce ) THEN
105 jmc 1.21 CALL THSICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
106 jmc 1.6 ENDIF
107     #endif /* ALLOW_THSICE */
108    
109 heimbach 1.20 #ifdef ALLOW_STREAMICE
110     IF ( seqFlag.EQ.2 .AND. useStreamIce ) THEN
111 jmc 1.21 CALL STREAMICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
112 heimbach 1.20 ENDIF
113     #endif /* ALLOW_SEAICE */
114    
115 jmc 1.7 #ifdef ALLOW_LAND
116     IF ( seqFlag.EQ.0 .AND. useLand ) THEN
117 jmc 1.21 CALL LAND_DIAGNOSTICS_STATE( myTime, myIter, myThid )
118 jmc 1.7 ENDIF
119     #endif /* ALLOW_LAND */
120    
121 jmc 1.12 #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 jmc 1.1 ENDIf
128     #endif /* ALLOW_DIAGNOSTICS */
129    
130     RETURN
131     END

  ViewVC Help
Powered by ViewVC 1.1.22