/[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.11 - (show annotations) (download)
Fri Nov 6 22:44:45 1998 UTC (25 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint18
Changes since 1.10: +2 -2 lines
Changes to allow for atmospheric integration builds of the code

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/do_the_model_io.F,v 1.10 1998/10/28 03:11:37 cnh Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
6 C /==========================================================\
7 C | SUBROUTINE DO_THE_MODEL_IO |
8 C | o Controlling routine for IO in model main time-stepping |
9 C | loop. |
10 C |==========================================================|
11 C | Many systems do not have thread safe IO so it is easier |
12 C | to lump everything together and do dumping of fields |
13 C | and updating of forcing terms in a single place. |
14 C | The approach to IO used here is that writes are only |
15 C | performed by thread 1 and that a process only writes out |
16 C | its data ( it does not know about anyone elses data!) |
17 C | Reading on the other hand is assumed to be from a file |
18 C | containing all the data for all the processes. Only the |
19 C | portion of data of interest to this process is actually |
20 C | loaded. To work well this assumes the existence of some |
21 C | reliable tool to join datasets together at the end of a |
22 C | run - see joinds.p |
23 C \==========================================================/
24
25 C == Global variables ===
26 #include "SIZE.h"
27 #include "EEPARAMS.h"
28 #include "PARAMS.h"
29 #include "DYNVARS.h"
30 #include "CG2D.h"
31
32 LOGICAL DIFFERENT_MULTIPLE
33 EXTERNAL DIFFERENT_MULTIPLE
34
35 C == Routine arguments ==
36 C myThid - Thread number for this instance of the routine.
37 C myIter - Iteration number
38 C myCurrentTime - Current time of simulation ( s )
39 INTEGER myThid
40 INTEGER myIter
41 REAL myCurrentTime
42
43 C == Local variables ==
44 C suff - Hold suffix part of a filename
45 CHARACTER*(MAX_LEN_FNAM) suff
46
47
48 C-- Generaly only thread 1 does IO here. It can not start until
49 C-- all threads fields are ready.
50 IF (
51 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
52 & myCurrentTime-deltaTClock)
53 & ) THEN
54
55 _BARRIER
56
57 C-- Write "text-plots" of certain fields
58 CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' ,
59 & Nr, myIter, myThid )
60 CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' ,
61 & Nr, myIter, myThid )
62 CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
63 & Nr, myIter, myThid )
64 CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' ,
65 & myIter, myThid )
66
67 ENDIF
68
69 C-- Write model state to binary file
70 CALL WRITE_STATE( .FALSE., myCurrentTime, myIter, myThid )
71
72 C
73 RETURN
74 END
75

  ViewVC Help
Powered by ViewVC 1.1.22