/[MITgcm]/MITgcm/pkg/gchem/gchem_add_tendency.F
ViewVC logotype

Contents of /MITgcm/pkg/gchem/gchem_add_tendency.F

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


Revision 1.3 - (show annotations) (download)
Mon Nov 5 19:05:01 2007 UTC (16 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, 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: +5 -4 lines
split PTRACERS.h in 2 header files: PTRACERS_FIELDS.h & PTRACERS_PARAMS.h

1 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_add_tendency.F,v 1.2 2004/11/29 03:34:55 mlosch Exp $
2 C $Name: $
3
4 #include "GCHEM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GCHEM_ADD_TENDENCY
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GCHEM_ADD_TENDENCY(bi,bj,iMin,iMax,jMin,jMax,k,
11 & iTracer, myTime,myIter, myThid )
12
13 C !DESCRIPTION:
14 C In the case of GCHEM_SEPARATE_FORCING undefined, GCHEM_ADD_TENDENCY
15 C will update passive tracer tendencies gPtr with gchemTendency,
16 C the latter having been computed in GCHEM_CALC_TENDENDY, so that
17 C they will be incorporated into regular timestepping in
18 C PTRACERS_INTERGRATE.
19 C IF GCHEM_SEPARATE_FORCING is defined, this routine is empty.
20
21 C !USES: ===============================================================
22 IMPLICIT NONE
23 #include "SIZE.h"
24 #include "GRID.h"
25 #include "DYNVARS.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "PTRACERS_SIZE.h"
29 c#include "PTRACERS_PARAMS.h"
30 #include "PTRACERS_FIELDS.h"
31 #include "GCHEM_FIELDS.h"
32
33 C !INPUT PARAMETERS: ===================================================
34 C myThid :: thread number
35 C myIter :: current timestep
36 C myTime :: current time
37 C iTracer :: ptracer number
38 C bi,bj :: tile indices
39 C k :: vertical level
40 INTEGER myThid, myIter
41 _RL myTime
42 INTEGER iTracer
43 INTEGER bi,bj,imin,imax,jmin,jmax,k
44
45 C !LOCAL VARIABLES: ====================================================
46 C i,j :: loop indices
47 INTEGER i,j
48 INTEGER niter
49 CEOP
50
51 #ifdef ALLOW_GCHEM
52 # ifndef GCHEM_SEPARATE_FORCING
53 C apply the tendencies computed in GCHEM_CALC_TENDENCY to the passive
54 C tracers tendendy terms. The part of the code could also go into
55 C ptracers_forcing and replace the call to gchem_add_tendency there,
56 C but this way, no gchem-related header files and CPP-flags are required
57 C within ptracers_forcing.
58 DO j=jMin,jMax
59 DO i=iMin,iMax
60 gPtr(I,J,K,bi,bj,iTracer) = gPtr(I,J,K,bi,bj,iTracer)
61 & + gchemTendency(I,J,K,bi,bj,iTracer)
62 ENDDO
63 ENDDO
64 # endif /* GCHEM_SEPARATE_FORCING */
65 #endif /* ALLOW_GCHEM */
66
67 RETURN
68 END

  ViewVC Help
Powered by ViewVC 1.1.22