/[MITgcm]/MITgcm/pkg/timeave/timeave_cumul_2vfc.F
ViewVC logotype

Contents of /MITgcm/pkg/timeave/timeave_cumul_2vfc.F

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


Revision 1.4 - (show annotations) (download)
Fri Aug 19 22:50:26 2005 UTC (18 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint57s_post, checkpoint58b_post, checkpoint57y_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint62s, checkpoint58a_post, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint57z_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint57t_post, checkpoint63g, checkpoint57v_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint58w_post, checkpoint57y_pre, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint58r_post, checkpoint58n_post, checkpoint65o, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpint57u_post, checkpoint57q_post, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint61q, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.3: +6 -6 lines
Move deltaT to deltaTloc to avoid conflict with PARAMS.h

1 C $Header: /u/gcmpack/MITgcm/pkg/timeave/timeave_cumul_2vfc.F,v 1.3 2003/12/05 02:27:59 jmc Exp $
2 C $Name: $
3 #include "CPP_EEOPTIONS.h"
4
5 CStartofinterface
6 SUBROUTINE TIMEAVE_CUMUL_2VFC(
7 O fldtave,
8 I fld1, fld2, fld3, Ksize, dir, deltaTloc,
9 I bi, bj, myThid )
10 C /==========================================================\
11 C | SUBROUTINE TIMEAVE_CUMUL_2VFC |
12 C | o Sum over time a product of 2 fields and 1 factor array |
13 C | depending on the relative position on the grid of the |
14 C | 2nd field & factor (tracer_grid, u_grid, v_grid). |
15 C | The first array is on tracer_grid or at same position |
16 C | as the 2 others ; 2nd and 3rd always at same position |
17 C \==========================================================/
18 IMPLICIT NONE
19
20 C == Global variables ===
21 #include "SIZE.h"
22 #include "EEPARAMS.h"
23
24 C == Routine arguments ==
25 C myThid - Thread number for this instance of the routine.
26 C fldtave - time averaged Field
27 C fld1,fld2 - Input fields
28 C fld3 - Input factor
29 C dir - type of grid for 2nd field and factor, relatively to the 1rst :
30 C 0: same location ; 1: zonal,West ; 2: merid, South
31 C Ksize - 3rd dimension of local arrays (Input and Output fields)
32 INTEGER Ksize, dir
33 _RL fld1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
34 _RL fld2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
35 _RS fld3(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
36 _RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Ksize,nSx,nSy)
37 _RL deltaTloc
38 INTEGER bi, bj, myThid
39
40 CEndofinterface
41
42 C == Local variables ==
43 C i,j,k,bi,bj - Loop counters
44 INTEGER i, j, k
45
46 IF ( dir.eq.0 ) THEN
47
48 C DO bj = myByLo(myThid), myByHi(myThid)
49 C DO bi = myBxLo(myThid), myBxHi(myThid)
50 DO k=1,Ksize
51 DO j=1,sNy
52 DO i=1,sNx
53 fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj) + deltaTloc*
54 & fld1(i,j,k,bi,bj)*fld2(i,j,k,bi,bj)*fld3(i,j,k,bi,bj)
55 ENDDO
56 ENDDO
57 ENDDO
58 C ENDDO
59 C ENDDO
60
61 ELSEIF ( dir.eq.1 ) THEN
62
63 C DO bj = myByLo(myThid), myByHi(myThid)
64 C DO bi = myBxLo(myThid), myBxHi(myThid)
65 DO k=1,Ksize
66 DO j=1,sNy
67 DO i=1,sNx
68 fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj) + deltaTloc*
69 & 0.5*( fld1(i-1,j,k,bi,bj) + fld1(i,j,k,bi,bj) )
70 & *fld2(i,j,k,bi,bj)*fld3(i,j,k,bi,bj)
71 ENDDO
72 ENDDO
73 ENDDO
74 C ENDDO
75 C ENDDO
76
77 ELSEIF ( dir.eq.2 ) THEN
78
79 C DO bj = myByLo(myThid), myByHi(myThid)
80 C DO bi = myBxLo(myThid), myBxHi(myThid)
81 DO k=1,Ksize
82 DO j=1,sNy
83 DO i=1,sNx
84 fldtave(i,j,k,bi,bj) = fldtave(i,j,k,bi,bj) + deltaTloc*
85 & 0.5*( fld1(i,j-1,k,bi,bj) + fld1(i,j,k,bi,bj) )
86 & *fld2(i,j,k,bi,bj)*fld3(i,j,k,bi,bj)
87 ENDDO
88 ENDDO
89 ENDDO
90 C ENDDO
91 C ENDDO
92
93 ENDIF
94
95 RETURN
96 END

  ViewVC Help
Powered by ViewVC 1.1.22