/[MITgcm]/MITgcm/pkg/sbo/sbo_diags.F
ViewVC logotype

Annotation of /MITgcm/pkg/sbo/sbo_diags.F

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


Revision 1.4 - (hide annotations) (download)
Thu Oct 9 04:19:20 2003 UTC (20 years, 11 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint53f_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint51l_post, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint57b_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint57f_pre, checkpoint55d_pre, checkpoint57d_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint51q_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52l_post, checkpoint55h_post, checkpoint51r_post, checkpoint52k_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51i_post, checkpoint57e_post, checkpoint54d_post, checkpoint52l_pre, checkpoint56c_post, checkpoint54e_post, checkpoint55b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint57a_post, hrcube5, checkpoint55g_post, checkpoint51o_post, checkpoint55f_post, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, ecco_c52_e35, checkpoint54f_post, checkpoint55e_post, eckpoint57e_pre, checkpoint57c_post, checkpoint53b_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, checkpoint51p_post, checkpoint51n_post, checkpoint55i_post, checkpoint54c_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, netcdf-sm0, tg2-branch, checkpoint51n_branch
Changes since 1.3: +2 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 edhill 1.4 C $Header: /u/u3/gcmpack/MITgcm/pkg/sbo/sbo_diags.F,v 1.2.4.1 2003/10/02 18:18:33 adcroft Exp $
2     C $Name: $
3 dimitri 1.2
4     #include "SBO_OPTIONS.h"
5    
6     SUBROUTINE SBO_DIAGS( myCurrentTime, myIter, myThid )
7     C /==========================================================\
8     C | SUBROUTINE SBO_DIAGS |
9     C | o Do SBO diagnostic output. |
10     C \==========================================================/
11     IMPLICIT NONE
12    
13     C === Global variables ===
14     #include "SIZE.h"
15     #include "EEPARAMS.h"
16     #include "PARAMS.h"
17     #include "SBO.h"
18    
19     C == Routine arguments ==
20     C myCurrentTime - Current time of simulation ( s )
21     C myIter - Iteration number
22     C myThid - Number of this instance of INI_FORCING
23     _RL myCurrentTime
24     INTEGER myIter
25     INTEGER myThid
26    
27     #ifdef ALLOW_SBO
28    
29     c == Local variables ==
30     c bi, bj - loop counters
31     c sbo_diag - vector of SBO diagnostics contains:
32     c model time (s), xoamc, yoamc, zoamc,
33     c xoamp, yoamp, zoamp, mass, xcom, ycom, zcom
34     INTEGER bi, bj
35     Real*8 sbo_diag(11)
36     LOGICAL DIFFERENT_MULTIPLE
37     EXTERNAL DIFFERENT_MULTIPLE
38     _RL DDTT
39     CHARACTER*(MAX_LEN_MBUF) suff
40     character*(8) fName
41     integer narr
42     integer irecord, k
43    
44     C-----------------------------------------------------------------
45     C Save angular momentum and mass variables at every time step
46     C-----------------------------------------------------------------
47    
48     sbo_diag(1) = myCurrentTime
49     sbo_diag(2) = xoamc
50     sbo_diag(3) = yoamc
51     sbo_diag(4) = zoamc
52     sbo_diag(5) = xoamp
53     sbo_diag(6) = yoamp
54     sbo_diag(7) = zoamp
55     sbo_diag(8) = mass
56     sbo_diag(9) = xcom
57     sbo_diag(10) = ycom
58     sbo_diag(11) = zcom
59    
60     fName = 'SBO_DIAG'
61     narr = 11
62     irecord = myCurrentTime/deltaTClock
63    
64     CALL SBO_WRITEVECTOR(
65     I fName,
66     I narr,
67     I sbo_diag,
68     I irecord,
69     I myIter,
70     I myThid )
71    
72     #ifdef ALLOW_TIMEAVE
73    
74     C-----------------------------------------------------------------
75     C Save time-averaged bottom pressure at sbo_taveFreq intervals
76     C-----------------------------------------------------------------
77    
78     C Initialize averages to zero
79     IF ( myIter.EQ.nIter0 ) THEN
80     DO bj = myByLo(myThid), myByHi(myThid)
81     DO bi = myBxLo(myThid), myBxHi(myThid)
82     CALL TIMEAVE_RESET(OBPtave,1,bi,bj,myThid)
83     DO k=1,Nr
84     sbo_TimeAve(k,bi,bj)=0.
85     ENDDO
86     ENDDO
87     ENDDO
88     ENDIF
89    
90     C Time Average SBO fields
91     IF ( myIter .EQ. nIter0 .OR.
92     & DIFFERENT_MULTIPLE
93     & (sbo_taveFreq,myCurrentTime,myCurrentTime-deltaTClock) )
94     & THEN
95     DDTT=0.5*deltaTclock
96     ELSE
97     DDTT=deltaTclock
98     ENDIF
99     DO bj = myByLo(myThid), myByHi(myThid)
100     DO bi = myBxLo(myThid), myBxHi(myThid)
101     CALL TIMEAVE_CUMULATE(
102     & obp,OBPtave,1,DDTT,bi,bj,myThid)
103    
104     C Keep record of how much time has been integrated over
105     DO k=1,Nr
106     sbo_TimeAve(k,bi,bj)=sbo_TimeAve(k,bi,bj)+DDTT
107     ENDDO
108     ENDDO
109     ENDDO
110    
111     C Dump files and restart average computation if needed
112     IF ( myIter.NE.nIter0 .AND.
113     & DIFFERENT_MULTIPLE(sbo_taveFreq,myCurrentTime,
114     & myCurrentTime-deltaTClock)
115     & ) THEN
116    
117     C Normalize by integrated time
118     DO bj = myByLo(myThid), myByHi(myThid)
119     DO bi = myBxLo(myThid), myBxHi(myThid)
120     CALL TIMEAVE_NORMALIZ(OBPtave,sbo_timeave,1,bi,bj,myThid)
121     ENDDO
122     ENDDO
123    
124     WRITE(suff,'(I10.10)') myIter
125    
126     CALL WRITE_FLD_XY_RL('OBPtave',suff,OBPtave,
127     & myIter,myThid)
128    
129     C Reset averages to zero
130     DO bj = myByLo(myThid), myByHi(myThid)
131     DO bi = myBxLo(myThid), myBxHi(myThid)
132     CALL TIMEAVE_RESET(OBPtave,1,bi,bj,myThid)
133     DO k=1,Nr
134     sbo_TimeAve(k,bi,bj)=0.
135     ENDDO
136     ENDDO
137     ENDDO
138    
139     C Time Average SBO fields
140     DDTT=0.5*deltaTclock
141     DO bj = myByLo(myThid), myByHi(myThid)
142     DO bi = myBxLo(myThid), myBxHi(myThid)
143     CALL TIMEAVE_CUMULATE(
144     & obp,OBPtave,1,DDTT,bi,bj,myThid)
145    
146     C Keep record of how much time has been integrated over
147     DO k=1,Nr
148     sbo_TimeAve(k,bi,bj)=sbo_TimeAve(k,bi,bj)+DDTT
149     ENDDO
150     ENDDO
151     ENDDO
152     ENDIF
153    
154 adcroft 1.3 #endif /* ALLOW_TIMEAVE */
155 dimitri 1.2
156 adcroft 1.3 #endif /* ALLOW_SBO */
157 dimitri 1.2
158     RETURN
159     END

  ViewVC Help
Powered by ViewVC 1.1.22