/[MITgcm]/MITgcm/model/src/do_the_model_io.F
ViewVC logotype

Contents of /MITgcm/model/src/do_the_model_io.F

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


Revision 1.21 - (show annotations) (download)
Tue May 29 14:01:37 2001 UTC (23 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint40pre2, checkpoint40pre4, checkpoint40pre5, checkpoint40
Changes since 1.20: +6 -2 lines
Merge from branch pre38:
 o essential mods for cubed sphere
 o debugged atmosphere, dynamcis + physics (aim)
 o new packages (mom_vecinv, mom_fluxform, ...)

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/do_the_model_io.F,v 1.19.2.1 2001/04/05 15:16:38 jamous Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
7 C /==========================================================\
8 C | SUBROUTINE DO_THE_MODEL_IO |
9 C | o Controlling routine for IO in model main time-stepping |
10 C | loop. |
11 C |==========================================================|
12 C | Many systems do not have thread safe IO so it is easier |
13 C | to lump everything together and do dumping of fields |
14 C | and updating of forcing terms in a single place. |
15 C | The approach to IO used here is that writes are only |
16 C | performed by thread 1 and that a process only writes out |
17 C | its data ( it does not know about anyone elses data!) |
18 C | Reading on the other hand is assumed to be from a file |
19 C | containing all the data for all the processes. Only the |
20 C | portion of data of interest to this process is actually |
21 C | loaded. To work well this assumes the existence of some |
22 C | reliable tool to join datasets together at the end of a |
23 C | run - see joinds.p |
24 C \==========================================================/
25 IMPLICIT NONE
26
27 C == Global variables ===
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "DYNVARS.h"
32
33 LOGICAL DIFFERENT_MULTIPLE
34 EXTERNAL DIFFERENT_MULTIPLE
35
36 C == Routine arguments ==
37 C myThid - Thread number for this instance of the routine.
38 C myIter - Iteration number
39 C myCurrentTime - Current time of simulation ( s )
40 INTEGER myThid
41 INTEGER myIter
42 _RL myCurrentTime
43
44 C == Local variables ==
45
46 C-- Generaly only thread 1 does IO here. It can not start until
47 C-- all threads fields are ready.
48 IF (
49 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
50 & myCurrentTime-deltaTClock)
51 & ) THEN
52
53 _BARRIER
54
55 C-- Write "text-plots" of certain fields
56 CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' ,
57 & Nr, myIter, myThid )
58 CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' ,
59 & Nr, myIter, myThid )
60 CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
61 & Nr, myIter, myThid )
62 CALL PLOT_FIELD_XYRL( etaN , 'Current etaN ' ,
63 & myIter, myThid )
64
65 ENDIF
66
67 C-- Write model state to binary file
68 CALL WRITE_STATE( myCurrentTime, myIter, myThid )
69
70 #ifdef ALLOW_TIMEAVE
71 C-- Do time averages
72 IF (taveFreq.GT.0.) THEN
73 CALL TIMEAVE_STATV_WRITE( myCurrentTime, myIter, myThid )
74 #ifdef ALLOW_AIM
75 IF (useAIM)
76 & CALL AIM_WRITE_DIAGS( myCurrentTime, myIter, myThid )
77 #endif
78 ENDIF
79 #endif
80
81 #ifdef ALLOW_GMREDI
82 C-- Do KPP diagnostics.
83 IF (useGMRedi)
84 & CALL GMREDI_DIAGS( myCurrentTime, myIter, myThid )
85 #endif
86
87 #ifdef ALLOW_KPP
88 C-- Do KPP diagnostics.
89 IF (useKPP)
90 & CALL KPP_DO_DIAGS( myCurrentTime, myIter, myThid )
91 #endif
92
93 RETURN
94 END
95

  ViewVC Help
Powered by ViewVC 1.1.22