22 |
#include "SIZE.h" |
#include "SIZE.h" |
23 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
24 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
25 |
|
#ifdef ALLOW_USE_MPI |
26 |
|
#include "EESUPPORT.h" |
27 |
|
#endif |
28 |
#include "PARAMS.h" |
#include "PARAMS.h" |
29 |
#include "GRID.h" |
#include "GRID.h" |
30 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
194 |
if (istate.eq.0) then |
if (istate.eq.0) then |
195 |
c use value read in dic_init_fixed |
c use value read in dic_init_fixed |
196 |
total_atmos_carbon=total_atmos_carbon_ini |
total_atmos_carbon=total_atmos_carbon_ini |
197 |
|
atpco2=total_atmos_carbon/total_atmos_moles |
198 |
else |
else |
199 |
c calculate new atmos pCO2 |
c calculate new atmos pCO2 |
200 |
total_atmos_carbon=total_atmos_carbon - total_flux |
total_atmos_carbon=total_atmos_carbon - total_flux |
201 |
|
atpco2=total_atmos_carbon/total_atmos_moles |
202 |
c write out if time for a new pickup |
c write out if time for a new pickup |
203 |
permCheckPoint = .FALSE. |
permCheckPoint = .FALSE. |
204 |
permCheckPoint = |
permCheckPoint = |
205 |
& DIFFERENT_MULTIPLE(pChkptFreq,myTime,deltaTClock) |
& DIFFERENT_MULTIPLE(pChkptFreq,myTime,deltaTClock) |
206 |
if (permCheckPoint) then |
if (permCheckPoint) then |
207 |
|
c only write if the first processor |
208 |
|
_BEGIN_MASTER( myThid ) |
209 |
|
#ifdef ALLOW_USE_MPI |
210 |
|
IF ( mpiMyId.EQ.0 ) THEN |
211 |
|
#endif |
212 |
DO i = 1,MAX_LEN_FNAM |
DO i = 1,MAX_LEN_FNAM |
213 |
fn(i:i) = ' ' |
fn(i:i) = ' ' |
214 |
ENDDO |
ENDDO |
215 |
WRITE(fn,'(A,I10.10)') 'dic_atmos.',myIter |
WRITE(fn,'(A,I10.10)') 'dic_atmos.',myIter |
216 |
|
|
217 |
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. |
218 |
_BARRIER |
_BARRIER |
219 |
c write values to new pickup |
c write values to new pickup |
222 |
open(iUnit,file=fn,status='new') |
open(iUnit,file=fn,status='new') |
223 |
write(iUnit,*) total_atmos_carbon, atpco2 |
write(iUnit,*) total_atmos_carbon, atpco2 |
224 |
close(iUnit) |
close(iUnit) |
225 |
|
#ifdef ALLOW_USE_MPI |
226 |
|
ENDIF |
227 |
|
#endif |
228 |
|
_END_MASTER( myThid ) |
229 |
|
|
230 |
|
|
231 |
endif |
endif |
232 |
endif |
endif |