/[MITgcm]/MITgcm/pkg/dic/dic_atmos.F
ViewVC logotype

Diff of /MITgcm/pkg/dic/dic_atmos.F

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

revision 1.11 by gforget, Thu Apr 24 21:35:53 2008 UTC revision 1.12 by dfer, Mon Aug 11 17:41:05 2008 UTC
# Line 44  C  istate               :: 0=initial cal Line 44  C  istate               :: 0=initial cal
44    
45  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
46         INTEGER bi, bj, I,J,k         INTEGER bi, bj, I,J,k
47         INTEGER it, ntim         INTEGER ntim, iUnit
48  c  c
49         _RL total_flux         _RL total_flux
50         _RL total_ocean_carbon_old         _RL total_ocean_carbon_old
# Line 86  c default - set only once Line 86  c default - set only once
86            ENDDO            ENDDO
87           ENDDO           ENDDO
88    
          ENDDO  
89          ENDDO          ENDDO
90           ENDDO
91        endif        endif
92    
93  c user specified value - set only once  c user specified value - set only once
# Line 101  c user specified value - set only once Line 101  c user specified value - set only once
101            ENDDO            ENDDO
102           ENDDO           ENDDO
103    
          ENDDO  
104          ENDDO          ENDDO
105           ENDDO
106        endif        endif
107    
108  c read from a file (note:  c read from a file (note:
# Line 128  c         print*,'weights',ntim, aWght, Line 128  c         print*,'weights',ntim, aWght,
128    
129              DO j=1-OLy,sNy+OLy              DO j=1-OLy,sNy+OLy
130               DO i=1-OLx,sNx+OLx               DO i=1-OLx,sNx+OLx
   
131                 AtmospCO2(i,j,bi,bj)=tmp                 AtmospCO2(i,j,bi,bj)=tmp
132               ENDDO               ENDDO
133              ENDDO              ENDDO
# Line 170  c for 278ppmv we need total_atmos_carbon Line 169  c for 278ppmv we need total_atmos_carbon
169            DO j=1,sNy            DO j=1,sNy
170              if (istate.gt.0) then              if (istate.gt.0) then
171                total_flux=total_flux+FluxCO2(i,j,bi,bj)*rA(i,j,bi,bj)*                total_flux=total_flux+FluxCO2(i,j,bi,bj)*rA(i,j,bi,bj)*
172       &                        hFacC(i,j,1,bi,bj)*dTtracerLev(1)       &                        maskC(i,j,1,bi,bj)*dTtracerLev(1)
173              endif              endif
174              DO k=1,nR              DO k=1,nR
175                total_ocean_carbon= total_ocean_carbon+                total_ocean_carbon= total_ocean_carbon+
# Line 191  c for 278ppmv we need total_atmos_carbon Line 190  c for 278ppmv we need total_atmos_carbon
190    
191         if (istate.eq.0) then         if (istate.eq.0) then
192  c use value read in dic_init_fixed  c use value read in dic_init_fixed
193         total_atmos_carbon=total_atmos_carbon_ini            total_atmos_carbon=total_atmos_carbon_ini
        atpco2=atpco2_ini  
194         else         else
195  c calculate new atmos pCO2  c calculate new atmos pCO2
196            total_atmos_carbon=total_atmos_carbon - total_flux            total_atmos_carbon=total_atmos_carbon - total_flux
           atpco2=total_atmos_carbon/total_atmos_moles  
197  c write out if time for a new pickup  c write out if time for a new pickup
198            permCheckPoint = .FALSE.            permCheckPoint = .FALSE.
199            permCheckPoint =            permCheckPoint =
# Line 209  c write out if time for a new pickup Line 206  c write out if time for a new pickup
206  C     Going to really do some IO. Make everyone except master thread wait.  C     Going to really do some IO. Make everyone except master thread wait.
207              _BARRIER              _BARRIER
208  c write values to new pickup  c write values to new pickup
209              open(26,file=fn,status='new')  
210              write(26,*) total_atmos_carbon, atpco2              CALL MDSFINDUNIT( iUnit, myThid )
211              close(26)              open(iUnit,file=fn,status='new')
212                write(iUnit,*) total_atmos_carbon, atpco2
213                close(iUnit)
214    
215            endif            endif
216         endif         endif
217    
218           atpco2=total_atmos_carbon/total_atmos_moles
       atpco2=total_atmos_carbon/total_atmos_moles  
219    
220  c     print*,'QQpCO2', total_atmos_carbon, atpco2, total_ocean_carbon,  c     print*,'QQpCO2', total_atmos_carbon, atpco2, total_ocean_carbon,
221  c    &                 total_flux  c    &                 total_flux
# Line 231  c    &                 total_flux Line 229  c    &                 total_flux
229            ENDDO            ENDDO
230           ENDDO           ENDDO
231    
          ENDDO  
232          ENDDO          ENDDO
233           ENDDO
234    
235        print*,'QQ atmos C, total, pCo2', total_atmos_carbon, atpco2        print*,'QQ atmos C, total, pCo2', total_atmos_carbon, atpco2
236        total_carbon=total_atmos_carbon + total_ocean_carbon        total_carbon=total_atmos_carbon + total_ocean_carbon

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

  ViewVC Help
Powered by ViewVC 1.1.22