/[MITgcm]/MITgcm/diags/src/timeaver_2fld_xyz.F
ViewVC logotype

Contents of /MITgcm/diags/src/timeaver_2fld_xyz.F

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


Revision 1.6 - (show annotations) (download)
Thu Feb 15 19:01:39 2001 UTC (23 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, ecco_c44_e18, checkpoint47j_post, ecco_c44_e16, checkpoint40pre1, checkpoint36, checkpoint48d_pre, checkpoint44b_post, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint43a-release1mods, checkpoint44h_pre, checkpoint47i_post, ecco_c44_e19, checkpoint52e_pre, release1_p12, release1_p13, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, ecco_c44_e17, pre38tag1, checkpoint47f_post, checkpoint40pre9, checkpoint47c_post, checkpoint50e_post, checkpoint52e_post, checkpoint50c_post, checkpoint46i_post, checkpoint51n_pre, checkpoint47d_post, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, ecco_c44_e25, icebear5, icebear4, checkpoint44f_pre, checkpoint47a_post, icebear3, icebear2, checkpoint46f_post, checkpoint52d_pre, ecco_c50_e33a, checkpoint46d_pre, release1_p13_pre, checkpoint48e_post, checkpoint46e_post, checkpoint48d_post, checkpoint50g_post, release1-branch_tutorials, checkpoint46c_post, checkpoint44g_post, branchpoint-genmake2, checkpoint44h_post, release1_p12_pre, checkpoint44e_post, checkpoint46k_post, ecco-branch-mod1, checkpoint46e_pre, ecco-branch-mod4, ecco-branch-mod5, branch-netcdf, checkpoint48f_post, checkpoint45d_post, checkpoint51r_post, checkpoint52b_pre, checkpoint46l_post, checkpoint51o_pre, checkpoint46j_pre, checkpoint45b_post, checkpoint46b_pre, checkpoint51i_post, checkpoint46j_post, checkpoint48c_post, chkpt44a_pre, release1-branch-end, c37_adj, release1_final_v1, checkpoint51e_post, checkpoint51b_post, checkpoint46, ecco_c50_e28, checkpoint51l_pre, checkpoint51c_post, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, checkpoint47d_pre, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint44f_post, checkpoint47b_post, checkpoint40pre2, checkpoint40pre5, checkpoint51l_post, checkpoint40pre6, checkpoint48i_post, checkpoint51o_post, checkpoint40pre8, checkpoint46l_pre, checkpoint51f_pre, release1_b1, checkpoint48h_post, checkpoint51q_post, checkpoint50d_pre, ecco_c51_e34, chkpt44d_post, ecco_c50_e29, checkpoint42, release1_p9, checkpoint46h_pre, checkpoint51, checkpoint50, checkpoint47h_post, checkpoint52, release1_p8, checkpoint50d_post, checkpoint52d_post, checkpoint46g_pre, release1_p2, release1_p3, release1_p4, checkpoint51b_pre, release1_p6, checkpoint52a_post, checkpoint46a_post, checkpoint47g_post, checkpoint52b_post, chkpt44a_post, checkpoint52f_post, checkpoint44b_pre, checkpoint52c_post, release1_p1, checkpoint46m_post, checkpoint48a_post, checkpoint40pre4, checkpoint51h_pre, checkpoint46a_pre, ecco_c51_e34e, checkpoint40pre3, checkpoint50c_pre, checkpoint45c_post, checkpoint50b_pre, release1_p5, checkpoint44e_pre, checkpoint51g_post, ecco_c52_e35, release1_p7, ecco_ice2, ecco_ice1, checkpoint46b_post, checkpoint51f_post, pre38-close, checkpoint46d_post, ecco-branch-mod2, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, checkpoint45a_post, ecco_c51_e34d, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint50f_post, checkpoint50a_post, checkpoint46c_pre, checkpoint50f_pre, checkpoint52a_pre, ecco-branch-mod3, checkpoint43, checkpoint51d_post, checkpoint37, checkpoint40, checkpoint48c_pre, release1-branch_branchpoint, ecco_c44_e22, release1_beta1, ecco_c44_e23, checkpoint51m_post, checkpoint51t_post, ecco_c44_e20, checkpoint40pre7, checkpoint50h_post, checkpoint52i_post, checkpoint51a_post, checkpoint39, checkpoint46h_post, checkpoint50e_pre, checkpoint38, checkpoint50i_post, checkpoint51p_post, checkpoint51n_post, release1_chkpt44d_post, checkpoint48g_post, checkpoint51i_pre, chkpt44c_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, checkpoint41, checkpoint51s_post, chkpt44c_post
Branch point for: c24_e25_ice, netcdf-sm0, ecco-branch, release1_final, branch-genmake2, pre38, release1, branch-exfmods-curt, release1_coupled, branch-nonh, icebear, tg2-branch, checkpoint51n_branch, release1-branch, release1_50yr
Changes since 1.5: +3 -3 lines
include CPP_OPTIONS.h instead of only CPP_EEOPTIONS

1 C $Header: /u/gcmpack/models/MITgcmUV/diags/src/timeaver_2fld_xyz.F,v 1.5 2001/02/04 14:38:41 cnh Exp $
2 C $Name: checkpoint35 $
3 #include "CPP_OPTIONS.h"
4
5 CStartofinterface
6 SUBROUTINE TIMEAVER_2FLD_XYZ( fld1, fld2, fldtave, dir, deltaT,
7 I bi, bj, K, myThid )
8 C /==========================================================\
9 C | SUBROUTINE TIMEAVER_2FLD_XYZ |
10 C | o Sum over time a product of two arrays depending on the |
11 C | type of the second array (tracer_grid, u_grid, v_grid) |
12 C | The first array must be on tracer_grid |
13 C \==========================================================/
14 IMPLICIT NONE
15
16 C == Global variables ===
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "AVER.h"
20
21 C == Routine arguments ==
22 C myThid - Thread number for this instance of the routine.
23 C dir - type of grid for 2nd array (0: tracer, 1: zonal, 2 merid)
24 C fld - Input Field
25 C fldtave - time averaged Field
26 _RL fld1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
27 _RL fld2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
28 _RL fldtave(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29 INTEGER dir
30 _RL deltaT
31 INTEGER bi, bj, K, myThid
32
33 CEndofinterface
34
35 C == Local variables ==
36 C i,j,k,bi,bj - Loop counters
37 INTEGER i, j
38
39 IF ( dir.eq.0 ) THEN
40
41 C DO bj = myByLo(myThid), myByHi(myThid)
42 C DO bi = myBxLo(myThid), myBxHi(myThid)
43 C DO k=1,Nr
44 DO j=1,sNy
45 DO i=1,sNx
46 fldtave(i,j,k,bi,bj)= fldtave(i,j,k,bi,bj)
47 & + fld1(i,j,k,bi,bj)*fld2(i,j,k,bi,bj)*deltaT
48 ENDDO
49 ENDDO
50 C ENDDO
51 C ENDDO
52 C ENDDO
53
54 ELSEIF ( dir.eq.1 ) THEN
55
56 C DO bj = myByLo(myThid), myByHi(myThid)
57 C DO bi = myBxLo(myThid), myBxHi(myThid)
58 C DO k=1,Nr
59 DO j=1,sNy
60 DO i=1,sNx
61 fldtave(i,j,k,bi,bj)= fldtave(i,j,k,bi,bj)
62 & + .5 * ( fld1(i-1,j,k,bi,bj) + fld1(i,j,k,bi,bj) )
63 & * fld2(i,j,k,bi,bj)
64 & * deltaT
65 ENDDO
66 ENDDO
67 C ENDDO
68 C ENDDO
69 C ENDDO
70
71 ELSEIF ( dir.eq.2 ) THEN
72
73 C DO bj = myByLo(myThid), myByHi(myThid)
74 C DO bi = myBxLo(myThid), myBxHi(myThid)
75 C DO k=1,Nr
76 DO j=1,sNy
77 DO i=1,sNx
78 fldtave(i,j,k,bi,bj)= fldtave(i,j,k,bi,bj)
79 & + .5 * ( fld1(i,j-1,k,bi,bj) + fld1(i,j,k,bi,bj) )
80 & * fld2(i,j,k,bi,bj)
81 & * deltaT
82 ENDDO
83 ENDDO
84 C ENDDO
85 C ENDDO
86 C ENDDO
87
88 ENDIF
89
90 RETURN
91 END

  ViewVC Help
Powered by ViewVC 1.1.22