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

Annotation of /MITgcm/pkg/dic/dic_biotic_forcing.F

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


Revision 1.4 - (hide annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51n_pre, checkpoint51l_post, checkpoint51o_post, checkpoint51i_post, checkpoint51l_pre, checkpoint51n_post, checkpoint51m_post
Branch point for: tg2-branch, checkpoint51n_branch
Changes since 1.3: +1 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 stephd 1.1 C modified for external_forcing_DIC.F August 1999
2     CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3     c
4     c modified swd Oct 01 and Feb 02, for use as package for c40_patch1
5     c modified to use with c44 and ptracers: swd May 2002
6     c modified to have carbonate and biological influences: swd June 2002
7     C
8    
9 edhill 1.4 #include "DIC_OPTIONS.h"
10 stephd 1.1 #include "GCHEM_OPTIONS.h"
11    
12     CStartOfInterFace
13     SUBROUTINE DIC_BIOTIC_FORCING( PTR_DIC, PTR_ALK, PTR_PO4,
14     & PTR_DOP, PTR_O2,
15     #ifdef ALLOW_FE
16     & PTR_FE,
17     #endif
18     & bi,bj,imin,imax,jmin,jmax,
19     & myIter,myTime,myThid)
20    
21     C /==========================================================\
22     C | SUBROUTINE DIC_BIOTIC_FORCING |
23     C | o Calculate the changes to DIC through air-sea fluxes |
24     C | carbonates, and biology (parameterizes by PO4) |
25     C |==========================================================|
26     IMPLICIT NONE
27    
28     C == GLobal variables ==
29     #include "SIZE.h"
30     #include "DYNVARS.h"
31     #include "EEPARAMS.h"
32     #include "PARAMS.h"
33     #include "GRID.h"
34     #include "DIC_BIOTIC.h"
35     #include "DIC_ABIOTIC.h"
36    
37     C == Routine arguments ==
38     INTEGER myIter
39     _RL myTime
40     INTEGER myThid
41     _RL PTR_DIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
42     _RL PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
43     _RL PTR_PO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
44     _RL PTR_DOP(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
45     _RL PTR_O2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
46     #ifdef ALLOW_FE
47     _RL PTR_FE(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
48     #endif
49     INTEGER bi, bj, imin, imax, jmin, jmax
50    
51     #ifdef ALLOW_PTRACERS
52     #ifdef DIC_BIOTIC
53     C == Local variables ==
54     _RL GDIC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
55     _RL GALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
56     _RL GPO4(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
57     _RL GDOP(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
58     _RL GO2(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
59     _RL SURA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
60     _RL SURC(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
61     _RL SURO(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
62     _RL BIO(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
63     _RL CAR(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
64     _RL bioac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
65     _RL pflux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
66     _RL cflux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
67     #ifdef ALLOW_FE
68     _RL GFE(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
69     _RL freefe(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
70     #endif
71     INTEGER I,J,k
72    
73     DO k=1,Nr
74     DO j=1-OLy,sNy+OLy
75     DO i=1-OLx,sNx+OLx
76     GDIC(i,j,k)=0.d0
77     GALK(i,j,k)=0.d0
78     GPO4(i,j,k)=0.d0
79     GDOP(i,j,k)=0.d0
80     GO2(i,j,k)=0.d0
81     SURA(i,j)=0.d0
82     SURC(i,j)=0.d0
83     CAR(i,j,k)=0.d0
84     BIO(i,j,k)=0.d0
85     bioac(i,j,k)=0.d0
86     pflux(i,j,k)=0.d0
87     cflux(i,j,k)=0.d0
88     #ifdef ALLOW_FE
89     GFE(i,j,k)=0.d0
90     freefe(i,j,k)=0.d0
91     #endif
92     ENDDO
93     ENDDO
94     ENDDO
95    
96     c carbon air-sea interaction
97     CALL DIC_SURFFORCING( PTR_DIC, SURC,
98     & bi,bj,imin,imax,jmin,jmax,
99     & myIter,myTime,myThid)
100    
101     c alkalinity air-sea interaction
102     CALL ALK_SURFFORCING( PTR_ALK, SURA,
103     & bi,bj,imin,imax,jmin,jmax,
104     & myIter,myTime,myThid)
105    
106     c carbon air-sea interaction
107     CALL O2_SURFFORCING( PTR_O2, SURO,
108     & bi,bj,imin,imax,jmin,jmax,
109     & myIter,myTime,myThid)
110    
111     #ifdef ALLOW_FE
112     c find free iron
113     call fe_chem(bi,bj,iMin,iMax,jMin,jMax, PTR_FE, freefe,
114     & myIter, mythid)
115     #endif
116    
117    
118     c biological activity
119     CALL BIO_EXPORT( PTR_PO4 ,
120     #ifdef ALLOW_FE
121     I PTR_FE,
122     #endif
123     I bioac,
124     I bi,bj,imin,imax,jmin,jmax,
125     I myIter,myTime,myThid)
126    
127     c flux of po4 from layers with biological activity
128     CALL PHOS_FLUX( bioac, pflux,
129     & bi,bj,imin,imax,jmin,jmax,
130     & myIter,myTime,myThid)
131    
132     c carbonate
133     CALL CAR_FLUX( bioac, cflux,
134     & bi,bj,imin,imax,jmin,jmax,
135     & myIter,myTime,myThid)
136    
137     c add all tendencies for PO4, DOP, ALK, DIC
138     DO k=1,Nr
139     DO j=1-OLy,sNy+OLy
140     DO i=1-OLx,sNx+OLx
141     bio(i,j,k)=-bioac(i,j,k)+pflux(i,j,k)
142     & + maskC(i,j,k,bi,bj)*Kdopremin*PTR_DOP(i,j,k)
143     car(i,j,k)=-bioac(i,j,k)* R_cp*rain_ratio(i,j,bi,bj)*
144     & (1.0-DOPfraction)+cflux(i,j,k)
145     GPO4(i,j,k)=bio(i,j,k)
146     GDOP(i,j,k)=+bioac(i,j,k)*DOPfraction
147     & - maskC(i,j,k,bi,bj)*Kdopremin*PTR_DOP(i,j,k)
148     GALK(i,j,k)=+2.d0*car(i,j,k)-R_NP*bio(i,j,k)
149     GDIC(i,j,k)=car(i,j,k)+R_CP*bio(i,j,k)
150     if (PTR_O2(i,j,k).gt.o2crit) then
151     GO2(i,j,k)=R_OP*bio(i,j,k)
152     else
153     GO2(i,j,k)=0.d0
154     endif
155     #ifdef ALLOW_FE
156     GFE(i,j,k)=R_FeP*bio(i,j,k)
157     & -Kscav*freefe(i,j,k)
158     #endif
159     IF (K.eq.1) then
160     GALK(i,j,1)=GALK(i,j,1)+SURA(i,j)
161     GDIC(i,j,1)=GDIC(i,j,1)+SURC(i,j)
162     GO2(i,j,1)=GO2(i,j,1)+SURO(i,j)
163     #ifdef ALLOW_FE
164     GFE(i,j,1)=GFE(i,j,1)+alpfe*
165     & InputFe(i,j,bi,bj)/delz(1)
166     #endif
167     ENDIF
168     ENDDO
169     ENDDO
170     ENDDO
171    
172    
173     C update
174     DO k=1,Nr
175     DO j=1-OLy,sNy+OLy
176     DO i=1-OLx,sNx+OLx
177     PTR_DIC(i,j,k)=
178     & PTR_DIC(i,j,k)+GDIC(i,j,k)*deltaTtracer
179     PTR_ALK(i,j,k)=
180     & PTR_ALK(i,j,k)+GALK(i,j,k)*deltaTtracer
181     PTR_PO4(i,j,k)=
182     & PTR_PO4(i,j,k)+GPO4(i,j,k)*deltaTtracer
183     PTR_DOP(i,j,k)=
184     & PTR_DOP(i,j,k)+GDOP(i,j,k)*deltaTtracer
185     PTR_O2(i,j,k)=
186     & PTR_O2(i,j,k)+GO2(i,j,k)*deltaTtracer
187     #ifdef ALLOW_FE
188     PTR_FE(i,j,k)=
189     & PTR_FE(i,j,k)+GFE(i,j,k)*deltaTtracer
190     #endif
191     ENDDO
192     ENDDO
193     ENDDO
194    
195     #ifdef ALLOW_TIMEAVE
196     c save averages
197     DO k=1,Nr
198     DO j=1-OLy,sNy+OLy
199     DO i=1-OLx,sNx+OLx
200     BIOave(i,j,k,bi,bj)=BIOave(i,j,k,bi,bj)+
201     & BIOac(i,j,k)*deltaTclock
202     CARave(i,j,k,bi,bj)=CARave(i,j,k,bi,bj)+
203     & CAR(i,j,k)*deltaTclock
204     if (k.eq.1) then
205     SURave(i,j,bi,bj)=SURave(i,j,bi,bj)+
206     & SURC(i,j)*deltaTclock
207     SUROave(i,j,bi,bj)=SUROave(i,j,bi,bj)+
208     & SURO(i,j)*deltaTclock
209     pCO2ave(i,j,bi,bj)=pCO2ave(i,j,bi,bj)+
210     & pCO2(i,j,bi,bj)*deltaTclock
211     pHave(i,j,bi,bj)=pHave(i,j,bi,bj)+
212     & pH(i,j,bi,bj)*deltaTclock
213 stephd 1.2 fluxCO2ave(i,j,bi,bj)=fluxCO2ave(i,j,bi,bj)+
214     & fluxCO2(i,j,bi,bj)*deltaTclock
215 stephd 1.1 endif
216     ENDDO
217     ENDDO
218     ENDDO
219     do k=1,Nr
220     dic_timeave(bi,bj,k)=dic_timeave(bi,bj,k)+deltaTclock
221     enddo
222     #endif
223    
224     #endif
225     #endif
226    
227     c
228     RETURN
229     END

  ViewVC Help
Powered by ViewVC 1.1.22