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 |
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 |
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: |
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 |
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+ |
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 = |
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 |
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 |