/[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.17 - (hide annotations) (download)
Fri Mar 2 01:45:22 2012 UTC (12 years, 2 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint63k
Changes since 1.16: +7 -1 lines
adding pkg/frazil - see frazil_description.tex for details

1 dimitri 1.17 C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_diags.F,v 1.16 2011/11/30 21:00:22 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_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.6 C bi,bj :: tile indices
55 jmc 1.5 INTEGER selectVars
56 jmc 1.11 #if defined(ALLOW_THSICE) || defined(ALLOW_LAND)
57 jmc 1.6 INTEGER bi, bj
58 jmc 1.11 #endif
59 jmc 1.1
60 jmc 1.5 C-- Fill-in Diagnostics pkg storage array (for state-variables)
61     IF ( usediagnostics ) THEN
62 jmc 1.1
63 jmc 1.10 C- select which group of state-var diagnostics to fill-in,
64     C depending on: where this S/R is called from (seqFlag)
65 jmc 1.5 C and stagger/synchronous TimeStep
66     selectVars = 0
67 jmc 1.10 IF ( staggerTimeStep ) THEN
68 jmc 1.5 IF ( seqFlag.EQ.0 ) selectVars = 2
69     IF ( seqFlag.EQ.1 ) selectVars = 1
70     ELSE
71     IF ( seqFlag.EQ.0 ) selectVars = 3
72     ENDIF
73 molod 1.8 IF ( seqFlag.EQ.2 ) selectVars = 4
74 jmc 1.16 CALL DIAGNOSTICS_FILL_STATE( selectVars, myIter, myThid )
75 jmc 1.1
76 jmc 1.13 #ifdef ALLOW_GENERIC_ADVDIFF
77     IF ( seqFlag.EQ.0 .AND. useGAD ) THEN
78     CALL GAD_DIAGNOSTICS_STATE( myTime, myIter, myThid )
79     ENDIF
80     #endif /* ALLOW_GENERIC_ADVDIFF */
81    
82 jmc 1.5 #ifdef ALLOW_PTRACERS
83     IF ( (selectVars.EQ.1 .OR. selectVars.EQ.3)
84 jmc 1.10 & .AND. usePTRACERS ) THEN
85 jahn 1.14 CALL PTRACERS_DIAGNOSTICS_STATE( myTime, myIter, myThid )
86 jmc 1.1 ENDIF
87 jmc 1.16 #endif /* ALLOW_PTRACERS */
88 jmc 1.1
89 dimitri 1.15 #ifdef ALLOW_BBL
90     IF ( seqFlag.EQ.0 .AND. useBBL ) THEN
91     CALL BBL_DIAGNOSTICS_STATE( myTime, myIter, myThid )
92     ENDIF
93 jmc 1.16 #endif /* ALLOW_BBL */
94 dimitri 1.15
95 dimitri 1.17 #ifdef ALLOW_FRAZIL
96     IF ( seqFlag.EQ.0 .AND. useFRAZIL ) THEN
97     CALL FRAZIL_DIAGNOSTICS_STATE( myTime, myIter, myThid )
98     ENDIF
99     #endif /* ALLOW_FRAZIL */
100    
101 mlosch 1.9 #ifdef ALLOW_SEAICE
102     IF ( seqFlag.EQ.0 .AND. useSEAICE ) THEN
103 jmc 1.10 CALL SEAICE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
104 mlosch 1.9 ENDIF
105     #endif /* ALLOW_SEAICE */
106    
107 jmc 1.6 #ifdef ALLOW_THSICE
108     IF ( seqFlag.EQ.0 .AND. useThSIce ) THEN
109     DO bj=myByLo(myThid),myByHi(myThid)
110     DO bi=myBxLo(myThid),myBxHi(myThid)
111 jmc 1.10 CALL THSICE_DIAGNOSTICS_STATE( myTime,myIter,bi,bj,myThid )
112 jmc 1.6 ENDDO
113     ENDDO
114     ENDIF
115     #endif /* ALLOW_THSICE */
116    
117 jmc 1.7 #ifdef ALLOW_LAND
118     IF ( seqFlag.EQ.0 .AND. useLand ) THEN
119     DO bj=myByLo(myThid),myByHi(myThid)
120     DO bi=myBxLo(myThid),myBxHi(myThid)
121 jmc 1.10 CALL LAND_DIAGNOSTICS_STATE( myTime,myIter, bi,bj, myThid )
122 jmc 1.7 ENDDO
123     ENDDO
124     ENDIF
125     #endif /* ALLOW_LAND */
126    
127 jmc 1.12 #ifdef ALLOW_MYPACKAGE
128     IF ( seqFlag.EQ.0 .AND. useMYPACKAGE ) THEN
129     CALL MYPACKAGE_DIAGNOSTICS_STATE( myTime, myIter, myThid )
130     ENDIF
131     #endif /* ALLOW_MYPACKAGE */
132    
133 jmc 1.1 ENDIf
134     #endif /* ALLOW_DIAGNOSTICS */
135    
136     RETURN
137     END

  ViewVC Help
Powered by ViewVC 1.1.22