/[MITgcm]/MITgcm/pkg/dic/dic_aver.F
ViewVC logotype

Contents of /MITgcm/pkg/dic/dic_aver.F

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


Revision 1.1 - (show annotations) (download)
Mon Oct 6 20:11:10 2003 UTC (20 years, 9 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint53f_post, checkpoint53b_pre, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53c_post, checkpoint51l_post, checkpoint51j_post, checkpoint51q_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52l_post, checkpoint51r_post, checkpoint52k_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51i_post, checkpoint52d_pre, checkpoint51l_pre, checkpoint52m_post, checkpoint53a_post, checkpoint54, checkpoint53b_post, checkpoint51o_post, checkpoint51p_post, checkpoint53, checkpoint52, checkpoint51f_post, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint51h_pre, ecco_c52_e35, hrcube5, checkpoint52a_pre, checkpoint52i_post, checkpoint51t_post, checkpoint53d_pre, checkpoint51n_post, checkpoint51i_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51m_post, checkpoint51s_post
Branch point for: netcdf-sm0, branch-nonh, tg2-branch, checkpoint51n_branch
changes to keep current with gchem pkg, and to be adjointable

1 cswdcost -- add sunroutine ---
2 #include "CPP_OPTIONS.h"
3 #include "GCHEM_OPTIONS.h"
4
5
6 CStartOfInterFace
7 SUBROUTINE DIC_AVER(
8 I myTime,myIter,myThid)
9
10 C /==========================================================\
11 C | SUBROUTINE DIC_AVER i |
12 C |==========================================================|
13 IMPLICIT NONE
14
15 C == GLobal variables ==
16 #include "SIZE.h"
17 #include "DYNVARS.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GRID.h"
21 #include "PTRACERS.h"
22 #include "GCHEM.h"
23 #include "DIC_ABIOTIC.h"
24 #ifdef DIC_BIOTIC
25 #include "DIC_BIOTIC.h"
26 #include "DIC_DIAGS.h"
27 #include "DIC_COST.h"
28 #endif
29 #ifdef ALLOW_SEAICE
30 #include "ICE.h"
31 #endif
32
33 C == Routine arguments ==
34 INTEGER myIter
35 _RL myTime
36 INTEGER myThid
37
38 #ifdef ALLOW_DIC_COST
39
40 C == Local variables ==
41 LOGICAL DIFFERENT_MULTIPLE
42 EXTERNAL DIFFERENT_MULTIPLE
43 INTEGER i, j, bi, bj, k, it
44 _RL rdt
45 INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm
46
47 cswddmonth -- end-
48 c
49 c averages
50 DO bj = myByLo(myThid), myByHi(myThid)
51 DO bi = myBxLo(myThid), myBxHi(myThid)
52 DO k=1,Nr
53 OBS_timetave(bi,bj,k)=OBS_timetave(bi,bj,k)+
54 & deltaTclock
55 DO j=1-OLy,sNy+OLy
56 DO i=1-OLx,sNx+OLx
57 po4ann(i,j,k,bi,bj)=po4ann(i,j,k,bi,bj)+
58 & PTRACER(i,j,k,bi,bj,3)*deltaTclock
59 o2ann(i,j,k,bi,bj)=o2ann(i,j,k,bi,bj)+
60 & PTRACER(i,j,k,bi,bj,5)*deltaTclock
61 ENDDO
62 ENDDO
63 ENDDO
64 ENDDO
65 ENDDO
66 cswdmonth-add--
67 rdt=1. _d 0 / deltaTclock
68 nForcingPeriods=int(externForcingCycle/externForcingPeriod+0.5)
69 Imytm=int(myTime*rdt+0.5)
70 Ifprd=int(externForcingPeriod*rdt+0.5)
71 Ifcyc=int(externForcingCycle*rdt+0.5)
72 Iftm=mod( Imytm+Ifcyc ,Ifcyc)
73 it=int(Iftm/Ifprd)+1
74 c print*,'QQ timing check', mytime, myIter, it
75 DO bj = myByLo(myThid), myByHi(myThid)
76 DO bi = myBxLo(myThid), myBxHi(myThid)
77 OBSM_timetave(bi,bj,it)=OBSM_timetave(bi,bj,it)+
78 & deltaTclock
79 DO j=1-OLy,sNy+OLy
80 DO i=1-OLx,sNx+OLx
81 po4lev1(i,j,it,bi,bj)=po4lev1(i,j,it,bi,bj)+
82 & PTRACER(i,j,1,bi,bj,3)*deltaTclock
83 po4lev2(i,j,it,bi,bj)=po4lev2(i,j,it,bi,bj)+
84 & PTRACER(i,j,2,bi,bj,3)*deltaTclock
85 po4lev3(i,j,it,bi,bj)=po4lev3(i,j,it,bi,bj)+
86 & PTRACER(i,j,3,bi,bj,3)*deltaTclock
87 cQQ po4lev4(i,j,it,bi,bj)=po4lev4(i,j,it,bi,bj)+
88 cQQ & PTRACER(i,j,4,bi,bj,3)*deltaTclock
89 o2lev1(i,j,it,bi,bj)=o2lev1(i,j,it,bi,bj)+
90 & PTRACER(i,j,1,bi,bj,5)*deltaTclock
91 o2lev2(i,j,it,bi,bj)=o2lev2(i,j,it,bi,bj)+
92 & PTRACER(i,j,2,bi,bj,5)*deltaTclock
93 o2lev3(i,j,it,bi,bj)=o2lev3(i,j,it,bi,bj)+
94 & PTRACER(i,j,3,bi,bj,5)*deltaTclock
95 cQQ O2lev4(i,j,it,bi,bj)=O2lev4(i,j,it,bi,bj)+
96 cQQ & PTRACER(i,j,4,bi,bj,5)*deltaTclock
97 ENDDO
98 ENDDO
99 ENDDO
100 ENDDO
101
102 cswdmonth-end--
103
104
105 #endif
106 c
107 RETURN
108 END
109 cswd -- end added subroutine --

  ViewVC Help
Powered by ViewVC 1.1.22