/[MITgcm]/MITgcm/pkg/matrix/matrix_store_tendency.F
ViewVC logotype

Contents of /MITgcm/pkg/matrix/matrix_store_tendency.F

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


Revision 1.2 - (show annotations) (download)
Tue Apr 19 18:44:50 2005 UTC (19 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59i, checkpoint59h, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post
Changes since 1.1: +16 -14 lines
 o lots of small changes to "matrix" things including:
   - lines over 72 characters in length
   - fixups for testreport

1 C $Header: /u/gcmpack/MITgcm/pkg/matrix/matrix_store_tendency.F,v 1.1 2005/04/18 19:42:16 spk Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 C !ROUTINE MATRIX_STORE_TENDENCY_EXP
8 C This routine accumalates the explicit tendency matrix. Note that
9 C on entry gPtr is the tracer field after explicit advection-
10 C diffusion. On exit, gPtr is set to the initial tracer field for
11 C the next step (implicit matrix calculation).
12
13 SUBROUTINE MATRIX_STORE_TENDENCY_EXP(
14 & bi, bj, myTime, myIter, myThid )
15
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PTRACERS_SIZE.h"
20 #include "PTRACERS.h"
21 #include "MATRIX.h"
22 #include "PARAMS.h"
23
24 INTEGER bi, bj
25 _RL myTime
26 INTEGER myIter
27 INTEGER myThid
28
29 #ifdef ALLOW_MATRIX
30
31 INTEGER i,j,k
32 INTEGER iTracer
33
34 DO iTracer=1,PTRACERS_numInUse
35 DO k=1,Nr
36 DO j=1-Oly, sNy+Oly
37 DO i=1-Olx, sNx+Olx
38 MATRIX(i,j,k,bi,bj,iTracer,1) =
39 & MATRIX(i,j,k,bi,bj,iTracer,1)
40 & + (gPtr(i,j,k,bi,bj,iTracer)
41 & - PTRACERS_initial(i,j,k,bi,bj,iTracer))
42 gPtr(i,j,k,bi,bj,iTracer)=
43 & PTRACERS_initial(i,j,k,bi,bj,iTracer)
44 ENDDO
45 ENDDO
46 ENDDO
47 ENDDO
48
49 expMatrixCounter = expMatrixCounter + 1
50
51 #endif /* ALLOW_MATRIX */
52 RETURN
53 END
54
55 C !ROUTINE MATRIX_STORE_TENDENCY_IMP
56 C This routine accumalates the implicit update matrix. Note that on
57 C entry PTR is the tracer field after implicit advection-
58 C diffusion. On exit, PTR is set to the initial tracer field.
59
60 SUBROUTINE MATRIX_STORE_TENDENCY_IMP(
61 & bi, bj, myTime, myIter, myThid )
62
63 IMPLICIT NONE
64 #include "SIZE.h"
65 #include "EEPARAMS.h"
66 #include "PTRACERS_SIZE.h"
67 #include "PTRACERS.h"
68 #include "MATRIX.h"
69 #include "PARAMS.h"
70
71 INTEGER bi, bj
72 _RL myTime
73 INTEGER myIter
74 INTEGER myThid
75
76 #ifdef ALLOW_MATRIX
77
78 INTEGER i,j,k
79 INTEGER iTracer
80
81 DO iTracer=1,PTRACERS_numInUse
82 DO k=1,Nr
83 DO j=1-Oly, sNy+Oly
84 DO i=1-Olx, sNx+Olx
85 MATRIX(i,j,k,bi,bj,iTracer,2) =
86 & MATRIX(i,j,k,bi,bj,iTracer,2)
87 & + pTracer(i,j,k,bi,bj,iTracer)
88 pTracer(i,j,k,bi,bj,iTracer)=
89 & PTRACERS_initial(i,j,k,bi,bj,iTracer)
90 ENDDO
91 ENDDO
92 ENDDO
93 ENDDO
94
95 impMatrixCounter = impMatrixCounter + 1
96
97 #endif /* ALLOW_MATRIX */
98 RETURN
99 END
100

  ViewVC Help
Powered by ViewVC 1.1.22