1 |
C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.23 2008/04/07 20:19:47 dfer Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "GCHEM_OPTIONS.h" |
5 |
#ifdef ALLOW_DIC |
6 |
#include "DIC_OPTIONS.h" |
7 |
#endif |
8 |
|
9 |
CBOP |
10 |
C !ROUTINE: GCHEM_FORCING_SEP |
11 |
C !INTERFACE: ========================================================== |
12 |
SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid ) |
13 |
|
14 |
C !DESCRIPTION: |
15 |
C calls subroutine that will update passive tracers values |
16 |
C with a separate timestep. Since GCHEM_FORCING_SEP is now |
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 |
C must not be used. |
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 |
#include "PTRACERS_FIELDS.h" |
30 |
#ifdef ALLOW_DIC |
31 |
#include "DIC_VARS.h" |
32 |
#endif /* ALLOW_DIC */ |
33 |
|
34 |
C !INPUT PARAMETERS: =================================================== |
35 |
C myThid :: thread number |
36 |
INTEGER myThid, myIter |
37 |
_RL myTime |
38 |
|
39 |
c!LOCAL VARIABLES: ==================================================== |
40 |
C i,j :: loop indices |
41 |
C bi,bj :: tile indices |
42 |
C k :: vertical level |
43 |
INTEGER bi,bj,imin,imax,jmin,jmax |
44 |
INTEGER i,j |
45 |
INTEGER niter |
46 |
CEOP |
47 |
|
48 |
#ifdef ALLOW_GCHEM |
49 |
#ifdef GCHEM_SEPARATE_FORCING |
50 |
|
51 |
ccccccccccccccccccccccccc |
52 |
c global calculations c |
53 |
ccccccccccccccccccccccccc |
54 |
#ifdef ALLOW_DIC |
55 |
#ifdef ALLOW_OLD_VIRTUALFLUX |
56 |
c find global surface averages |
57 |
gsm_s = 0. _d 0 |
58 |
gsm_dic = 0. _d 0 |
59 |
gsm_alk = 0. _d 0 |
60 |
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 |
print*,'mean surface dic', gsm_dic,gsm_s |
64 |
call tracer_meanarea( |
65 |
& ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk, myThid ) |
66 |
#endif /* ALLOW_OLD_VIRTUALFLUX */ |
67 |
#endif |
68 |
ccccccccccccccccccccccccccccccccccccccccccc |
69 |
|
70 |
|
71 |
ccccccccccccccccccccccccc |
72 |
c chemical forcing c |
73 |
ccccccccccccccccccccccccc |
74 |
C$taf loop = parallel |
75 |
DO bj=myByLo(myThid),myByHi(myThid) |
76 |
C$taf loop = parallel |
77 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
78 |
|
79 |
jMin=1 |
80 |
jMax=sNy |
81 |
iMin=1 |
82 |
iMax=sNx |
83 |
c |
84 |
ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc |
85 |
|
86 |
#ifdef ALLOW_DIC |
87 |
#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 |
#ifdef ALLOW_O2 |
98 |
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 |
#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 |
#endif |
114 |
|
115 |
#endif |
116 |
cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc |
117 |
|
118 |
ENDDO |
119 |
ENDDO |
120 |
|
121 |
#ifdef ALLOW_DIC |
122 |
CALL DIC_ATMOS( 1, myTime, myIter, myThid ) |
123 |
#endif |
124 |
|
125 |
#endif /* GCHEM_SEPARATE_FORCING */ |
126 |
#endif /* ALLOW_GCHEM */ |
127 |
|
128 |
RETURN |
129 |
END |