/[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.14 - (show annotations) (download)
Mon Mar 27 22:25:44 2000 UTC (24 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint26
Changes since 1.13: +1 -4 lines
Removed unused variables and fixed some unitialized variables.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/do_the_model_io.F,v 1.13 1999/05/18 18:01:12 adcroft 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 IMPLICIT NONE
25
26 C == Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30 #include "DYNVARS.h"
31 #include "CG2D.h"
32 #ifdef ALLOW_KPP
33 #include "KPPMIX.h"
34 #endif
35
36 LOGICAL DIFFERENT_MULTIPLE
37 EXTERNAL DIFFERENT_MULTIPLE
38
39 C == Routine arguments ==
40 C myThid - Thread number for this instance of the routine.
41 C myIter - Iteration number
42 C myCurrentTime - Current time of simulation ( s )
43 INTEGER myThid
44 INTEGER myIter
45 _RL myCurrentTime
46
47 C == Local variables ==
48
49 C-- Generaly only thread 1 does IO here. It can not start until
50 C-- all threads fields are ready.
51 IF (
52 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
53 & myCurrentTime-deltaTClock)
54 & ) THEN
55
56 _BARRIER
57
58 C-- Write "text-plots" of certain fields
59 CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' ,
60 & Nr, myIter, myThid )
61 CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' ,
62 & Nr, myIter, myThid )
63 CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
64 & Nr, myIter, myThid )
65 CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' ,
66 & myIter, myThid )
67
68 #ifdef ALLOW_KPP
69 IF (KPPmixingMaps) THEN
70 CALL PLOT_FIELD_XYRL ( KPPhbl , 'KPPhbl' ,
71 & myIter, myThid )
72 CALL PLOT_FIELD_XYZRL ( KPPviscAz , 'KPPviscAz' ,
73 & Nr, myIter, myThid )
74 CALL PLOT_FIELD_XYZRL ( KPPdiffKzT, 'KPPdiffKzT',
75 & Nr, myIter, myThid )
76 CALL PLOT_FIELD_XYZRL ( KPPghat , 'KPPghat' ,
77 & Nr, myIter, myThid )
78 ENDIF
79 #endif
80
81 ENDIF
82
83 C-- Write model state to binary file
84 CALL WRITE_STATE( .FALSE., myCurrentTime, myIter, myThid )
85
86 C
87 RETURN
88 END
89

  ViewVC Help
Powered by ViewVC 1.1.22