/[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.2 - (hide annotations) (download)
Tue Oct 7 16:21:12 2003 UTC (20 years, 7 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51n_pre, checkpoint51l_post, checkpoint51q_post, checkpoint51j_post, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint51o_post, checkpoint51p_post, checkpoint52a_pre, checkpoint51i_post, checkpoint52, checkpoint52a_post, checkpoint52b_post, checkpoint52c_post, checkpoint51l_pre, ecco_c52_e35, checkpoint51t_post, checkpoint51n_post, checkpoint51i_pre, checkpoint51u_post, checkpoint51m_post, checkpoint51s_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.1: +6 -0 lines
fix bug in ptracers time averaging if gchem forcing is done separately
(ie #define PTRACERS_SEPARATE_FORCING)

1 stephd 1.1 #include "CPP_OPTIONS.h"
2     #include "PTRACERS_OPTIONS.h"
3     #include "GCHEM_OPTIONS.h"
4    
5     C !INTERFACE: ==========================================================
6     SUBROUTINE GCHEM_FORCING_SEP(myTime,myIter, myThid )
7    
8     IMPLICIT NONE
9     #include "SIZE.h"
10     #include "GRID.h"
11     #include "DYNVARS.h"
12     #include "EEPARAMS.h"
13     #include "PARAMS.h"
14     #ifdef ALLOW_PTRACERS
15     #include "PTRACERS.h"
16     #endif
17     #ifdef DIC_BIOTIC
18     #include "DIC_BIOTIC.h"
19     #include "DIC_ABIOTIC.h"
20     #endif
21    
22     C !INPUT PARAMETERS: ===================================================
23     C myThid :: thread number
24     INTEGER myThid, myIter
25     _RL myTime
26     INTEGER bi,bj,imin,imax,jmin,jmax
27     INTEGER i,j
28     INTEGER niter
29    
30     #ifdef ALLOW_PTRACERS
31     #ifdef ALLOW_GCHEM
32    
33     _BARRIER
34     _BEGIN_MASTER( mythid )
35    
36     ccccccccccccccccccccccccc
37     c global calculations c
38     ccccccccccccccccccccccccc
39     #ifdef DIC_BIOTIC
40     c find global surface averages
41     call tracer_meanarea(myThid,salt, 1,gsm_s)
42     call tracer_meanarea(myThid,
43     & ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)
44     print*,'mean surface dic', gsm_dic,gsm_s
45     call tracer_meanarea(myThid,
46     & ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)
47    
48     #endif
49     ccccccccccccccccccccccccccccccccccccccccccc
50    
51     _END_MASTER( mythid )
52     _BARRIER
53    
54    
55     ccccccccccccccccccccccccc
56     c chemical forcing c
57     ccccccccccccccccccccccccc
58     C$TAF loop = parallel
59     DO bj=myByLo(myThid),myByHi(myThid)
60     C$TAF loop = parallel
61     DO bi=myBxLo(myThid),myBxHi(myThid)
62    
63     jMin=1-OLy
64     jMax=sNy+OLy
65     iMin=1-OLx
66     iMax=sNx+OLx
67     c
68     ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
69     c
70     #ifdef DIC_BIOTIC
71     #ifdef ALLOW_FE
72     call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
73     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
74     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
75     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
76     & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
77     & Ptracer(1-Olx,1-Oly,1,bi,bj,6),
78     & bi,bj,imin,imax,jmin,jmax,
79     & myIter,myTime,myThid)
80     #else
81     call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
82     & Ptracer(1-Olx,1-Oly,1,bi,bj,2),
83     & Ptracer(1-Olx,1-Oly,1,bi,bj,3),
84     & Ptracer(1-Olx,1-Oly,1,bi,bj,4),
85     & Ptracer(1-Olx,1-Oly,1,bi,bj,5),
86     & bi,bj,imin,imax,jmin,jmax,
87     & myIter,myTime,myThid)
88     #endif
89     #endif
90     cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
91 stephd 1.2
92     #ifdef PTRACERS_SEPARATE_FORCING
93     C time averaging directly, here otherwise in the_correction_step
94     CALL PTRACERS_STATVARS(myTime, myIter, bi, bj, myThid)
95     #endif /* PTRACERS_SEPARATE_FORCING */
96    
97 stephd 1.1 c
98     ENDDO
99     ENDDO
100    
101     #endif /* ALLOW_GCHEM */
102     #endif /* ALLOW_PTRACERS */
103    
104     RETURN
105     END

  ViewVC Help
Powered by ViewVC 1.1.22