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

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

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


Revision 1.3 - (hide annotations) (download)
Fri Dec 5 02:27:59 2003 UTC (20 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint56b_post, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint57d_post, checkpoint57i_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52f_post, checkpoint57n_post, checkpoint54f_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint55c_post, checkpoint52e_pre, checkpoint57f_post, checkpoint52e_post, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint54b_post, checkpoint57h_post, checkpoint52m_post, checkpoint55g_post, checkpoint57c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, eckpoint57e_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint57j_post, checkpoint57f_pre, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint57o_post, checkpoint57k_post, checkpoint53b_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post
Branch point for: netcdf-sm0
Changes since 1.2: +2 -2 lines
includes only "CPP_EEOPTIONS.h" (instead of TIMEAVE_OPTIONS.h) in basic
 S/R that only contains few header files (namely SIZE.h & EEPARAMS.h)

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/timeave/timeave_cumul_2vfc.F,v 1.2 2003/10/09 04:19:20 edhill Exp $
2 jmc 1.1 C $Name: $
3 jmc 1.3 #include "CPP_EEOPTIONS.h"
4 jmc 1.1
5     CStartofinterface
6     SUBROUTINE TIMEAVE_CUMUL_2VFC(
7     O fldtave,
8     I fld1, fld2, fld3, Ksize, dir, deltaT,
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 deltaT
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) + deltaT*
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) + deltaT*
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) + deltaT*
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