/[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.5 - (hide annotations) (download)
Fri Jan 28 01:00:13 2005 UTC (19 years, 3 months ago) by jmc
Branch: MAIN
Changes since 1.4: +38 -41 lines
move state variable diagnostics to the beginning of the time step.

1 jmc 1.5 C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_diags.F,v 1.4 2005/01/04 02:42:31 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     C | SUBROUTINE DO_STATEVARS_DIAGS
15     C | o Controlling routine for state variables diagnostics
16     C *==========================================================*
17 jmc 1.5 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     C myIter :: Iteration number
38     C myThid :: Thread number for this instance of the routine.
39 jmc 1.1 _RL myTime
40 jmc 1.5 INTEGER seqFlag
41 jmc 1.1 INTEGER myIter
42     INTEGER myThid
43     CEOP
44    
45 jmc 1.5 #ifdef ALLOW_DIAGNOSTICS
46 jmc 1.1 C !LOCAL VARIABLES:
47 jmc 1.5 C == Local variables ==
48     C selectVars :: select which group of dianostics variables to fill-in
49     C = 1 :: fill-in diagnostics for tracer variables only
50     C = 2 :: fill-in diagnostics for momentum variables only
51     C = 3 :: fill-in diagnostics for momentum & tracer variables
52     INTEGER selectVars
53 jmc 1.1
54 jmc 1.5 C-- Fill-in Diagnostics pkg storage array (for state-variables)
55     IF ( usediagnostics ) THEN
56 jmc 1.1
57 jmc 1.5 C- select which group of state-var diagnostics to fill-in,
58     C depending on: where this S/R is called from (seqFlag)
59     C and stagger/synchronous TimeStep
60     selectVars = 0
61     IF ( staggerTimeStep ) THEN
62     IF ( seqFlag.EQ.0 ) selectVars = 2
63     IF ( seqFlag.EQ.1 ) selectVars = 1
64     ELSE
65     IF ( seqFlag.EQ.0 ) selectVars = 3
66     ENDIF
67     CALL DIAGNOSTICS_FILL_STATE(selectVars, myThid)
68 jmc 1.1
69 jmc 1.5 #ifdef ALLOW_PTRACERS
70     IF ( (selectVars.EQ.1 .OR. selectVars.EQ.3)
71     & .AND. usePTRACERS ) THEN
72     CALL PTRACERS_DIAGNOSTICS_FILL(myThid)
73 jmc 1.1 ENDIF
74 jmc 1.5 #endif
75 jmc 1.1
76     ENDIf
77     #endif /* ALLOW_DIAGNOSTICS */
78    
79     RETURN
80     END

  ViewVC Help
Powered by ViewVC 1.1.22