/[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.7 - (show annotations) (download)
Mon Feb 14 00:46:58 2005 UTC (19 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57g_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint57g_pre, checkpoint57y_pre, checkpoint57f_pre, checkpoint57v_post, checkpoint57r_post, checkpoint58, eckpoint57e_pre, checkpoint57h_done, checkpoint57x_post, checkpoint57n_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint57q_post, checkpoint57z_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post
Changes since 1.6: +11 -1 lines
allow to use pkg diagnostics for pkg/land state-vars output.

1 C $Header: /u/gcmpack/MITgcm/model/src/do_statevars_diags.F,v 1.6 2005/01/31 19:45:14 jmc 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 myIter :: Iteration number
38 C myThid :: Thread number for this instance of the routine.
39 _RL myTime
40 INTEGER seqFlag
41 INTEGER myIter
42 INTEGER myThid
43 CEOP
44
45 #ifdef ALLOW_DIAGNOSTICS
46 C !LOCAL VARIABLES:
47 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 C bi,bj :: tile indices
53 INTEGER selectVars
54 INTEGER bi, bj
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 CALL DIAGNOSTICS_FILL_STATE(selectVars, myThid)
70
71 #ifdef ALLOW_PTRACERS
72 IF ( (selectVars.EQ.1 .OR. selectVars.EQ.3)
73 & .AND. usePTRACERS ) THEN
74 CALL PTRACERS_DIAGNOSTICS_FILL(myThid)
75 ENDIF
76 #endif
77
78 #ifdef ALLOW_THSICE
79 IF ( seqFlag.EQ.0 .AND. useThSIce ) THEN
80 DO bj=myByLo(myThid),myByHi(myThid)
81 DO bi=myBxLo(myThid),myBxHi(myThid)
82 CALL THSICE_DIAGNOSTICS_FILL( myTime,myIter, bi,bj, myThid )
83 ENDDO
84 ENDDO
85 ENDIF
86 #endif /* ALLOW_THSICE */
87
88 #ifdef ALLOW_LAND
89 IF ( seqFlag.EQ.0 .AND. useLand ) THEN
90 DO bj=myByLo(myThid),myByHi(myThid)
91 DO bi=myBxLo(myThid),myBxHi(myThid)
92 CALL LAND_DIAGNOSTICS_FILL( myTime,myIter, bi,bj, myThid )
93 ENDDO
94 ENDDO
95 ENDIF
96 #endif /* ALLOW_LAND */
97
98 ENDIf
99 #endif /* ALLOW_DIAGNOSTICS */
100
101 RETURN
102 END

  ViewVC Help
Powered by ViewVC 1.1.22