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

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

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


Revision 1.5 - (show annotations) (download)
Tue Jul 13 18:04:42 2004 UTC (19 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint54d_post, checkpoint54c_post
Changes since 1.4: +4 -0 lines
max number of passive tracers is now defined in PTRACERS_SIZE.h

1 C $Header: $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5 #include "PTRACERS_OPTIONS.h"
6 #include "GCHEM_OPTIONS.h"
7
8 CBOP
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid )
11
12 C !DESCRIPTION:
13 C calls subroutine that will update tracers values.
14 C this will be in a secondary timestep after that used for
15 C advection and diffusion in ptracers_intergrate.F
16
17 C !USES: ===============================================================
18 IMPLICIT NONE
19 #include "SIZE.h"
20 #include "GRID.h"
21 #include "DYNVARS.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #ifdef ALLOW_PTRACERS
25 #include "PTRACERS_SIZE.h"
26 #include "PTRACERS.h"
27 #endif
28 #ifdef DIC_BIOTIC
29 #include "DIC_BIOTIC.h"
30 #include "DIC_ABIOTIC.h"
31 #endif
32
33 C !INPUT PARAMETERS: ===================================================
34 C myThid :: thread number
35 INTEGER myThid, myIter
36 _RL myTime
37
38 !LOCAL VARIABLES: ====================================================
39 C i,j :: loop indices
40 C bi,bj :: tile indices
41 C k :: vertical level
42 INTEGER bi,bj,imin,imax,jmin,jmax
43 INTEGER i,j
44 INTEGER niter
45 CEOP
46
47 #ifdef ALLOW_PTRACERS
48 #ifdef ALLOW_GCHEM
49
50 _BARRIER
51 _BEGIN_MASTER( mythid )
52
53 ccccccccccccccccccccccccc
54 c global calculations c
55 ccccccccccccccccccccccccc
56 #ifdef DIC_BIOTIC
57 c find global surface averages
58 gsm_s = 0.
59 gsm_dic = 0.
60 gsm_alk = 0.
61 call tracer_meanarea(myThid,salt, 1,gsm_s)
62 call tracer_meanarea(myThid,
63 & ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)
64 print*,'mean surface dic', gsm_dic,gsm_s
65 call tracer_meanarea(myThid,
66 & ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)
67 #endif
68 ccccccccccccccccccccccccccccccccccccccccccc
69
70 _END_MASTER( mythid )
71 _BARRIER
72
73
74 ccccccccccccccccccccccccc
75 c chemical forcing c
76 ccccccccccccccccccccccccc
77 C$taf loop = parallel
78 DO bj=myByLo(myThid),myByHi(myThid)
79 C$taf loop = parallel
80 DO bi=myBxLo(myThid),myBxHi(myThid)
81
82 jMin=1-OLy
83 jMax=sNy+OLy
84 iMin=1-OLx
85 iMax=sNx+OLx
86 c
87 ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
88 c
89 #ifdef DIC_BIOTIC
90 #ifdef ALLOW_FE
91 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
92 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
93 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
94 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
95 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
96 & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
97 & bi,bj,imin,imax,jmin,jmax,
98 & myIter,myTime,myThid)
99 #else
100 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
101 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
102 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
103 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
104 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
105 & bi,bj,imin,imax,jmin,jmax,
106 & myIter,myTime,myThid)
107 #endif
108 #endif
109 cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
110
111 #ifdef PTRACERS_SEPARATE_FORCING
112 C time averaging directly, here otherwise in the_correction_step
113 CALL PTRACERS_STATVARS(myTime, myIter, bi, bj, myThid)
114 #endif /* PTRACERS_SEPARATE_FORCING */
115
116 c
117 ENDDO
118 ENDDO
119
120 #endif /* ALLOW_GCHEM */
121 #endif /* ALLOW_PTRACERS */
122
123 RETURN
124 END

  ViewVC Help
Powered by ViewVC 1.1.22