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

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

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

revision 1.11 by stephd, Thu Aug 18 19:29:51 2005 UTC revision 1.25 by dfer, Mon Jan 5 15:26:02 2009 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "GCHEM_OPTIONS.h"  #include "GCHEM_OPTIONS.h"
5    #ifdef ALLOW_DIC
6    #include "DIC_OPTIONS.h"
7    #endif
8    
9  CBOP  CBOP
10  C !ROUTINE: GCHEM_FORCING_SEP  C !ROUTINE: GCHEM_FORCING_SEP
# Line 11  C !INTERFACE: ========================== Line 14  C !INTERFACE: ==========================
14  C !DESCRIPTION:  C !DESCRIPTION:
15  C     calls subroutine that will update passive tracers values  C     calls subroutine that will update passive tracers values
16  C     with a separate timestep. Since GCHEM_FORCING_SEP is now  C     with a separate timestep. Since GCHEM_FORCING_SEP is now
17  C     called before DO_FIELDS_BLOCKING_EXCHANGES, the passive  C     called before DO_FIELDS_BLOCKING_EXCHANGES, the passive
18  C     tracer values in the halo regions are not up to date and  C     tracer values in the halo regions are not up to date and
19  C     must not be used.  C     must not be used.
20    
21  C !USES: ===============================================================  C !USES: ===============================================================
# Line 23  C !USES: =============================== Line 26  C !USES: ===============================
26  #include "EEPARAMS.h"  #include "EEPARAMS.h"
27  #include "PARAMS.h"  #include "PARAMS.h"
28  #include "PTRACERS_SIZE.h"  #include "PTRACERS_SIZE.h"
29  #include "PTRACERS.h"  #include "PTRACERS_FIELDS.h"
30  #ifdef ALLOW_DIC  #ifdef ALLOW_DIC
31  #include "DIC_BIOTIC.h"  #include "DIC_VARS.h"
 #include "DIC_ABIOTIC.h"  
32  #endif /* ALLOW_DIC */  #endif /* ALLOW_DIC */
33    
34  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
# Line 46  CEOP Line 48  CEOP
48  #ifdef ALLOW_GCHEM  #ifdef ALLOW_GCHEM
49  #ifdef GCHEM_SEPARATE_FORCING  #ifdef GCHEM_SEPARATE_FORCING
50    
        _BARRIER  
        _BEGIN_MASTER( mythid )  
   
51  ccccccccccccccccccccccccc  ccccccccccccccccccccccccc
52  c global calculations   c  c global calculations   c
53  ccccccccccccccccccccccccc  ccccccccccccccccccccccccc
54  #ifdef ALLOW_DIC  #ifdef ALLOW_DIC
55    #ifdef ALLOW_OLD_VIRTUALFLUX
56  c find global surface averages  c find global surface averages
57         gsm_s = 0.         gsm_s = 0. _d 0
58         gsm_dic = 0.         gsm_dic = 0. _d 0
59         gsm_alk = 0.         gsm_alk = 0. _d 0
60         call tracer_meanarea(myThid,salt, 1,gsm_s)         call tracer_meanarea(salt, 1,gsm_s,myThid)
61         call tracer_meanarea(myThid,         call tracer_meanarea(
62       &               ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic)       &             ptracer(1-Olx,1-Oly,1,1,1,1), 1, gsm_dic, myThid )
63         print*,'mean surface dic', gsm_dic,gsm_s         print*,'mean surface dic', gsm_dic,gsm_s
64         call tracer_meanarea(myThid,         call tracer_meanarea(
65       &               ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk)       &             ptracer(1-Olx,1-Oly,1,1,1,2), 1, gsm_alk, myThid )
66    #endif /* ALLOW_OLD_VIRTUALFLUX */
67  #endif  #endif
68  ccccccccccccccccccccccccccccccccccccccccccc  ccccccccccccccccccccccccccccccccccccccccccc
69    
       _END_MASTER( mythid )  
       _BARRIER  
   
70    
71  ccccccccccccccccccccccccc  ccccccccccccccccccccccccc
72  c chemical forcing      c  c chemical forcing      c
# Line 84  C$taf loop = parallel Line 82  C$taf loop = parallel
82          iMax=sNx          iMax=sNx
83  c  c
84  ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc  ccccccccccccccccccccccccccc DIC cccccccccccccccccccccccccccccccc
85  c  
86  #ifdef ALLOW_DIC  #ifdef ALLOW_DIC
87  #ifdef ALLOW_FE  #ifdef ALLOW_FE
88            call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),            call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
# Line 96  c Line 94  c
94       &                          bi,bj,imin,imax,jmin,jmax,       &                          bi,bj,imin,imax,jmin,jmax,
95       &                          myIter,myTime,myThid)       &                          myIter,myTime,myThid)
96  #else  #else
97    #ifdef ALLOW_O2
98            call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),            call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
99       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,2),       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,2),
100       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,3),       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,3),
# Line 103  c Line 102  c
102       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,5),       &                          Ptracer(1-Olx,1-Oly,1,bi,bj,5),
103       &                          bi,bj,imin,imax,jmin,jmax,       &                          bi,bj,imin,imax,jmin,jmax,
104       &                          myIter,myTime,myThid)       &                          myIter,myTime,myThid)
105    #else
106              call DIC_BIOTIC_Forcing( Ptracer(1-Olx,1-Oly,1,bi,bj,1),
107         &                          Ptracer(1-Olx,1-Oly,1,bi,bj,2),
108         &                          Ptracer(1-Olx,1-Oly,1,bi,bj,3),
109         &                          Ptracer(1-Olx,1-Oly,1,bi,bj,4),
110         &                          bi,bj,imin,imax,jmin,jmax,
111         &                          myIter,myTime,myThid)
112  #endif  #endif
113  #endif  #endif
114    
115    #endif
116  cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc  cccccccccccccccccccccccccc END DIC cccccccccccccccccccccccccccccccccc
117    
 c  
118          ENDDO          ENDDO
119         ENDDO         ENDDO
120    
121    #ifdef ALLOW_DIC
122           CALL DIC_ATMOS( 1, myTime, myIter, myThid )
123           CALL DIC_STORE_FLUXCO2( myTime, myIter, myThid )
124    #endif
125    
126  #endif /* GCHEM_SEPARATE_FORCING */  #endif /* GCHEM_SEPARATE_FORCING */
127  #endif /* ALLOW_GCHEM */  #endif /* ALLOW_GCHEM */
128    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.22