/[MITgcm]/MITgcm/pkg/gmredi/gmredi_diags.F
ViewVC logotype

Contents of /MITgcm/pkg/gmredi/gmredi_diags.F

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


Revision 1.7 - (show annotations) (download)
Thu Nov 14 22:43:49 2002 UTC (21 years, 5 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint48f_post, checkpoint51k_post, checkpoint53f_post, checkpoint47j_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint48d_pre, checkpoint51l_post, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint52l_pre, checkpoint48i_post, checkpoint52e_pre, hrcube4, hrcube5, checkpoint52j_post, checkpoint47f_post, checkpoint54b_post, checkpoint47c_post, checkpoint50e_post, checkpoint52e_post, checkpoint50c_post, checkpoint51n_pre, checkpoint47d_post, checkpoint47a_post, checkpoint57b_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint55d_pre, checkpoint48e_post, checkpoint57a_post, checkpoint48h_post, checkpoint55j_post, checkpoint56b_post, checkpoint50c_pre, branchpoint-genmake2, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint50d_pre, checkpoint55h_post, checkpoint51r_post, checkpoint47i_post, checkpoint52b_pre, checkpoint52n_post, checkpoint51o_pre, checkpoint51i_post, checkpoint54d_post, checkpoint47h_post, checkpoint48c_post, checkpoint56c_post, checkpoint54e_post, checkpoint55b_post, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint51c_post, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint47d_pre, checkpoint48, checkpoint49, checkpoint47b_post, checkpoint53b_post, checkpoint55g_post, checkpoint48d_post, checkpoint51o_post, checkpoint48g_post, checkpoint51f_pre, checkpoint55f_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52d_post, checkpoint51b_pre, checkpoint52a_post, checkpoint47g_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint48a_post, checkpoint51h_pre, checkpoint50g_post, checkpoint50b_pre, checkpoint51g_post, ecco_c52_e35, checkpoint54f_post, checkpoint51f_post, checkpoint48b_post, checkpoint50b_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52a_pre, checkpoint51d_post, checkpoint48c_pre, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, checkpoint47, checkpoint55e_post, checkpoint54c_post, checkpoint50h_post, checkpoint52i_post, checkpoint51a_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51p_post, checkpoint51n_post, checkpoint55i_post, checkpoint51i_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51s_post, checkpoint55d_post
Branch point for: netcdf-sm0, branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch, branch-exfmods-curt
Changes since 1.6: +2 -2 lines
o * "clean" adjoint code (in terms of extensive recomputations)
    can now be obtained for all GMREDI options (i.e. for
    - GM_VISBECK_VARIABLE_K
    - GM_NON_UNITY_DIAGONAL
    - GM_EXTRA_DIAGONAL
    - GM_BOLUS_ADVEC )
  * However, wrong gradient check problem remains unsolved.
  * New CPP options have been introduced for different
    tapering schemes

1 C $Header: /u/gcmpack/MITgcm/pkg/gmredi/gmredi_diags.F,v 1.6 2001/12/16 18:54:49 jmc Exp $
2 C $Name: checkpoint46 $
3
4 #include "GMREDI_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE GMREDI_DIAGS( myTime, myIter, myThid )
8 C /==========================================================\
9 C | SUBROUTINE GMREDI_DIAGS |
10 C | o Do GM/Redi diagnostic output |
11 C |==========================================================|
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GMREDI.h"
20 #include "GMREDI_DIAGS.h"
21
22 C == Routine arguments ==
23 C myTime - Current time of simulation ( s )
24 C myIter - Iteration number
25 C myThid - Number of this instance of INI_FORCING
26 _RL myTime
27 INTEGER myIter
28 INTEGER myThid
29 CEndOfInterface
30
31 #ifdef ALLOW_GMREDI
32
33 C == Local variables ==
34 LOGICAL DIFFERENT_MULTIPLE
35 EXTERNAL DIFFERENT_MULTIPLE
36 INTEGER bi, bj, K
37 CHARACTER*(MAX_LEN_MBUF) suff
38
39
40 #if ( defined (GM_NON_UNITY_DIAGONAL) || defined (GM_EXTRA_DIAGONAL) )
41
42 IF ( DIFFERENT_MULTIPLE(diagFreq,myTime,myTime-deltaTClock)
43 & ) THEN
44 WRITE(suff,'(I10.10)') myIter
45 #ifdef GM_NON_UNITY_DIAGONAL
46 CALL WRITE_FLD_XYZ_RL( 'GM_Kux.',suff,Kux,myIter,myThid)
47 CALL WRITE_FLD_XYZ_RL( 'GM_Kvy.',suff,Kvy,myIter,myThid)
48 #endif
49 #ifdef GM_EXTRA_DIAGONAL
50 IF (GM_ExtraDiag) THEN
51 CALL WRITE_FLD_XYZ_RL( 'GM_Kuz.',suff,Kuz,myIter,myThid)
52 CALL WRITE_FLD_XYZ_RL( 'GM_Kvz.',suff,Kvz,myIter,myThid)
53 ENDIF
54 #endif
55 ENDIF
56
57 #endif /* GM_NON_UNITY_DIAGONAL || GM_EXTRA_DIAGONAL */
58
59
60 #ifdef ALLOW_TIMEAVE
61
62 C Dump files and restart average computation if needed
63 IF ( DIFFERENT_MULTIPLE(taveFreq,myTime,myTime-deltaTClock)
64 & ) THEN
65
66 C Normalize by integrated time
67 DO bj = myByLo(myThid), myByHi(myThid)
68 DO bi = myBxLo(myThid), myBxHi(myThid)
69 CALL TIMEAVE_NORMALIZ(GM_Kwx_T,GM_timeave, Nr,
70 & bi,bj,myThid)
71 CALL TIMEAVE_NORMALIZ(GM_Kwy_T,GM_timeave, Nr,
72 & bi,bj,myThid)
73 CALL TIMEAVE_NORMALIZ(GM_Kwz_T,GM_timeave, Nr,
74 & bi,bj,myThid)
75 #ifdef GM_VISBECK_VARIABLE_K
76 IF (GM_Visbeck_alpha.NE.0.)
77 & CALL TIMEAVE_NORMALIZ(Visbeck_K_T,GM_timeave, 1,
78 & bi,bj,myThid)
79 #endif
80 #ifdef GM_BOLUS_ADVEC
81 IF (GM_AdvForm) THEN
82 CALL TIMEAVE_NORMALIZ(GM_PsiXtave,GM_timeave, Nr,
83 & bi,bj,myThid)
84 CALL TIMEAVE_NORMALIZ(GM_PsiYtave,GM_timeave, Nr,
85 & bi,bj,myThid)
86 ENDIF
87 #endif
88 ENDDO
89 ENDDO
90
91 WRITE(suff,'(I10.10)') myIter
92
93 CALL WRITE_FLD_XYZ_RL('GM_Kwx-T.',suff,GM_Kwx_T,myIter,myThid)
94 CALL WRITE_FLD_XYZ_RL('GM_Kwy-T.',suff,GM_Kwy_T,myIter,myThid)
95 CALL WRITE_FLD_XYZ_RL('GM_Kwz-T.',suff,GM_Kwz_T,myIter,myThid)
96 #ifdef GM_VISBECK_VARIABLE_K
97 IF (GM_Visbeck_alpha.NE.0.)
98 & CALL WRITE_FLD_XY_RL('Visbeck_K-T.',suff,Visbeck_K_T,
99 & myIter,myThid)
100 #endif
101 #ifdef GM_BOLUS_ADVEC
102 IF (GM_AdvForm) THEN
103 CALL WRITE_FLD_XYZ_RL('GM_PsiXtave.',suff,GM_PsiXtave,
104 & myIter,myThid)
105 CALL WRITE_FLD_XYZ_RL('GM_PsiYtave.',suff,GM_PsiYtave,
106 & myIter,myThid)
107 ENDIF
108 #endif
109
110 C Reset averages to zero
111 DO bj = myByLo(myThid), myByHi(myThid)
112 DO bi = myBxLo(myThid), myBxHi(myThid)
113 CALL TIMEAVE_RESET(GM_Kwx_T,Nr,bi,bj,myThid)
114 CALL TIMEAVE_RESET(GM_Kwy_T,Nr,bi,bj,myThid)
115 CALL TIMEAVE_RESET(GM_Kwz_T,Nr,bi,bj,myThid)
116 #ifdef GM_VISBECK_VARIABLE_K
117 IF (GM_Visbeck_alpha.NE.0.)
118 & CALL TIMEAVE_RESET(Visbeck_K_T,1,bi,bj,myThid)
119 #endif
120 #ifdef GM_BOLUS_ADVEC
121 IF (GM_AdvForm) THEN
122 CALL TIMEAVE_RESET(GM_PsiXtave,Nr,bi,bj,myThid)
123 CALL TIMEAVE_RESET(GM_PsiYtave,Nr,bi,bj,myThid)
124 ENDIF
125 #endif
126 DO k=1,Nr
127 GM_TimeAve(k,bi,bj)=0.
128 ENDDO
129 ENDDO
130 ENDDO
131
132 ENDIF
133
134 #endif /* ALLOW_TIMEAVE */
135
136 #endif /* ALLOW_GMREDI */
137
138 RETURN
139 END

  ViewVC Help
Powered by ViewVC 1.1.22