/[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.14 - (show annotations) (download)
Wed Aug 9 01:25:40 2006 UTC (17 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59a, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post
Changes since 1.13: +1 -7 lines
fix for multi-threading

1 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.13 2005/12/13 21:06:42 stephd 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 #include "PTRACERS.h"
27 #ifdef ALLOW_DIC
28 #include "DIC_BIOTIC.h"
29 #include "DIC_ABIOTIC.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 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
67 ccccccccccccccccccccccccc
68 c chemical forcing c
69 ccccccccccccccccccccccccc
70 C$taf loop = parallel
71 DO bj=myByLo(myThid),myByHi(myThid)
72 C$taf loop = parallel
73 DO bi=myBxLo(myThid),myBxHi(myThid)
74
75 jMin=1
76 jMax=sNy
77 iMin=1
78 iMax=sNx
79 c
80 ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
81 c
82 #ifdef ALLOW_DIC
83 #ifdef ALLOW_FE
84 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
85 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
86 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
87 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
88 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
89 & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
90 & bi,bj,imin,imax,jmin,jmax,
91 & myIter,myTime,myThid)
92 #else
93 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
94 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
95 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
96 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
97 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
98 & bi,bj,imin,imax,jmin,jmax,
99 & myIter,myTime,myThid)
100 #endif
101 #endif
102 cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
103
104 c
105 ENDDO
106 ENDDO
107
108 #endif /* GCHEM_SEPARATE_FORCING */
109 #endif /* ALLOW_GCHEM */
110
111 RETURN
112 END

  ViewVC Help
Powered by ViewVC 1.1.22