/[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.10 - (show annotations) (download)
Tue Nov 23 20:20:46 2004 UTC (19 years, 6 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint57o_post, checkpoint57m_post, checkpoint57k_post, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint56b_post, checkpoint57i_post, checkpoint57e_post, checkpoint57g_pre, checkpoint56c_post, checkpoint57f_pre, checkpoint57a_post, checkpoint57a_pre, checkpoint57, eckpoint57e_pre, checkpoint57h_done, checkpoint57n_post, checkpoint57p_post, checkpoint57f_post, checkpoint57c_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post
Changes since 1.9: +3 -6 lines
  - renamed PTRACERS_SEPARATE_FORCING to GCHEM_SEPARATE_FORCING;
    this flag is now only visible within GCHEM-pkg routines.
  - moved gchem_forcing_int temporarily into ptracers_forcing, this will
    be replaced by a 3D array that is computed before thermodynamics; for
    this, the tracer ID iTracer had to be included into the parameter list
    of ptracers_forcing
  - cleaning up, in particular CPP-flags and call to ptracer_statvars

1 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_forcing_sep.F,v 1.9 2004/11/19 21:28:47 mlosch 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 _BARRIER
50 _BEGIN_MASTER( mythid )
51
52 ccccccccccccccccccccccccc
53 c global calculations c
54 ccccccccccccccccccccccccc
55 #ifdef DIC_BIOTIC
56 c find global surface averages
57 gsm_s = 0.
58 gsm_dic = 0.
59 gsm_alk = 0.
60 call tracer_meanarea(myThid,salt, 1,gsm_s)
61 call tracer_meanarea(myThid,
62 & ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)
63 print*,'mean surface dic', gsm_dic,gsm_s
64 call tracer_meanarea(myThid,
65 & ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)
66 #endif
67 ccccccccccccccccccccccccccccccccccccccccccc
68
69 _END_MASTER( mythid )
70 _BARRIER
71
72
73 ccccccccccccccccccccccccc
74 c chemical forcing c
75 ccccccccccccccccccccccccc
76 C$taf loop = parallel
77 DO bj=myByLo(myThid),myByHi(myThid)
78 C$taf loop = parallel
79 DO bi=myBxLo(myThid),myBxHi(myThid)
80
81 jMin=1
82 jMax=sNy
83 iMin=1
84 iMax=sNx
85 c
86 ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
87 c
88 #ifdef DIC_BIOTIC
89 #ifdef ALLOW_FE
90 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
91 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
92 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
93 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
94 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
95 & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
96 & bi,bj,imin,imax,jmin,jmax,
97 & myIter,myTime,myThid)
98 #else
99 call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
100 & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
101 & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
102 & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
103 & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
104 & bi,bj,imin,imax,jmin,jmax,
105 & myIter,myTime,myThid)
106 #endif
107 #endif
108 cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
109
110 c
111 ENDDO
112 ENDDO
113
114 #endif /* GCHEM_SEPARATE_FORCING */
115 #endif /* ALLOW_GCHEM */
116
117 RETURN
118 END

  ViewVC Help
Powered by ViewVC 1.1.22