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

Annotation of /MITgcm/pkg/gchem/gchem_forcing_sep.F

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


Revision 1.15 - (hide annotations) (download)
Tue May 1 21:45:52 2007 UTC (17 years, 1 month ago) by stephd
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59d, checkpoint59f, checkpoint59c, checkpoint59b
Changes since 1.14: +10 -1 lines
o set up so that pkg/dic can be run with only 4 tracers (ie. excluding O2),
  for better efficiency, particularly to be compatible with IGSM runs

1 stephd 1.15 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.14 2006/08/09 01:25:40 jmc Exp $
2 jmc 1.5 C $Name: $
3    
4 stephd 1.1 #include "GCHEM_OPTIONS.h"
5    
6 stephd 1.4 CBOP
7 mlosch 1.9 C !ROUTINE: GCHEM_FORCING_SEP
8 stephd 1.1 C !INTERFACE: ==========================================================
9     SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid )
10    
11 stephd 1.4 C !DESCRIPTION:
12 mlosch 1.9 C calls subroutine that will update passive tracers values
13     C with a separate timestep. Since GCHEM_FORCING_SEP is now
14     C called before DO_FIELDS_BLOCKING_EXCHANGES, the passive
15     C tracer values in the halo regions are not up to date and
16     C must not be used.
17 stephd 1.4
18     C !USES: ===============================================================
19 stephd 1.1 IMPLICIT NONE
20     #include "SIZE.h"
21     #include "GRID.h"
22     #include "DYNVARS.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25 jmc 1.5 #include "PTRACERS_SIZE.h"
26 stephd 1.1 #include "PTRACERS.h"
27 stephd 1.6 #ifdef ALLOW_DIC
28 stephd 1.1 #include "DIC_BIOTIC.h"
29     #include "DIC_ABIOTIC.h"
30 mlosch 1.9 #endif /* ALLOW_DIC */
31 stephd 1.1
32     C !INPUT PARAMETERS: ===================================================
33     C myThid :: thread number
34     INTEGER myThid, myIter
35     _RL myTime
36 stephd 1.4
37 stephd 1.6 c!LOCAL VARIABLES: ====================================================
38 stephd 1.4 C i,j :: loop indices
39     C bi,bj :: tile indices
40     C k :: vertical level
41 stephd 1.1 INTEGER bi,bj,imin,imax,jmin,jmax
42     INTEGER i,j
43     INTEGER niter
44 stephd 1.4 CEOP
45 stephd 1.1
46     #ifdef ALLOW_GCHEM
47 mlosch 1.10 #ifdef GCHEM_SEPARATE_FORCING
48 stephd 1.1
49     ccccccccccccccccccccccccc
50     c global calculations c
51     ccccccccccccccccccccccccc
52 stephd 1.11 #ifdef ALLOW_DIC
53 stephd 1.1 c find global surface averages
54 stephd 1.3 gsm_s = 0.
55     gsm_dic = 0.
56     gsm_alk = 0.
57 stephd 1.1 call tracer_meanarea(myThid,salt, 1,gsm_s)
58     call tracer_meanarea(myThid,
59     & ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)
60     print*,'mean surface dic', gsm_dic,gsm_s
61     call tracer_meanarea(myThid,
62     & ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)
63     #endif
64     ccccccccccccccccccccccccccccccccccccccccccc
65    
66    
67     ccccccccccccccccccccccccc
68     c chemical forcing c
69     ccccccccccccccccccccccccc
70 stephd 1.3 C$taf loop = parallel
71 stephd 1.1 DO bj=myByLo(myThid),myByHi(myThid)
72 stephd 1.3 C$taf loop = parallel
73 stephd 1.1 DO bi=myBxLo(myThid),myBxHi(myThid)
74    
75 stephd 1.13 jMin=1
76     jMax=sNy
77     iMin=1
78     iMax=sNx
79 stephd 1.1 c
80     ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
81     c
82 stephd 1.11 #ifdef ALLOW_DIC
83 stephd 1.1 #ifdef ALLOW_FE
84     call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
85     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
86     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
87     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
88     & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
89     & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
90     & bi,bj,imin,imax,jmin,jmax,
91     & myIter,myTime,myThid)
92     #else
93 stephd 1.15 #ifdef ALLOW_O2
94 stephd 1.1 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
95     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
96     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
97     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
98     & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
99     & bi,bj,imin,imax,jmin,jmax,
100     & myIter,myTime,myThid)
101 stephd 1.15 #else
102     call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
103     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
104     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
105     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
106     & bi,bj,imin,imax,jmin,jmax,
107     & myIter,myTime,myThid)
108     #endif
109 stephd 1.1 #endif
110     #endif
111     cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
112 stephd 1.2
113 stephd 1.1 c
114     ENDDO
115     ENDDO
116    
117 mlosch 1.10 #endif /* GCHEM_SEPARATE_FORCING */
118 stephd 1.1 #endif /* ALLOW_GCHEM */
119    
120     RETURN
121     END

  ViewVC Help
Powered by ViewVC 1.1.22