/[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.24 - (hide annotations) (download)
Wed Apr 9 22:16:09 2008 UTC (16 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.23: +6 -6 lines
move myThid to last position in argument list of S/R TRACER_MEANAREA

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

  ViewVC Help
Powered by ViewVC 1.1.22