/[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.11 by stephd, Tue Sep 12 19:58:02 2006 UTC revision 1.16 by dfer, Mon Aug 27 19:44:13 2007 UTC
# Line 9  CBOP Line 9  CBOP
9  C !ROUTINE: DIC_SURFFORCING  C !ROUTINE: DIC_SURFFORCING
10    
11  C !INTERFACE: ==========================================================  C !INTERFACE: ==========================================================
12        SUBROUTINE DIC_SURFFORCING( PTR_CO2 , GDC,        SUBROUTINE DIC_SURFFORCING( PTR_CO2 , PTR_ALK, PTR_PO4, GDC,
13       I           bi,bj,imin,imax,jmin,jmax,       I           bi,bj,imin,imax,jmin,jmax,
14       I           myIter,myTime,myThid)       I           myIter,myTime,myThid)
15    
# Line 26  C !USES: =============================== Line 26  C !USES: ===============================
26  #include "GRID.h"  #include "GRID.h"
27  #include "FFIELDS.h"  #include "FFIELDS.h"
28  #include "DIC_ABIOTIC.h"  #include "DIC_ABIOTIC.h"
 #ifdef DIC_BIOTIC  
 #include "PTRACERS_SIZE.h"  
 #include "PTRACERS.h"  
 #endif  
29    
30  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
31  C  myThid               :: thread number  C  myThid               :: thread number
# Line 39  c  PTR_CO2              :: DIC tracer fi Line 35  c  PTR_CO2              :: DIC tracer fi
35        INTEGER myIter, myThid        INTEGER myIter, myThid
36        _RL myTime        _RL myTime
37        _RL  PTR_CO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)        _RL  PTR_CO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
38          _RL  PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
39          _RL  PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
40        INTEGER iMin,iMax,jMin,jMax, bi, bj        INTEGER iMin,iMax,jMin,jMax, bi, bj
41    
42  C !OUTPUT PARAMETERS: ===================================================  C !OUTPUT PARAMETERS: ===================================================
# Line 58  C local variables for carbon chem Line 56  C local variables for carbon chem
56        _RL surfalk(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL surfalk(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
57        _RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL surfphos(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
58        _RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL surfsi(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
59    #ifdef ALLOW_OLD_VIRTUALFLUX
60        _RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL VirtualFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
61    #endif
62  CEOP  CEOP
63    
64  cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc  cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
65    
66        kLev=1        kLev=1
67    
68    c if coupled to atmsopheric model, use the
69    c Co2 value passed from the coupler
70    #ifndef USE_ATMOSCO2
71  C PRE-INDUSTRIAL STEADY STATE pCO2 = 278.0 ppmv  C PRE-INDUSTRIAL STEADY STATE pCO2 = 278.0 ppmv
72         DO j=1-OLy,sNy+OLy         DO j=1-OLy,sNy+OLy
73          DO i=1-OLx,sNx+OLx          DO i=1-OLx,sNx+OLx
74             AtmospCO2(i,j,bi,bj)=278.0d-6             AtmospCO2(i,j,bi,bj)=278.0 _d -6
75          ENDDO          ENDDO
76         ENDDO         ENDDO
77    #endif
78    
79    
80  C =================================================================  C =================================================================
# Line 80  C determine inorganic carbon chem coeffi Line 84  C determine inorganic carbon chem coeffi
84    
85  #ifdef DIC_BIOTIC  #ifdef DIC_BIOTIC
86  cQQQQ check ptracer numbers  cQQQQ check ptracer numbers
87               surfalk(i,j) = PTRACER(i,j,klev,bi,bj,2)               surfalk(i,j) = PTR_ALK(i,j,klev)
88       &                          * maskC(i,j,kLev,bi,bj)       &                          * maskC(i,j,kLev,bi,bj)
89               surfphos(i,j)  = PTRACER(i,j,klev,bi,bj,3)               surfphos(i,j)  = PTR_PO4(i,j,klev)
90       &                          * maskC(i,j,kLev,bi,bj)       &                          * maskC(i,j,kLev,bi,bj)
91  #else  #else
92               surfalk(i,j) = 2.366595 * salt(i,j,kLev,bi,bj)/gsm_s               surfalk(i,j) = 2.366595 _d 0 * salt(i,j,kLev,bi,bj)/gsm_s
93       &                          * maskC(i,j,kLev,bi,bj)       &                          * maskC(i,j,kLev,bi,bj)
94               surfphos(i,j)  = 5.1225e-4 * maskC(i,j,kLev,bi,bj)               surfphos(i,j)  = 5.1225 _d -4 * maskC(i,j,kLev,bi,bj)
95  #endif  #endif
96  C FOR NON-INTERACTIVE Si  C FOR NON-INTERACTIVE Si
97               surfsi(i,j)   = SILICA(i,j,bi,bj) * maskC(i,j,kLev,bi,bj)               surfsi(i,j)   = SILICA(i,j,bi,bj) * maskC(i,j,kLev,bi,bj)
# Line 134  C calculate SCHMIDT NO. for CO2 Line 138  C calculate SCHMIDT NO. for CO2
138       &          + sca4 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj)       &          + sca4 * theta(i,j,kLev,bi,bj)*theta(i,j,kLev,bi,bj)
139       &                *theta(i,j,kLev,bi,bj)       &                *theta(i,j,kLev,bi,bj)
140    
141    c
142    #ifdef USE_PLOAD
143    C Convert anomalous pressure pLoad (in Pa) from atmospheric model
144    C to total pressure (in Atm)
145    C Note: it is assumed the reference atmospheric pressure is 1Atm=1013mb
146    C       rather than the actual ref. pressure from Atm. model so that on
147    C       average AtmosP is about 1 Atm.
148                    AtmosP(i,j,bi,bj)= 1. _d 0 + pLoad(i,j,bi,bj)/Pa2Atm
149    #endif
150    
151  C Determine surface flux (FDIC)  C Determine surface flux (FDIC)
152  C first correct pCO2at for surface atmos pressure  C first correct pCO2at for surface atmos pressure
153                pCO2sat(i,j) =                pCO2sat(i,j) =
154       &          AtmosP(i,j,bi,bj)*AtmospCO2(i,j,bi,bj)       &          AtmosP(i,j,bi,bj)*AtmospCO2(i,j,bi,bj)
155  c find exchange coefficient  c find exchange coefficient
156  c  account for schmidt number and and varible piston velocity  c  account for schmidt number and and varible piston velocity
157                pisvel(i,j,bi,bj)  =0.337*wind(i,j,bi,bj)**2/3.6d5                pisvel(i,j,bi,bj)=0.337 _d 0 *wind(i,j,bi,bj)**2/3.6 _d 5
158                Kwexch(i,j) =                Kwexch(i,j) =
159       &             pisvel(i,j,bi,bj)       &             pisvel(i,j,bi,bj)
160       &             / sqrt(SchmidtNoDIC(i,j)/660.0)       &             / sqrt(SchmidtNoDIC(i,j)/660.0 _d 0)
161  c OR use a constant  coeff  c OR use a constant  coeff
162  c             Kwexch(i,j) = 5e-5  c             Kwexch(i,j) = 5e-5
163  c ice influence  c ice influence
164                Kwexch(i,j)  =(1.d0-Fice(i,j,bi,bj))*Kwexch(i,j)                Kwexch(i,j)  =(1. _d 0 - FIce(i,j,bi,bj))*Kwexch(i,j)
165    
166    
167  C Calculate flux in terms of DIC units using K0, solubility  C Calculate flux in terms of DIC units using K0, solubility
# Line 160  C Converting pCO2 to [CO2] using ff, as Line 174  C Converting pCO2 to [CO2] using ff, as
174       &         ff(i,j,bi,bj)*pCO2(i,j,bi,bj)       &         ff(i,j,bi,bj)*pCO2(i,j,bi,bj)
175       &         )       &         )
176              ELSE              ELSE
177                 FluxCO2(i,j,bi,bj) = 0.                 FluxCO2(i,j,bi,bj) = 0. _d 0
178              ENDIF              ENDIF
179  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)
180              FluxCO2(i,j,bi,bj) = FluxCO2(i,j,bi,bj)/permil              FluxCO2(i,j,bi,bj) = FluxCO2(i,j,bi,bj)/permil
181    
182    #ifdef ALLOW_OLD_VIRTUALFLUX
183              IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN              IF (maskC(i,j,kLev,bi,bj).NE.0.) THEN
184  c calculate virtual flux  c calculate virtual flux
185  c EminusPforV = dS/dt*(1/Sglob)  c EminusPforV = dS/dt*(1/Sglob)
# Line 181  c Line 196  c
196              ELSE              ELSE
197                VirtualFlux(i,j)=0. _d 0                VirtualFlux(i,j)=0. _d 0
198              ENDIF              ENDIF
199    #endif /* ALLOW_OLD_VIRTUALFLUX */
200            ENDDO            ENDDO
201           ENDDO           ENDDO
202    
# Line 188  C update tendency Line 204  C update tendency
204           DO j=jmin,jmax           DO j=jmin,jmax
205            DO i=imin,imax            DO i=imin,imax
206             GDC(i,j)= maskC(i,j,kLev,bi,bj)*recip_drF(kLev)*             GDC(i,j)= maskC(i,j,kLev,bi,bj)*recip_drF(kLev)*
207       &                     recip_hFacC(i,j,kLev,bi,bj)*(       &                     recip_hFacC(i,j,kLev,bi,bj)
208       &                    FluxCO2(i,j,bi,bj) + VirtualFlux(i,j)       &                   *(FluxCO2(i,j,bi,bj)
209       &                                              )  #ifdef ALLOW_OLD_VIRTUALFLUX
210         &                   + VirtualFlux(i,j)
211    #endif
212         &                    )
213            ENDDO            ENDDO
214           ENDDO           ENDDO
215    

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

  ViewVC Help
Powered by ViewVC 1.1.22