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