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

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

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


Revision 1.2 - (show annotations) (download)
Fri Apr 24 02:05:42 1998 UTC (26 years, 1 month ago) by cnh
Branch: MAIN
CVS Tags: redigm, checkpoint1, kloop1, kloop2
Changes since 1.1: +1 -1 lines
Further $Id to $Header conversions

1 C $Header: plot_field.F,v 1.1.1.1 1998/04/22 19:15:30 cnh Exp $
2
3 #include "CPP_EEOPTIONS.h"
4
5 C-- File plot_field.F: Routines for "formatted" I/O in the MITgcm UV
6 C-- implementation.
7 C-- Contents
8 C-- o plot_field_xyr4 - Writes a XY Real*4 field
9 C-- o plot_field_xyr8 - Writes a XY Real*8 field
10 C-- o plot_field_xyzr4 - Writes a XYZ Real*4 field
11 C-- o plot_field_xyzr8 - Writes a XYZ Real*8 field
12 SUBROUTINE PLOT_FIELD_XYR4(
13 I fld, fldNam , myIter, myThid )
14
15 C /==========================================================\
16 C | SUBROUTINE PLOT_FIELD_XYR4 |
17 C | Print out an XY Real 4 field using text map. |
18 C |==========================================================|
19 C | This routine references "numerical model" parameters like|
20 C | like the integration time. It uses these to create a |
21 C | title for the field before calling a generic execution |
22 C | environment support routine. |
23 C | This routine can also be edited to cause only some region|
24 C | of a field to be printed by default, or every other |
25 C | point etc.. |
26 C | Other plot formats can also be substituted here. |
27 C \==========================================================/
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "CG2D.h"
32
33 C == Routine arguments ==
34 C fld - Field to plot
35 C fldNam - Name of field
36 C myIter - Iteration number for plot
37 C myThid - Thread id of thread instance calling plot_field
38 Real*4 fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
39 CHARACTER*(*) fldNam
40 INTEGER myThid
41 INTEGER myIter
42
43 C == Local variables ==
44 CHARACTER*(MAX_LEN_MBUF) fldTitle
45 INTEGER iStart, iEnd, iStride
46 INTEGER jStart, jEnd, jStride
47 INTEGER kStart, kEnd, kStride
48 INTEGER biStart, biEnd, biStride
49 INTEGER bjStart, bjEnd, bjStride
50
51 C-- To get around synchronisation and multi-threaded I/O issues
52 C-- thread 1 will do all the writes.
53 IF ( myThid .EQ. 1 ) THEN
54 C-- Form name for identifying "plot"
55 IF ( myIter .GE. 0 ) THEN
56 WRITE(fldTitle,'(A,A,A,I4)') '// Field ', fldNam, ' at iteration ',
57 & myIter
58 ELSE
59 WRITE(fldTitle,'(A,A)') '// Field ', fldNam
60 ENDIF
61 C-- Do "plot" using textual contour map "execution environment" routine
62 C Substitute other plotting utilities here!
63 iStart = 1-OLx
64 iEnd = sNx+OLx
65 iStride = 1
66 jStart = sNy+OLy
67 jEnd = 1-OLy
68 jStride = -1
69 kStart = 1
70 kEnd = 1
71 kStride = 1
72 biStart = 1
73 biEnd = nSx
74 biStride = 1
75 bjStart = nSy
76 bjEnd = 1
77 bjStride = -1
78 CALL PRINT_MAPR4(
79 I fld, fldTitle, PRINT_MAP_XY,
80 I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,1, nSx, nSy,
81 I iStart, iEnd, iStride,
82 I jStart, jEnd, jStride,
83 I kStart, kEnd, kStride,
84 I biStart, biEnd, biStride,
85 I bjStart, bjEnd, bjStride )
86 ENDIF
87
88 RETURN
89 END
90 SUBROUTINE PLOT_FIELD_XYR8(
91 I fld, fldNam , myIter, myThid )
92
93 C /==========================================================\
94 C | SUBROUTINE PLOT_FIELD_XYR8 |
95 C | Print out an XY Real 8 field using text map. |
96 C |==========================================================|
97 C | This routine references "numerical model" parameters like|
98 C | like the integration time. It uses these to create a |
99 C | title for the field before calling a generic execution |
100 C | environment support routine. |
101 C | This routine can also be edited to cause only some region|
102 C | of a field to be printed by default, or every other |
103 C | point etc.. |
104 C | Other plot formats can also be substituted here. |
105 C \==========================================================/
106 #include "SIZE.h"
107 #include "EEPARAMS.h"
108 #include "PARAMS.h"
109 #include "CG2D.h"
110
111 C == Routine arguments ==
112 C fld - Field to plot
113 C fldNam - Name of field
114 C myIter - Iteration number for plot
115 C myThid - Thread id of thread instance calling plot_field
116 REAL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
117 CHARACTER*(*) fldNam
118 INTEGER myThid
119 INTEGER myIter
120
121 C == Local variables ==
122 CHARACTER*(MAX_LEN_MBUF) fldTitle
123 INTEGER iStart, iEnd, iStride
124 INTEGER jStart, jEnd, jStride
125 INTEGER kStart, kEnd, kStride
126 INTEGER biStart, biEnd, biStride
127 INTEGER bjStart, bjEnd, bjStride
128
129 C-- To get around synchronisation and multi-threaded I/O issues
130 C-- thread 1 will do all the writes.
131 IF ( myThid .EQ. 1 ) THEN
132 C-- Form name for identifying "plot"
133 IF ( myIter .GE. 0 ) THEN
134 WRITE(fldTitle,'(A,A,A,I4)') '// Field ', fldNam, ' at iteration ',
135 & myIter
136 ELSE
137 WRITE(fldTitle,'(A,A)') '// Field ', fldNam
138 ENDIF
139 C-- Do "plot" using textual contour map "execution environment" routine
140 C Substitute other plotting utilities here!
141 iStart = 1-OLx
142 iEnd = sNx+OLx
143 iStride = 1
144 jStart = sNy+OLy
145 jEnd = 1-OLy
146 jStride = -1
147 kStart = 1
148 kEnd = 1
149 kStride = 1
150 biStart = 1
151 biEnd = nSx
152 biStride = 1
153 bjStart = nSy
154 bjEnd = 1
155 bjStride = -1
156 CALL PRINT_MAPR8(
157 I fld, fldTitle, PRINT_MAP_XY,
158 I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,1, nSx, nSy,
159 I iStart, iEnd, iStride,
160 I jStart, jEnd, jStride,
161 I kStart, kEnd, kStride,
162 I biStart, biEnd, biStride,
163 I bjStart, bjEnd, bjStride )
164 ENDIF
165
166 RETURN
167 END
168 SUBROUTINE PLOT_FIELD_XYZR4(
169 I fld, fldNam , fldNz, myIter, myThid )
170
171 C /==========================================================\
172 C | SUBROUTINE PLOT_FIELD_XYZR4 |
173 C | Print out an XYZ Real 4 field using text map. |
174 C |==========================================================|
175 C | This routine references "numerical model" parameters like|
176 C | like the integration time. It uses these to create a |
177 C | title for the field before calling a generic execution |
178 C | environment support routine. |
179 C | This routine can also be edited to cause only some region|
180 C | of a field to be printed by default, or every other |
181 C | point etc.. |
182 C | Other plot formats can also be substituted here. |
183 C \==========================================================/
184 #include "SIZE.h"
185 #include "EEPARAMS.h"
186 #include "PARAMS.h"
187 #include "CG2D.h"
188
189 C == Routine arguments ==
190 C fld - Field to plot
191 C fldNam - Name of field
192 C fldNz - No. of layers in the vertical
193 C (Different fields may have different vertical extents)
194 C (Under the present implementation all fields have the)
195 C (same lateral extents. )
196 C myIter - Iteration number for plot
197 C myThid - Thread id of thread instance calling plot_field
198 INTEGER fldNz
199 Real*4 fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
200 CHARACTER*(*) fldNam
201 INTEGER myThid
202 INTEGER myIter
203
204 C == Local variables ==
205 CHARACTER*(MAX_LEN_MBUF) fldTitle
206 INTEGER iStart, iEnd, iStride
207 INTEGER jStart, jEnd, jStride
208 INTEGER kStart, kEnd, kStride
209 INTEGER biStart, biEnd, biStride
210 INTEGER bjStart, bjEnd, bjStride
211
212 C-- To get around synchronisation and multi-threaded I/O issues
213 C-- thread 1 will do all the writes.
214 IF ( myThid .EQ. 1 ) THEN
215 C-- Form name for identifying "plot"
216 IF ( myIter .GE. 0 ) THEN
217 WRITE(fldTitle,'(A,A,A,I4)') '// Field ', fldNam, ' at iteration ',
218 & myIter
219 ELSE
220 WRITE(fldTitle,'(A,A)') '// Field ', fldNam
221 ENDIF
222 C-- Do "plot" using textual contour map "execution environment" routine
223 C Substitute other plotting utilities here!
224 iStart = 1-OLx
225 iEnd = sNx+OLx
226 C iStart = 1
227 C iEnd = sNx
228 iStride = 1
229 jStart = sNy+OLy
230 jEnd = 1-OLy
231 C jStart = sNy
232 C jEnd = 1
233 jStride = -1
234 kStart = 1
235 kEnd = fldNz
236 C kEnd = 1
237 kStride = 1
238 biStart = 1
239 biEnd = nSx
240 biStride = 1
241 bjStart = nSy
242 bjEnd = 1
243 bjStride = -1
244 C CALL PRINT_MAPR8(
245 C I fld, fldTitle, PRINT_MAP_YZ,
246 C I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz, nSx, nSy,
247 C I iStart, iEnd, iStride,
248 C I jStart, jEnd, jStride,
249 C I kStart, kEnd, kStride,
250 C I biStart, biEnd, biStride,
251 C I bjStart, bjEnd, bjStride )
252 CALL PRINT_MAPR4(
253 I fld, fldTitle, PRINT_MAP_XY,
254 I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz, nSx, nSy,
255 I iStart, iEnd, iStride,
256 I jStart, jEnd, jStride,
257 I kStart, kEnd, kStride,
258 I biStart, biEnd, biStride,
259 I bjStart, bjEnd, bjStride )
260 ENDIF
261
262 RETURN
263 END
264 SUBROUTINE PLOT_FIELD_XYZR8(
265 I fld, fldNam , fldNz, myIter, myThid )
266
267 C /==========================================================\
268 C | SUBROUTINE PLOT_FIELD_XYZR8 |
269 C | Print out an XYZ Real 8 field using text map. |
270 C |==========================================================|
271 C | This routine references "numerical model" parameters like|
272 C | like the integration time. It uses these to create a |
273 C | title for the field before calling a generic execution |
274 C | environment support routine. |
275 C | This routine can also be edited to cause only some region|
276 C | of a field to be printed by default, or every other |
277 C | point etc.. |
278 C | Other plot formats can also be substituted here. |
279 C \==========================================================/
280 #include "SIZE.h"
281 #include "EEPARAMS.h"
282 #include "PARAMS.h"
283 #include "CG2D.h"
284
285 C == Routine arguments ==
286 C fld - Field to plot
287 C fldNam - Name of field
288 C fldNz - No. of layers in the vertical
289 C (Different fields may have different vertical extents)
290 C (Under the present implementation all fields have the)
291 C (same lateral extents. )
292 C myIter - Iteration number for plot
293 C myThid - Thread id of thread instance calling plot_field
294 INTEGER fldNz
295 REAL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
296 CHARACTER*(*) fldNam
297 INTEGER myThid
298 INTEGER myIter
299
300 C == Local variables ==
301 CHARACTER*(MAX_LEN_MBUF) fldTitle
302 INTEGER iStart, iEnd, iStride
303 INTEGER jStart, jEnd, jStride
304 INTEGER kStart, kEnd, kStride
305 INTEGER biStart, biEnd, biStride
306 INTEGER bjStart, bjEnd, bjStride
307
308 C-- To get around synchronisation and multi-threaded I/O issues
309 C-- thread 1 will do all the writes.
310 IF ( myThid .EQ. 1 ) THEN
311 C-- Form name for identifying "plot"
312 IF ( myIter .GE. 0 ) THEN
313 WRITE(fldTitle,'(A,A,A,I4)') '// Field ', fldNam, ' at iteration ',
314 & myIter
315 ELSE
316 WRITE(fldTitle,'(A,A)') '// Field ', fldNam
317 ENDIF
318 C-- Do "plot" using textual contour map "execution environment" routine
319 C Substitute other plotting utilities here!
320 iStart = 1-OLx
321 iEnd = sNx+OLx
322 C iStart = 1
323 C iEnd = sNx
324 iStride = 1
325 jStart = sNy+OLy
326 jEnd = 1-OLy
327 C jStart = sNy
328 C jEnd = 1
329 jStride = -1
330 kStart = 1
331 kEnd = fldNz
332 kEnd = 1
333 kStride = 1
334 biStart = 1
335 biEnd = nSx
336 biStride = 1
337 bjStart = nSy
338 bjEnd = 1
339 bjStride = -1
340 C CALL PRINT_MAPR8(
341 C I fld, fldTitle, PRINT_MAP_YZ,
342 C I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz, nSx, nSy,
343 C I iStart, iEnd, iStride,
344 C I jStart, jEnd, jStride,
345 C I kStart, kEnd, kStride,
346 C I biStart, biEnd, biStride,
347 C I bjStart, bjEnd, bjStride )
348 CALL PRINT_MAPR8(
349 I fld, fldTitle, PRINT_MAP_XY,
350 I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz, nSx, nSy,
351 I iStart, iEnd, iStride,
352 I jStart, jEnd, jStride,
353 I kStart, kEnd, kStride,
354 I biStart, biEnd, biStride,
355 I bjStart, bjEnd, bjStride )
356 ENDIF
357
358 RETURN
359 END
360

  ViewVC Help
Powered by ViewVC 1.1.22