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

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

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

revision 1.1 by stephd, Wed Jun 25 21:00:36 2003 UTC revision 1.2 by stephd, Wed Jul 9 19:59:18 2003 UTC
# Line 36  C     == Routine arguments == Line 36  C     == Routine arguments ==
36  #ifdef ALLOW_PTRACERS  #ifdef ALLOW_PTRACERS
37  #ifdef DIC_ABIOTIC  #ifdef DIC_ABIOTIC
38  C     == Local variables ==  C     == Local variables ==
39         INTEGER I,J, kLev         INTEGER I,J, kLev, it
40  C Number of iterations for pCO2 solvers...  C Number of iterations for pCO2 solvers...
41        INTEGER inewtonmax        INTEGER inewtonmax
42        INTEGER ibrackmax        INTEGER ibrackmax
# Line 50  C local variables for carbon chem Line 50  C local variables for carbon chem
50        _RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
51        _RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52        _RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
       _RL FluxCO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)  
53    
54  cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc  cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
55    
# Line 119  c for first few timesteps Line 118  c for first few timesteps
118  c first approxmation  c first approxmation
119         DO j=1-OLy,sNy+OLy         DO j=1-OLy,sNy+OLy
120          DO i=1-OLx,sNx+OLx          DO i=1-OLx,sNx+OLx
121             do it=1,10
122            CALL CALC_PCO2_APPROX(            CALL CALC_PCO2_APPROX(
123       I        theta(i,j,kLev,bi,bj),salt(i,j,kLev,bi,bj),       I        theta(i,j,kLev,bi,bj),salt(i,j,kLev,bi,bj),
124       I        PTR_CO2(i,j,kLev), surfphos(i,j),       I        PTR_CO2(i,j,kLev), surfphos(i,j),
# Line 129  c first approxmation Line 129  c first approxmation
129       I        aksi(i,j,bi,bj),akf(i,j,bi,bj),ff(i,j,bi,bj),       I        aksi(i,j,bi,bj),akf(i,j,bi,bj),ff(i,j,bi,bj),
130       I        bt(i,j,bi,bj),st(i,j,bi,bj),ft(i,j,bi,bj),       I        bt(i,j,bi,bj),st(i,j,bi,bj),ft(i,j,bi,bj),
131       U        pH(i,j,bi,bj),pCO2(i,j,bi,bj) )       U        pH(i,j,bi,bj),pCO2(i,j,bi,bj) )
132             enddo
133          ENDDO          ENDDO
134         ENDDO         ENDDO
135  #else  #else
# Line 202  C Calculate flux in terms of DIC units u Line 203  C Calculate flux in terms of DIC units u
203  C Flux = Vp * ([CO2sat] - [CO2])  C Flux = Vp * ([CO2sat] - [CO2])
204  C CO2sat = K0*pCO2atmos*P/P0  C CO2sat = K0*pCO2atmos*P/P0
205  C Converting pCO2 to [CO2] using ff, as in CALC_PCO2  C Converting pCO2 to [CO2] using ff, as in CALC_PCO2
206                FluxCO2(i,j) =                FluxCO2(i,j,bi,bj) =
207       &         maskC(i,j,kLev,bi,bj)*Kwexch(i,j)*(       &         maskC(i,j,kLev,bi,bj)*Kwexch(i,j)*(
208       &         ak0(i,j,bi,bj)*pCO2sat(i,j) -       &         ak0(i,j,bi,bj)*pCO2sat(i,j) -
209       &         ff(i,j,bi,bj)*pCO2(i,j,bi,bj)       &         ff(i,j,bi,bj)*pCO2(i,j,bi,bj)
210       &         )       &         )
211              ELSE              ELSE
212                 FluxCO2(i,j) = 0.                 FluxCO2(i,j,bi,bj) = 0.
213              ENDIF              ENDIF
214  C convert flux (mol kg-1 m s-1) to (mol m-2 s-1)  C convert flux (mol kg-1 m s-1) to (mol m-2 s-1)
215              FluxCO2(i,j) = FluxCO2(i,j)/permil              FluxCO2(i,j,bi,bj) = FluxCO2(i,j,bi,bj)/permil
216    
217              IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN              IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN
218  c calculate virtual flux  c calculate virtual flux
# Line 236  C update tendency Line 237  C update tendency
237           DO j=1-OLy,sNy+OLy           DO j=1-OLy,sNy+OLy
238            DO i=1-OLx,sNx+OLx            DO i=1-OLx,sNx+OLx
239             GDC(i,j)= maskC(i,j,kLev,bi,bj)*(             GDC(i,j)= maskC(i,j,kLev,bi,bj)*(
240       &                    FluxCO2(i,j)*recip_drF(kLev)       &                    FluxCO2(i,j,bi,bj)*recip_drF(kLev)
241       &                    + VirtualFlux(i,j)       &                    + VirtualFlux(i,j)
242       &                                              )       &                                              )
243            ENDDO            ENDDO

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22