110 |
c dic_int3=start timestep, |
c dic_int3=start timestep, |
111 |
c dic_int4=timestep between file entries) |
c dic_int4=timestep between file entries) |
112 |
if (dic_int1.eq.2) then |
if (dic_int1.eq.2) then |
|
if (istate.eq.0) then |
|
|
OPEN(28,FILE='co2atmos.dat',STATUS='old') |
|
|
do it=1,dic_int2 |
|
|
READ(28,*) co2atmos(it) |
|
|
print*,'co2atmos',co2atmos(it) |
|
|
enddo |
|
|
endif |
|
113 |
c linearly interpolate between file entries |
c linearly interpolate between file entries |
114 |
ntim=int((myIter-dic_int3)/dic_int4)+1 |
ntim=int((myIter-dic_int3)/dic_int4)+1 |
115 |
aWght = FLOAT(myIter-dic_int3) |
aWght = FLOAT(myIter-dic_int3) |
190 |
_GLOBAL_SUM_R8(total_ocean_carbon,myThid) |
_GLOBAL_SUM_R8(total_ocean_carbon,myThid) |
191 |
|
|
192 |
if (istate.eq.0) then |
if (istate.eq.0) then |
193 |
c read state from output file |
c use value read in dic_init_fixed |
194 |
DO i = 1,MAX_LEN_FNAM |
total_atmos_carbon=total_atmos_carbon_ini |
195 |
fn(i:i) = ' ' |
atpco2=atpco2_ini |
|
ENDDO |
|
|
WRITE(fn,'(A,I10.10)') 'dic_atmos.',myIter |
|
|
C Going to really do some IO. Make everyone except master thread wait. |
|
|
_BARRIER |
|
|
c read in values from last pickup |
|
|
open(26,file=fn,status='old') |
|
|
read(26,*) total_atmos_carbon, atpco2 |
|
|
close(26) |
|
|
|
|
196 |
else |
else |
197 |
c calculate new atmos pCO2 |
c calculate new atmos pCO2 |
198 |
total_atmos_carbon=total_atmos_carbon - total_flux |
total_atmos_carbon=total_atmos_carbon - total_flux |