/[MITgcm]/MITgcm/pkg/aim/aim_write_diags.F
ViewVC logotype

Contents of /MITgcm/pkg/aim/aim_write_diags.F

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


Revision 1.6 - (show annotations) (download)
Fri Nov 22 03:04:44 2002 UTC (21 years, 5 months ago) by jmc
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, checkpoint48d_post, checkpoint51o_pre, checkpoint47c_post, checkpoint50e_post, checkpoint52e_post, checkpoint50c_post, checkpoint51n_pre, checkpoint47d_post, checkpoint47a_post, checkpoint57b_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint57f_pre, checkpoint48a_post, checkpoint55d_pre, checkpoint51f_pre, checkpoint48e_post, checkpoint57c_pre, 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, checkpoint54b_post, checkpoint51i_post, checkpoint57e_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, checkpoint57a_post, checkpoint48, checkpoint49, checkpoint47b_post, checkpoint56, checkpoint55g_post, checkpoint51o_post, checkpoint48g_post, checkpoint57d_post, checkpoint55f_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint53b_post, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52d_post, checkpoint51b_pre, checkpoint52a_post, checkpoint47g_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint51h_pre, checkpoint50g_post, checkpoint50b_pre, checkpoint51g_post, ecco_c52_e35, checkpoint54f_post, checkpoint51f_post, checkpoint48b_post, checkpoint50b_post, eckpoint57e_pre, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52a_pre, checkpoint47d_pre, checkpoint51d_post, checkpoint48c_pre, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, 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.5: +3 -3 lines
change arguments and S/R name to enable the switch aim <-> aim_v23

