/[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.3 - (show annotations) (download)
Mon Nov 5 18:58:00 2007 UTC (16 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63a, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.2: +38 -36 lines
split PTRACERS.h in 2 header files: PTRACERS_FIELDS.h & PTRACERS_PARAMS
 declare Namelist in matrix_readparms.F (was previously in MATRIX.h)

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

  ViewVC Help
Powered by ViewVC 1.1.22