/[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.17 - (hide annotations) (download)
Mon Nov 5 19:05:01 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.16: +5 -4 lines
split PTRACERS.h in 2 header files: PTRACERS_FIELDS.h & PTRACERS_PARAMS.h

1 jmc 1.17 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.16 2007/08/27 19:45:09 dfer Exp $
2 jmc 1.5 C $Name: $
3    
4 stephd 1.1 #include "GCHEM_OPTIONS.h"
5    
6 stephd 1.4 CBOP
7 mlosch 1.9 C !ROUTINE: GCHEM_FORCING_SEP
8 stephd 1.1 C !INTERFACE: ==========================================================
9     SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid )
10    
11 stephd 1.4 C !DESCRIPTION:
12 mlosch 1.9 C calls subroutine that will update passive tracers values
13     C with a separate timestep. Since GCHEM_FORCING_SEP is now
14 jmc 1.17 C called before DO_FIELDS_BLOCKING_EXCHANGES, the passive
15     C tracer values in the halo regions are not up to date and
16 mlosch 1.9 C must not be used.
17 stephd 1.4
18     C !USES: ===============================================================
19 stephd 1.1 IMPLICIT NONE
20     #include "SIZE.h"
21     #include "GRID.h"
22     #include "DYNVARS.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25 jmc 1.5 #include "PTRACERS_SIZE.h"
26 jmc 1.17 c#include "PTRACERS_PARAMS.h"
27     #include "PTRACERS_FIELDS.h"
28 stephd 1.6 #ifdef ALLOW_DIC
29 stephd 1.1 #include "DIC_BIOTIC.h"
30     #include "DIC_ABIOTIC.h"
31 mlosch 1.9 #endif /* ALLOW_DIC */
32 stephd 1.1
33     C !INPUT PARAMETERS: ===================================================
34     C myThid :: thread number
35     INTEGER myThid, myIter
36     _RL myTime
37 stephd 1.4
38 stephd 1.6 c!LOCAL VARIABLES: ====================================================
39 stephd 1.4 C i,j :: loop indices
40     C bi,bj :: tile indices
41     C k :: vertical level
42 stephd 1.1 INTEGER bi,bj,imin,imax,jmin,jmax
43     INTEGER i,j
44     INTEGER niter
45 stephd 1.4 CEOP
46 stephd 1.1
47     #ifdef ALLOW_GCHEM
48 mlosch 1.10 #ifdef GCHEM_SEPARATE_FORCING
49 stephd 1.1
50     ccccccccccccccccccccccccc
51     c global calculations c
52     ccccccccccccccccccccccccc
53 stephd 1.11 #ifdef ALLOW_DIC
54 dfer 1.16 #ifdef ALLOW_OLD_VIRTUALFLUX
55 stephd 1.1 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 dfer 1.16 #endif /* ALLOW_OLD_VIRTUALFLUX */
66 stephd 1.1 #endif
67     ccccccccccccccccccccccccccccccccccccccccccc
68    
69    
70     ccccccccccccccccccccccccc
71     c chemical forcing c
72     ccccccccccccccccccccccccc
73 stephd 1.3 C$taf loop = parallel
74 stephd 1.1 DO bj=myByLo(myThid),myByHi(myThid)
75 stephd 1.3 C$taf loop = parallel
76 stephd 1.1 DO bi=myBxLo(myThid),myBxHi(myThid)
77    
78 stephd 1.13 jMin=1
79     jMax=sNy
80     iMin=1
81     iMax=sNx
82 stephd 1.1 c
83     ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
84     c
85 stephd 1.11 #ifdef ALLOW_DIC
86 stephd 1.1 #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 stephd 1.15 #ifdef ALLOW_O2
97 stephd 1.1 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
98     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
99     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
100     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
101     & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
102     & bi,bj,imin,imax,jmin,jmax,
103     & myIter,myTime,myThid)
104 stephd 1.15 #else
105     call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
106     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
107     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
108     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
109     & bi,bj,imin,imax,jmin,jmax,
110     & myIter,myTime,myThid)
111     #endif
112 stephd 1.1 #endif
113     #endif
114     cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
115 stephd 1.2
116 stephd 1.1 c
117     ENDDO
118     ENDDO
119    
120 mlosch 1.10 #endif /* GCHEM_SEPARATE_FORCING */
121 stephd 1.1 #endif /* ALLOW_GCHEM */
122    
123     RETURN
124     END

  ViewVC Help
Powered by ViewVC 1.1.22