/[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.22 - (show annotations) (download)
Fri Apr 4 21:43:18 2008 UTC (16 years, 1 month ago) by dfer
Branch: MAIN
Changes since 1.21: +2 -3 lines
Merging DIC_ABIOTIC.h and DIC_BIOTIC.h

1 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.21 2008/01/18 01:06:29 dfer Exp $
2 C $Name: $
3
4 #include "GCHEM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GCHEM_FORCING_SEP
8 C !INTERFACE: ==========================================================
9 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
20 #include "SIZE.h"
21 #include "GRID.h"
22 #include "DYNVARS.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "PTRACERS_SIZE.h"
26 c#include "PTRACERS_PARAMS.h"
27 #include "PTRACERS_FIELDS.h"
28 #ifdef ALLOW_DIC
29 #include "DIC_VARS.h"
30 #endif /* ALLOW_DIC */
31
32 C !INPUT PARAMETERS: ===================================================
33 C myThid :: thread number
34 INTEGER myThid, myIter
35 _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
42 INTEGER i,j
43 INTEGER niter
44 CEOP
45
46 #ifdef ALLOW_GCHEM
47 #ifdef GCHEM_SEPARATE_FORCING
48
49 ccccccccccccccccccccccccc
50 c global calculations c
51 ccccccccccccccccccccccccc
52 #ifdef ALLOW_DIC
53 #ifdef ALLOW_OLD_VIRTUALFLUX
54 c find global surface averages
55 gsm_s = 0. _d 0
56 gsm_dic = 0. _d 0
57 gsm_alk = 0. _d 0
58 call tracer_meanarea(myThid,salt, 1,gsm_s)
59 call tracer_meanarea(myThid,
60 & ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)
61 print*,'mean surface dic', gsm_dic,gsm_s
62 call tracer_meanarea(myThid,
63 & ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)
64 #endif /* ALLOW_OLD_VIRTUALFLUX */
65 #endif
66 ccccccccccccccccccccccccccccccccccccccccccc
67
68
69 ccccccccccccccccccccccccc
70 c chemical forcing c
71 ccccccccccccccccccccccccc
72 C$taf loop = parallel
73 DO bj=myByLo(myThid),myByHi(myThid)
74 C$taf loop = parallel
75 DO bi=myBxLo(myThid),myBxHi(myThid)
76
77 jMin=1
78 jMax=sNy
79 iMin=1
80 iMax=sNx
81 c
82 ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
83 c
84 #ifdef ALLOW_DIC
85 #ifdef ALLOW_FE
86 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
87 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
88 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
89 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
90 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
91 & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
92 & bi,bj,imin,imax,jmin,jmax,
93 & myIter,myTime,myThid)
94 #else
95 #ifdef ALLOW_O2
96 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
97 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
98 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
99 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
100 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
101 & bi,bj,imin,imax,jmin,jmax,
102 & myIter,myTime,myThid)
103 #else
104 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
105 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
106 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
107 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
108 & bi,bj,imin,imax,jmin,jmax,
109 & myIter,myTime,myThid)
110 #endif
111 #endif
112
113 #endif
114 cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
115
116 c
117 ENDDO
118 ENDDO
119
120 #ifdef ALLOW_DIC
121 CALL DIC_ATMOS( 1, myTime, myIter, myThid )
122 #endif
123
124 #endif /* GCHEM_SEPARATE_FORCING */
125 #endif /* ALLOW_GCHEM */
126
127 RETURN
128 END

  ViewVC Help
Powered by ViewVC 1.1.22