/[MITgcm]/MITgcm/pkg/gchem/gchem_forcing_sep.F
ViewVC logotype

Annotation of /MITgcm/pkg/gchem/gchem_forcing_sep.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (hide annotations) (download)
Fri Nov 19 20:17:48 2004 UTC (19 years, 6 months ago) by mlosch
Branch: MAIN
Changes since 1.7: +1 -3 lines
o cleaning up a little:
  - add a few header lines
  - remove redundant CPP options header files
  - change comments

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

  ViewVC Help
Powered by ViewVC 1.1.22