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

Annotation of /MITgcm_contrib/darwin/pkg/gchem/gchem_add_tendency.F

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


Revision 1.2 - (hide annotations) (download)
Tue Feb 26 17:13:11 2008 UTC (17 years, 4 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin_ckpt59n_20080424
Changes since 1.1: +5 -4 lines
upgrade to MITgcm checkpoint59n

1 jahn 1.2 C $Header: /u/gcmpack/MITgcm_contrib/darwin/pkg/gchem/gchem_add_tendency.F,v 1.1 2008/01/11 21:28:01 jahn Exp $
2 jahn 1.1 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 jahn 1.2 C In the case of GCHEM_SEPARATE_FORCING undefined, GCHEM_ADD_TENDENCY
15 jahn 1.1 C will update passive tracer tendencies gPtr with gchemTendency,
16     C the latter having been computed in GCHEM_CALC_TENDENDY, so that
17 jahn 1.2 C they will be incorporated into regular timestepping in
18 jahn 1.1 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 jahn 1.2 c#include "PTRACERS_PARAMS.h"
30     #include "PTRACERS_FIELDS.h"
31 jahn 1.1 #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