1 |
C $Header: /u/gcmpack/MITgcm/pkg/offline/offline_model_io.F,v 1.6 2005/05/06 19:02:41 stephd Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "OFFLINE_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: OFFLINE_MODEL_IO |
8 |
C !INTERFACE: |
9 |
SUBROUTINE OFFLINE_MODEL_IO( myTime, myIter, myThid ) |
10 |
C !DESCRIPTION: \bv |
11 |
C *==========================================================* |
12 |
C | SUBROUTINE OFFLINE_MODEL_IO |
13 |
C | o Controlling routine for IO in offline model time-stepping |
14 |
C | loop. |
15 |
C *==========================================================* |
16 |
C \ev |
17 |
|
18 |
C !USES: |
19 |
IMPLICIT NONE |
20 |
C == Global variables === |
21 |
#include "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "DYNVARS.h" |
25 |
|
26 |
|
27 |
C !INPUT/OUTPUT PARAMETERS: |
28 |
C == Routine arguments == |
29 |
C myThid - Thread number for this instance of the routine. |
30 |
C myIter - Iteration number |
31 |
C myTime - Current time of simulation ( s ) |
32 |
INTEGER myThid |
33 |
INTEGER myIter |
34 |
_RL myTime |
35 |
|
36 |
CEOP |
37 |
|
38 |
C-- Write model state to binary file |
39 |
c CALL OFFLINE_STATE( myTime, myIter, myThid ) |
40 |
c |
41 |
c#ifdef ALLOW_TIMEAVE |
42 |
cC-- Do time averages |
43 |
c IF (taveFreq.GT.0. .AND. myIter.NE.nIter0 ) THEN |
44 |
cc CALL TIMEAVE_STATV_WRITE( myTime, myIter, myThid ) |
45 |
c#ifdef ALLOW_PTRACERS |
46 |
c IF ( usePTRACERS ) |
47 |
c & CALL PTRACERS_WRITE_TIMEAVE( myTime, myIter, myThid ) |
48 |
c#endif |
49 |
c ENDIF |
50 |
c#endif |
51 |
|
52 |
#ifdef ALLOW_GCHEM |
53 |
C-- Do gchem diagnostics. |
54 |
IF ( useGCHEM ) |
55 |
& CALL GCHEM_DIAGS( myTime, myIter, myThid ) |
56 |
#endif |
57 |
|
58 |
#ifdef ALLOW_PTRACERS |
59 |
C-- Do ptracer output. |
60 |
IF ( usePTRACERS ) |
61 |
& CALL PTRACERS_OUTPUT( myTime, myIter, myThid ) |
62 |
#endif |
63 |
|
64 |
RETURN |
65 |
END |