1 |
stephd |
1.6 |
C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.5 2004/07/13 18:04:42 jmc Exp $ |
2 |
jmc |
1.5 |
C $Name: $ |
3 |
|
|
|
4 |
stephd |
1.1 |
#include "CPP_OPTIONS.h" |
5 |
|
|
#include "PTRACERS_OPTIONS.h" |
6 |
|
|
#include "GCHEM_OPTIONS.h" |
7 |
|
|
|
8 |
stephd |
1.4 |
CBOP |
9 |
stephd |
1.1 |
C !INTERFACE: ========================================================== |
10 |
|
|
SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid ) |
11 |
|
|
|
12 |
stephd |
1.4 |
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 |
stephd |
1.1 |
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 |
jmc |
1.5 |
#include "PTRACERS_SIZE.h" |
26 |
stephd |
1.1 |
#include "PTRACERS.h" |
27 |
|
|
#endif |
28 |
stephd |
1.6 |
#ifdef ALLOW_DIC |
29 |
stephd |
1.1 |
#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 |
stephd |
1.4 |
|
38 |
stephd |
1.6 |
c!LOCAL VARIABLES: ==================================================== |
39 |
stephd |
1.4 |
C i,j :: loop indices |
40 |
|
|
C bi,bj :: tile indices |
41 |
|
|
C k :: vertical level |
42 |
stephd |
1.1 |
INTEGER bi,bj,imin,imax,jmin,jmax |
43 |
|
|
INTEGER i,j |
44 |
|
|
INTEGER niter |
45 |
stephd |
1.4 |
CEOP |
46 |
stephd |
1.1 |
|
47 |
|
|
#ifdef ALLOW_PTRACERS |
48 |
|
|
#ifdef ALLOW_GCHEM |
49 |
|
|
|
50 |
stephd |
1.3 |
_BARRIER |
51 |
|
|
_BEGIN_MASTER( mythid ) |
52 |
stephd |
1.1 |
|
53 |
|
|
ccccccccccccccccccccccccc |
54 |
|
|
c global calculations c |
55 |
|
|
ccccccccccccccccccccccccc |
56 |
|
|
#ifdef DIC_BIOTIC |
57 |
|
|
c find global surface averages |
58 |
stephd |
1.3 |
gsm_s = 0. |
59 |
|
|
gsm_dic = 0. |
60 |
|
|
gsm_alk = 0. |
61 |
stephd |
1.1 |
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 |
stephd |
1.3 |
C$taf loop = parallel |
78 |
stephd |
1.1 |
DO bj=myByLo(myThid),myByHi(myThid) |
79 |
stephd |
1.3 |
C$taf loop = parallel |
80 |
stephd |
1.1 |
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 |
stephd |
1.2 |
|
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 |
stephd |
1.1 |
c |
117 |
|
|
ENDDO |
118 |
|
|
ENDDO |
119 |
|
|
|
120 |
|
|
#endif /* ALLOW_GCHEM */ |
121 |
|
|
#endif /* ALLOW_PTRACERS */ |
122 |
|
|
|
123 |
|
|
RETURN |
124 |
|
|
END |