/[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.4 - (show annotations) (download)
Wed Jan 28 18:49:05 2004 UTC (20 years, 4 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint54a_post, checkpoint53c_post, checkpoint52l_post, checkpoint52k_post, checkpoint54b_post, checkpoint53b_pre, checkpoint52m_post, checkpoint53a_post, checkpoint54, checkpoint53b_post, checkpoint53, checkpoint53g_post, hrcube5, checkpoint52j_pre, checkpoint53f_post, checkpoint53d_pre, hrcube_3
Changes since 1.3: +13 -0 lines
o  cleaning up headers, additional documentation

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

  ViewVC Help
Powered by ViewVC 1.1.22