1 C $Header: /u/gcmpack/MITgcm/pkg/aim/aim_write_diags.F,v 1.5 2001/05/29 14:01:37 adcroft Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 CStartOfInterFace
7 SUBROUTINE AIM_WRITE_TAVE( myTime, myIter, myThid )
8 C /==========================================================\
9 C | SUBROUTINE AIM_WRITE_TAVE |
10 C | o Write out AIM diagnostic output |
11 C \==========================================================/
12 IMPLICIT NONE
13
14 C === Global variables ===
15 #include "SIZE.h"
16 #include "EEPARAMS.h"
17 #include "PARAMS.h"
18 #include "AIM_DIAGS.h"
19 LOGICAL DIFFERENT_MULTIPLE
20 EXTERNAL DIFFERENT_MULTIPLE
21
22 C Common (shared with RD_WR_FLD routines in read_write_fld.F)
23 COMMON /RD_WR_FLD/ globalFile
24 LOGICAL globalFile
25
26 C == Routine arguments ==
27 C myTime - Current time of simulation ( s )
28 C myIter - Iteration number
29 C myThid - Number of this instance of the routine
30 _RL myTime
31 INTEGER myIter
32 INTEGER myThid
33 CEndOfInterface
34
35 #ifdef ALLOW_AIM
36
37 C == Local variables ==
38 INTEGER bi, bj, K
39 CHARACTER*(MAX_LEN_MBUF) fn
40 LOGICAL gf
41 c_jmc gf = .TRUE.
42 gf = globalFile
43
44 #ifdef ALLOW_TIMEAVE
45
46 C Dump files and restart average computation if needed
47 IF ( myIter.NE.nIter0 .AND.
48 & DIFFERENT_MULTIPLE(taveFreq,myTime,
49 & myTime-deltaTClock)
50 & ) THEN
51
52 C Normalize by integrated time
53 DO bj = myByLo(myThid), myByHi(myThid)
54 DO bi = myBxLo(myThid), myBxHi(myThid)
55 CALL TIMEAVE_NORMALIZ(USTRtave,AIM_timeave,1,bi,bj,myThid)
56 CALL TIMEAVE_NORMALIZ(VSTRtave,AIM_timeave,1,bi,bj,myThid)
57 CALL TIMEAVE_NORMALIZ(TSRtave,AIM_timeave,1,bi,bj,myThid)
58 CALL TIMEAVE_NORMALIZ(OLRtave,AIM_timeave,1,bi,bj,myThid)
59 CALL TIMEAVE_NORMALIZ(SSRtave,AIM_timeave,1,bi,bj,myThid)
60 CALL TIMEAVE_NORMALIZ(SLRtave,AIM_timeave,1,bi,bj,myThid)
61 CALL TIMEAVE_NORMALIZ(SHFtave,AIM_timeave,1,bi,bj,myThid)
62 CALL TIMEAVE_NORMALIZ(EVAPtave,AIM_timeave,1,bi,bj,myThid)
63 CALL TIMEAVE_NORMALIZ(PRECNVtave,AIM_timeave,1,bi,bj,myThid)
64 CALL TIMEAVE_NORMALIZ(PRECLStave,AIM_timeave,1,bi,bj,myThid)
65 CALL TIMEAVE_NORMALIZ(CLOUDCtave,AIM_timeave,1,bi,bj,myThid)
66 ENDDO
67 ENDDO
68
69
70 _BARRIER
71 _BEGIN_MASTER( myThid )
72 WRITE(fn,'(A,I10.10)') 'aimphyvars.',myIter
73 CALL MDSWRITEFIELD(fn,precFloat32,gf,
74 & 'RL',1,USTRtave, 1,myIter,myThid)
75 CALL MDSWRITEFIELD(fn,precFloat32,gf,
76 & 'RL',1,VSTRtave, 2,myIter,myThid)
77 CALL MDSWRITEFIELD(fn,precFloat32,gf,
78 & 'RL',1,TSRtave , 3,myIter,myThid)
79 CALL MDSWRITEFIELD(fn,precFloat32,gf,
80 & 'RL',1,OLRtave , 4,myIter,myThid)
81 CALL MDSWRITEFIELD(fn,precFloat32,gf,
82 & 'RL',1,SSRtave , 5,myIter,myThid)
83 CALL MDSWRITEFIELD(fn,precFloat32,gf,
84 & 'RL',1,SLRtave , 6,myIter,myThid)
85 CALL MDSWRITEFIELD(fn,precFloat32,gf,
86 & 'RL',1,SHFtave , 7,myIter,myThid)
87 CALL MDSWRITEFIELD(fn,precFloat32,gf,
88 & 'RL',1,EVAPtave, 8,myIter,myThid)
89 CALL MDSWRITEFIELD(fn,precFloat32,gf,
90 & 'RL',1,PRECNVtave, 9,myIter,myThid)
91 CALL MDSWRITEFIELD(fn,precFloat32,gf,
92 & 'RL',1,PRECLStave,10,myIter,myThid)
93 CALL MDSWRITEFIELD(fn,precFloat32,gf,
94 & 'RL',1,CLOUDCtave,11,myIter,myThid)
95 _END_MASTER( myThid )
96 _BARRIER
97
98 C Reset averages to zero
99 DO bj = myByLo(myThid), myByHi(myThid)
100 DO bi = myBxLo(myThid), myBxHi(myThid)
101 CALL TIMEAVE_RESET(USTRtave, 1, bi, bj, myThid)
102 CALL TIMEAVE_RESET(VSTRtave, 1, bi, bj, myThid)
103 CALL TIMEAVE_RESET(TSRtave, 1, bi, bj, myThid)
104 CALL TIMEAVE_RESET(OLRtave, 1, bi, bj, myThid)
105 CALL TIMEAVE_RESET(SSRtave, 1, bi, bj, myThid)
106 CALL TIMEAVE_RESET(SLRtave, 1, bi, bj, myThid)
107 CALL TIMEAVE_RESET(SHFtave, 1, bi, bj, myThid)
108 CALL TIMEAVE_RESET(EVAPtave, 1, bi, bj, myThid)
109 CALL TIMEAVE_RESET(PRECNVtave,1, bi, bj, myThid)
110 CALL TIMEAVE_RESET(PRECLStave,1, bi, bj, myThid)
111 CALL TIMEAVE_RESET(CLOUDCtave,1, bi, bj, myThid)
112 DO k=1,Nr
113 AIM_TimeAve(k,bi,bj)=0.
114 ENDDO
115 ENDDO
116 ENDDO
117
118 ENDIF
119
120 #endif /* ALLOW_TIMEAVE */
121
122 #endif /* ALLOW_AIM */
123
124 RETURN
125 END

  ViewVC Help
Powered by ViewVC 1.1.22