| 1 |
ce107 |
1.1 |
C-- File plot_field.F: Routines for "formatted" I/O in the MITgcm UV |
| 2 |
|
|
C-- implementation. |
| 3 |
|
|
C-- Contents |
| 4 |
|
|
C-- o plot_field_xyr8 - Writes a XY Real*8 field |
| 5 |
|
|
SUBROUTINE PLOT_FIELD_XYR8( |
| 6 |
|
|
I fld, fldNam) |
| 7 |
|
|
|
| 8 |
|
|
C /==========================================================\ |
| 9 |
|
|
C | SUBROUTINE PLOT_FIELD_XYR8 | |
| 10 |
|
|
C | Print out an XY Real 8 field using text map. | |
| 11 |
|
|
C |==========================================================| |
| 12 |
|
|
C | This routine references "numerical model" parameters like| |
| 13 |
|
|
C | like the integration time. It uses these to create a | |
| 14 |
|
|
C | title for the field before calling a generic execution | |
| 15 |
|
|
C | environment support routine. | |
| 16 |
|
|
C | This routine can also be edited to cause only some region| |
| 17 |
|
|
C | of a field to be printed by default, or every other | |
| 18 |
|
|
C | point etc.. | |
| 19 |
|
|
C | Other plot formats can also be substituted here. | |
| 20 |
|
|
C \==========================================================/ |
| 21 |
|
|
#include "SIZE.h" |
| 22 |
|
|
#include "EEPARAMS.h" |
| 23 |
|
|
#include "PARAMS.h" |
| 24 |
|
|
#include "CG2D.h" |
| 25 |
|
|
|
| 26 |
|
|
C == Routine arguments == |
| 27 |
|
|
REAL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
| 28 |
|
|
CHARACTER*(*) fldNam |
| 29 |
|
|
INTEGER myThid |
| 30 |
|
|
|
| 31 |
|
|
C == Local variables == |
| 32 |
|
|
CHARACTER*(MAX_LEN_MBUF) fldTitle |
| 33 |
|
|
INTEGER iStart, iEnd, iStride |
| 34 |
|
|
INTEGER jStart, jEnd, jStride |
| 35 |
|
|
INTEGER kStart, kEnd, kStride |
| 36 |
|
|
INTEGER biStart, biEnd, biStride |
| 37 |
|
|
INTEGER bjStart, bjEnd, bjStride |
| 38 |
|
|
|
| 39 |
|
|
C-- Form name for identifying "plot" |
| 40 |
|
|
WRITE(fldTitle,'(A,A,A,I4)') ' Field ', fldNam, ' at iteration ', |
| 41 |
|
|
& nIter |
| 42 |
|
|
C-- Do "plot" using textual contour map "execution environment" routine |
| 43 |
|
|
C Substitute other plotting utilities here! |
| 44 |
|
|
iStart = 1-OLx |
| 45 |
|
|
iEnd = sNx+OLx |
| 46 |
|
|
iStride = 1 |
| 47 |
|
|
jStart = sNy+OLy |
| 48 |
|
|
jEnd = 1-OLy |
| 49 |
|
|
jStride = -1 |
| 50 |
|
|
kStart = 1 |
| 51 |
|
|
kEnd = 1 |
| 52 |
|
|
kStride = 1 |
| 53 |
|
|
biStart = 1 |
| 54 |
|
|
biEnd = 1 |
| 55 |
|
|
biStride = 1 |
| 56 |
|
|
bjStart = 1 |
| 57 |
|
|
bjEnd = 1 |
| 58 |
|
|
bjStride = -1 |
| 59 |
|
|
CALL PRINT_MAPR8( |
| 60 |
|
|
I fld, fldTitle, |
| 61 |
|
|
I 1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,1, 1, 1, |
| 62 |
|
|
I iStart, iEnd, iStride, |
| 63 |
|
|
I jStart, jEnd, jStride, |
| 64 |
|
|
I kStart, kEnd, kStride, |
| 65 |
|
|
I biStart, biEnd, biStride, |
| 66 |
|
|
I bjStart, bjEnd, bjStride ) |
| 67 |
|
|
|
| 68 |
|
|
RETURN |
| 69 |
|
|
END |
| 70 |
|
|
|