Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:45:32 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
1f5306338f Chri*0001 #include "CPP_OPTIONS.h"
                0002 
                0003 C--   File plot_field.F: Routines for "formatted" I/O in the MITgcm UV 
                0004 C--                      implementation.
                0005 C--    Contents
                0006 C--    o plot_field_xyrs  - Writes a XY  _RS field
                0007 C--    o plot_field_xyrl  - Writes a XY  _RL field
                0008 C--    o plot_field_xyzrs - Writes a XYZ _RS field
                0009 C--    o plot_field_xyzrl - Writes a XYZ _RL field
                0010       SUBROUTINE PLOT_FIELD_XYRS( 
                0011      I                            fld, fldNam , myIter, myThid )
                0012 
                0013 C     /==========================================================\
                0014 C     | SUBROUTINE PLOT_FIELD_XYRS                               |
                0015 C     | Print out an XY _RS field using text map.                |
                0016 C     |==========================================================|
                0017 C     | This routine references "numerical model" parameters like|
                0018 C     | like the integration time. It uses these to create a     |
                0019 C     | title for the field before calling a generic execution   |
                0020 C     | environment support routine.                             |
                0021 C     | This routine can also be edited to cause only some region|
                0022 C     | of a field to be printed by default, or every other      |
                0023 C     | point etc..                                              |
                0024 C     | Other plot formats can also be substituted here.         |
                0025 C     | _RS is usually REAL*4                                    |
                0026 C     \==========================================================/
                0027       IMPLICIT NONE
                0028 
                0029 #include "SIZE.h"
                0030 #include "EEPARAMS.h"
                0031 #include "PARAMS.h"
                0032 
                0033 C     == Routine arguments ==
                0034 C     fld - Field to plot
                0035 C     fldNam - Name of field
                0036 C     myIter - Iteration number for plot
                0037 C     myThid - Thread id of thread instance calling plot_field
                0038       _RS fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0039       CHARACTER*(*) fldNam
                0040       INTEGER myThid
                0041       INTEGER myIter
                0042 
                0043 C     == Local variables ==
                0044       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0045       INTEGER iStart, iEnd, iStride
                0046       INTEGER jStart, jEnd, jStride
                0047       INTEGER kStart, kEnd, kStride
                0048       INTEGER biStart, biEnd, biStride
                0049       INTEGER bjStart, bjEnd, bjStride
                0050 
                0051 C     Temp for per tile plot looping
                0052       INTEGER bi ,bj
                0053 
                0054 C--   To get around synchronisation and multi-threaded I/O issues
                0055 C--   thread 1 will do all the writes.
                0056       _BARRIER
                0057       IF ( myThid .EQ. 1 ) THEN
                0058 C--    Form name for identifying "plot"
                0059        IF ( myIter .GE. 0 ) THEN
                0060         WRITE(fldTitle,'(A,A,A,I10)') 
                0061      &  '// Field ', fldNam, ' at iteration ',
                0062      &  myIter
                0063        ELSE
                0064         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0065        ENDIF
                0066 C--    Do "plot" using textual contour map "execution environment" routine
                0067 C      Substitute other plotting utilities here!
                0068        DO bj=1,nSy
                0069         DO bi=1,nSx
                0070          iStart   =  1-OLx
                0071          iEnd     =  sNx+OLx
                0072          iStride  =  1
                0073          jStart   =  sNy+OLy
                0074          jEnd     =  1-OLy
                0075          jStride  = -1
                0076          kStart   =  1
                0077          kEnd     =  1
                0078          kStride  =  1
                0079          biStart  =  bi
                0080          biEnd    =  bi
                0081          biStride =  1
                0082          bjStart  =  bj
                0083          bjEnd    =  bj   
                0084          bjStride = -1
                0085          WRITE(fldTitle,'(A,A,A,I6,A,I10)') 
                0086      &   '// Field ', fldNam, 
                0087      &   ' tile ',  bi,
                0088      &   ' at iteration ',  myIter
                0089          CALL PRINT_MAPRS(
                0090      I          fld, fldTitle, PRINT_MAP_XY,
                0091      I           1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,1,  nSx,  nSy,
                0092      I           iStart,   iEnd,  iStride,
                0093      I           jStart,   jEnd,  jStride,
                0094      I           kStart,   kEnd,  kStride,
                0095      I          biStart,  biEnd, biStride,
                0096      I          bjStart,  bjEnd, bjStride )
                0097         ENDDO
                0098        ENDDO
                0099       ENDIF
                0100       _BARRIER
                0101 
                0102       RETURN
                0103       END
                0104       SUBROUTINE PLOT_FIELD_XYRL( 
                0105      I                            fld, fldNam , myIter, myThid )
                0106 
                0107 C     /==========================================================\
                0108 C     | SUBROUTINE PLOT_FIELD_XYRL                               |
                0109 C     | Print out an XY _RL field using text map.                |
                0110 C     |==========================================================|
                0111 C     | This routine references "numerical model" parameters like|
                0112 C     | like the integration time. It uses these to create a     |
                0113 C     | title for the field before calling a generic execution   |
                0114 C     | environment support routine.                             |
                0115 C     | This routine can also be edited to cause only some region|
                0116 C     | of a field to be printed by default, or every other      |
                0117 C     | point etc..                                              |
                0118 C     | Other plot formats can also be substituted here.         |
                0119 C     | _RL is usually REAL*8                                    |
                0120 C     \==========================================================/
                0121       IMPLICIT NONE
                0122 
                0123 #include "SIZE.h"
                0124 #include "EEPARAMS.h"
                0125 #include "PARAMS.h"
                0126 
                0127 C     == Routine arguments ==
                0128 C     fld - Field to plot
                0129 C     fldNam - Name of field
                0130 C     myIter - Iteration number for plot
                0131 C     myThid - Thread id of thread instance calling plot_field
                0132       _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0133       CHARACTER*(*) fldNam
                0134       INTEGER myThid
                0135       INTEGER myIter
                0136 
                0137 C     == Local variables ==
                0138       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0139       INTEGER iStart, iEnd, iStride
                0140       INTEGER jStart, jEnd, jStride
                0141       INTEGER kStart, kEnd, kStride
                0142       INTEGER biStart, biEnd, biStride
                0143       INTEGER bjStart, bjEnd, bjStride
                0144 
                0145 C     Temps for plot that loops over tiles
                0146       INTEGER bi, bj
                0147 
                0148 C--   To get around synchronisation and multi-threaded I/O issues
                0149 C--   thread 1 will do all the writes.
                0150       _BARRIER
                0151       IF ( myThid .EQ. 1 ) THEN
                0152 C--    Form name for identifying "plot"
                0153        IF ( myIter .GE. 0 ) THEN
                0154         WRITE(fldTitle,'(A,A,A,I10)') 
                0155      &  '// Field ', fldNam, ' at iteration ',
                0156      &  myIter
                0157        ELSE
                0158         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0159        ENDIF
                0160 C--    Do "plot" using textual contour map "execution environment" routine
                0161 C      Substitute other plotting utilities here!
                0162        DO bj=1,nSy
                0163         DO bi=1,nSx
                0164          iStart   =  1-OLx
                0165          iEnd     =  sNx+OLx
                0166          iStride  =  1
                0167          jStart   =  sNy+OLy
                0168          jEnd     =  1-OLy
                0169          jStride  = -1
                0170          kStart   =  1
                0171          kEnd     =  1
                0172          kStride  =  1
                0173          biStart  =  1
                0174          biEnd    =  bi
                0175          biStride =  1
                0176          bjStart  =  bj
                0177          bjEnd    =  1    
                0178          bjStride = -1
                0179          WRITE(fldTitle,'(A,A,A,I6,A,I10)') 
                0180      &   '// Field ', fldNam, 
                0181      &   ' tile ',  bi,
                0182      &   ' at iteration ',  myIter
                0183          CALL PRINT_MAPRL(
                0184      I          fld, fldTitle, PRINT_MAP_XY,
                0185      I         1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,1,  nSx,  nSy,
                0186      I         iStart,   iEnd,  iStride,
                0187      I         jStart,   jEnd,  jStride,
                0188      I         kStart,   kEnd,  kStride,
                0189      I        biStart,  biEnd, biStride,
                0190      I        bjStart,  bjEnd, bjStride )
                0191         ENDDO
                0192        ENDDO
                0193       ENDIF
                0194       _BARRIER
                0195 
                0196       RETURN
                0197       END
                0198       SUBROUTINE PLOT_FIELD_XYZRS( 
                0199      I                            fld, fldNam , fldNz, myIter, myThid )
                0200 
                0201 C     /==========================================================\
                0202 C     | SUBROUTINE PLOT_FIELD_XYZR4                              |
                0203 C     | Print out an XYZ _RS field using text map.               |
                0204 C     |==========================================================|
                0205 C     | This routine references "numerical model" parameters like|
                0206 C     | like the integration time. It uses these to create a     |
                0207 C     | title for the field before calling a generic execution   |
                0208 C     | environment support routine.                             |
                0209 C     | This routine can also be edited to cause only some region|
                0210 C     | of a field to be printed by default, or every other      |
                0211 C     | point etc..                                              |
                0212 C     | Other plot formats can also be substituted here.         |
                0213 C     | _RS is usually a REAL*4 field                            |
                0214 C     \==========================================================/
                0215       IMPLICIT NONE
                0216 
                0217 #include "SIZE.h"
                0218 #include "EEPARAMS.h"
                0219 #include "PARAMS.h"
                0220 
                0221 C     == Routine arguments ==
                0222 C     fld - Field to plot
                0223 C     fldNam - Name of field
                0224 C     fldNz  - No. of layers in the vertical
                0225 C              (Different fields may have different vertical extents)
                0226 C              (Under the present implementation all fields have the)
                0227 C              (same lateral extents.                               )
                0228 C     myIter - Iteration number for plot
                0229 C     myThid - Thread id of thread instance calling plot_field
                0230       INTEGER fldNz
                0231       _RS fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
                0232       CHARACTER*(*) fldNam
                0233       INTEGER myThid
                0234       INTEGER myIter
                0235 
                0236 C     == Local variables ==
                0237       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0238       INTEGER iStart, iEnd, iStride
                0239       INTEGER jStart, jEnd, jStride
                0240       INTEGER kStart, kEnd, kStride
                0241       INTEGER biStart, biEnd, biStride
                0242       INTEGER bjStart, bjEnd, bjStride
                0243 
                0244 C--   To get around synchronisation and multi-threaded I/O issues
                0245 C--   thread 1 will do all the writes.
                0246       _BARRIER
                0247       IF ( myThid .EQ. 1 ) THEN
                0248 C--    Form name for identifying "plot"
                0249        IF ( myIter .GE. 0 ) THEN
                0250         WRITE(fldTitle,'(A,A,A,I10)') 
                0251      &  '// Field ', fldNam, ' at iteration ',
                0252      &  myIter
                0253        ELSE
                0254         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0255        ENDIF
                0256 C--    Do "plot" using textual contour map "execution environment" routine
                0257 C      Substitute other plotting utilities here!
                0258        iStart   =  1-OLx
                0259        iEnd     =  sNx+OLx
                0260 C      iStart   =  1
                0261 C      iEnd     =  sNx
                0262        iStride  =  1
                0263        jStart   =  sNy+OLy
                0264        jEnd     =  1-OLy
                0265 C      jStart   =  sNy
                0266 C      jEnd     =  1
                0267        jStride  = -1
                0268        kStart   =  1
                0269 C      kEnd     =  fldNz
                0270        kEnd     =  1
                0271        kStride  =  1
                0272        biStart  =  1
                0273        biEnd    =  nSx
                0274        biStride =  1
                0275        bjStart  =  nSy
                0276        bjEnd    =  1    
                0277        bjStride = -1
                0278        CALL PRINT_MAPRS(
                0279      I        fld, fldTitle, PRINT_MAP_XY,
                0280      I         1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz,  nSx,  nSy,
                0281      I         iStart,   iEnd,  iStride,
                0282      I         jStart,   jEnd,  jStride,
                0283      I         kStart,   kEnd,  kStride,
                0284      I        biStart,  biEnd, biStride,
                0285      I        bjStart,  bjEnd, bjStride )
                0286       ENDIF
                0287       _BARRIER
                0288 
                0289       RETURN
                0290       END
                0291       SUBROUTINE PLOT_FIELD_XYZRL( 
                0292      I                            fld, fldNam , fldNz, myIter, myThid )
                0293 
                0294 C     /==========================================================\
                0295 C     | SUBROUTINE PLOT_FIELD_XYZRL                              |
                0296 C     | Print out an XYZ _RL field using text map.               |
                0297 C     |==========================================================|
                0298 C     | This routine references "numerical model" parameters like|
                0299 C     | like the integration time. It uses these to create a     |
                0300 C     | title for the field before calling a generic execution   |
                0301 C     | environment support routine.                             |
                0302 C     | This routine can also be edited to cause only some region|
                0303 C     | of a field to be printed by default, or every other      |
                0304 C     | point etc..                                              |
                0305 C     | Other plot formats can also be substituted here.         |
                0306 C     | _RL is usually a REAL*8 field                            |
                0307 C     \==========================================================/
                0308       IMPLICIT NONE
                0309 
                0310 #include "SIZE.h"
                0311 #include "EEPARAMS.h"
                0312 #include "PARAMS.h"
                0313 
                0314 C     == Routine arguments ==
                0315 C     fld - Field to plot
                0316 C     fldNam - Name of field
                0317 C     fldNz  - No. of layers in the vertical
                0318 C              (Different fields may have different vertical extents)
                0319 C              (Under the present implementation all fields have the)
                0320 C              (same lateral extents.                               )
                0321 C     myIter - Iteration number for plot
                0322 C     myThid - Thread id of thread instance calling plot_field
                0323       INTEGER fldNz
                0324       _RL fld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
                0325       CHARACTER*(*) fldNam
                0326       INTEGER myThid
                0327       INTEGER myIter
                0328 
                0329 C     == Local variables ==
                0330       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0331       INTEGER iStart, iEnd, iStride
                0332       INTEGER jStart, jEnd, jStride
                0333       INTEGER kStart, kEnd, kStride
                0334       INTEGER biStart, biEnd, biStride
                0335       INTEGER bjStart, bjEnd, bjStride
                0336 
                0337 C--   To get around synchronisation and multi-threaded I/O issues
                0338 C--   thread 1 will do all the writes.
                0339       _BARRIER
                0340       IF ( myThid .EQ. 1 ) THEN
                0341 C--    Form name for identifying "plot"
                0342        IF ( myIter .GE. 0 ) THEN
                0343         WRITE(fldTitle,'(A,A,A,I10)') 
                0344      &  '// Field ', fldNam, ' at iteration ',
                0345      &  myIter
                0346        ELSE
                0347         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0348        ENDIF
                0349 C--    Do "plot" using textual contour map "execution environment" routine
                0350 C      Substitute other plotting utilities here!
                0351        iStart   =  1-OLx
                0352        iEnd     =  sNx+OLx
                0353        iStart   =  1
                0354        iEnd     =  sNx
                0355        iStride  =  1
                0356        jStart   =  sNy+OLy
                0357        jEnd     =  1-OLy
                0358        jStart   =  sNy
                0359        jEnd     =  1
                0360        jStride  = -1
                0361        kStart   =  1
                0362        kEnd     =  fldNz
                0363        kEnd     =  1
                0364        kStride  =  1
                0365        biStart  =  1
                0366        biEnd    =  nSx
                0367        biStride =  1
                0368        bjStart  =  nSy
                0369        bjEnd    =  1    
                0370        bjStride = -1
                0371        CALL PRINT_MAPRL(
                0372      I        fld, fldTitle, PRINT_MAP_XY,
                0373      I         1-OLx,sNx+OLx,1-OLy,sNy+OLy,1,fldNz,  nSx,  nSy,
                0374      I         iStart,   iEnd,  iStride,
                0375      I         jStart,   jEnd,  jStride,
                0376      I         kStart,   kEnd,  kStride,
                0377      I        biStart,  biEnd, biStride,
                0378      I        bjStart,  bjEnd, bjStride )
                0379       ENDIF
                0380       _BARRIER
                0381 
                0382       RETURN
                0383       END
                0384 
                0385       SUBROUTINE PLOT_FIELD_XZRS( 
                0386      I                            fld, fldNam , fldNz, myIter, myThid )
                0387 
                0388 C     /==========================================================\
                0389 C     | SUBROUTINE PLOT_FIELD_XYZR4                              |
                0390 C     | Print out an XYZ _RS field using text map.               |
                0391 C     |==========================================================|
                0392 C     | This routine references "numerical model" parameters like|
                0393 C     | like the integration time. It uses these to create a     |
                0394 C     | title for the field before calling a generic execution   |
                0395 C     | environment support routine.                             |
                0396 C     | This routine can also be edited to cause only some region|
                0397 C     | of a field to be printed by default, or every other      |
                0398 C     | point etc..                                              |
                0399 C     | Other plot formats can also be substituted here.         |
                0400 C     | _RS is usually a REAL*4 field                            |
                0401 C     \==========================================================/
                0402       IMPLICIT NONE
                0403 
                0404 #include "SIZE.h"
                0405 #include "EEPARAMS.h"
                0406 #include "PARAMS.h"
                0407 
                0408 C     == Routine arguments ==
                0409 C     fld - Field to plot
                0410 C     fldNam - Name of field
                0411 C     fldNz  - No. of layers in the vertical
                0412 C              (Different fields may have different vertical extents)
                0413 C              (Under the present implementation all fields have the)
                0414 C              (same lateral extents.                               )
                0415 C     myIter - Iteration number for plot
                0416 C     myThid - Thread id of thread instance calling plot_field
                0417       INTEGER fldNz
                0418       _RS fld(1-OLx:sNx+OLx,1:fldNz,nSx,nSy)
                0419       CHARACTER*(*) fldNam
                0420       INTEGER myThid
                0421       INTEGER myIter
                0422 
                0423 C     == Local variables ==
                0424       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0425       INTEGER iStart, iEnd, iStride
                0426       INTEGER jStart, jEnd, jStride
                0427       INTEGER kStart, kEnd, kStride
                0428       INTEGER biStart, biEnd, biStride
                0429       INTEGER bjStart, bjEnd, bjStride
                0430 
                0431 C--   To get around synchronisation and multi-threaded I/O issues
                0432 C--   thread 1 will do all the writes.
                0433       _BARRIER
                0434       IF ( myThid .EQ. 1 ) THEN
                0435 C--    Form name for identifying "plot"
                0436        IF ( myIter .GE. 0 ) THEN
                0437         WRITE(fldTitle,'(A,A,A,I10)') 
                0438      &  '// Field ', fldNam, ' at iteration ',
                0439      &  myIter
                0440        ELSE
                0441         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0442        ENDIF
                0443 C--    Do "plot" using textual contour map "execution environment" routine
                0444 C      Substitute other plotting utilities here!
                0445        iStart   =  1
                0446        iEnd     =  sNx
                0447        iStride  =  1
                0448        jStart   =  1
                0449        jEnd     =  1
                0450        jStride  =  1
                0451        kStart   =  1
                0452        kEnd     =  fldNz
                0453        kStride  =  1
                0454        biStart  =  1
                0455        biEnd    =  nSx
                0456        biStride =  1
                0457        bjStart  =  nSy 
                0458        bjEnd    =  1    
                0459        bjStride = -1
                0460        CALL PRINT_MAPRS(
                0461      I        fld, fldTitle, PRINT_MAP_XZ,
                0462      I         1-OLx,sNx+OLx,1,fldNz,1,1,  nSx,  nSy,
                0463      I         iStart,   iEnd,  iStride,
                0464      I         jStart,   jEnd,  jStride,
                0465      I         kStart,   kEnd,  kStride,
                0466      I        biStart,  biEnd, biStride,
                0467      I        bjStart,  bjEnd, bjStride )
                0468       ENDIF
                0469       _BARRIER
                0470 
                0471       RETURN
                0472       END
                0473       SUBROUTINE PLOT_FIELD_XZRL( 
                0474      I                            fld, fldNam , fldNz, myIter, myThid )
                0475 
                0476 C     /==========================================================\
                0477 C     | SUBROUTINE PLOT_FIELD_XYZRL                              |
                0478 C     | Print out an XYZ _RL field using text map.               |
                0479 C     |==========================================================|
                0480 C     | This routine references "numerical model" parameters like|
                0481 C     | like the integration time. It uses these to create a     |
                0482 C     | title for the field before calling a generic execution   |
                0483 C     | environment support routine.                             |
                0484 C     | This routine can also be edited to cause only some region|
                0485 C     | of a field to be printed by default, or every other      |
                0486 C     | point etc..                                              |
                0487 C     | Other plot formats can also be substituted here.         |
                0488 C     | _RL is usually a REAL*8 field                            |
                0489 C     \==========================================================/
                0490       IMPLICIT NONE
                0491 
                0492 #include "SIZE.h"
                0493 #include "EEPARAMS.h"
                0494 #include "PARAMS.h"
                0495 
                0496 C     == Routine arguments ==
                0497 C     fld - Field to plot
                0498 C     fldNam - Name of field
                0499 C     fldNz  - No. of layers in the vertical
                0500 C              (Different fields may have different vertical extents)
                0501 C              (Under the present implementation all fields have the)
                0502 C              (same lateral extents.                               )
                0503 C     myIter - Iteration number for plot
                0504 C     myThid - Thread id of thread instance calling plot_field
                0505       INTEGER fldNz
                0506       _RL fld(1-OLx:sNx+OLx,1:fldNz,nSx,nSy)
                0507       CHARACTER*(*) fldNam
                0508       INTEGER myThid
                0509       INTEGER myIter
                0510 
                0511 C     == Local variables ==
                0512       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0513       INTEGER iStart, iEnd, iStride
                0514       INTEGER jStart, jEnd, jStride
                0515       INTEGER kStart, kEnd, kStride
                0516       INTEGER biStart, biEnd, biStride
                0517       INTEGER bjStart, bjEnd, bjStride
                0518 
                0519 C--   To get around synchronisation and multi-threaded I/O issues
                0520 C--   thread 1 will do all the writes.
                0521       _BARRIER
                0522       IF ( myThid .EQ. 1 ) THEN
                0523 C--    Form name for identifying "plot"
                0524        IF ( myIter .GE. 0 ) THEN
                0525         WRITE(fldTitle,'(A,A,A,I10)') 
                0526      &  '// Field ', fldNam, ' at iteration ',
                0527      &  myIter
                0528        ELSE
                0529         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0530        ENDIF
                0531 C--    Do "plot" using textual contour map "execution environment" routine
                0532 C      Substitute other plotting utilities here!
                0533        iStart   =  1
                0534        iEnd     =  sNx
                0535        iStride  =  1
                0536        jStart   =  1
                0537        jEnd     =  1
                0538        jStride  = -1
                0539        kStart   =  1
                0540        kEnd     =  fldNz
                0541 c      kEnd     =  1
                0542        kStride  =  1
                0543        biStart  =  1
                0544        biEnd    =  nSx
                0545        biStride =  1
                0546        bjStart  =  nSy
                0547        bjEnd    =  1    
                0548        bjStride = -1
                0549        CALL PRINT_MAPRL(
                0550      I        fld, fldTitle, PRINT_MAP_XZ,
                0551      I         1-OLx,sNx+OLx,1,1,1,fldNz,  nSx,  nSy,
                0552      I         iStart,   iEnd,  iStride,
                0553      I         jStart,   jEnd,  jStride,
                0554      I         kStart,   kEnd,  kStride,
                0555      I        biStart,  biEnd, biStride,
                0556      I        bjStart,  bjEnd, bjStride )
                0557       ENDIF
                0558       _BARRIER
                0559 
                0560       RETURN
                0561       END
                0562 
                0563       SUBROUTINE PLOT_FIELD_YZRS( 
                0564      I                            fld, fldNam , fldNz, myIter, myThid )
                0565 
                0566 C     /==========================================================\
                0567 C     | SUBROUTINE PLOT_FIELD_XYZR4                              |
                0568 C     | Print out an XYZ _RS field using text map.               |
                0569 C     |==========================================================|
                0570 C     | This routine references "numerical model" parameters like|
                0571 C     | like the integration time. It uses these to create a     |
                0572 C     | title for the field before calling a generic execution   |
                0573 C     | environment support routine.                             |
                0574 C     | This routine can also be edited to cause only some region|
                0575 C     | of a field to be printed by default, or every other      |
                0576 C     | point etc..                                              |
                0577 C     | Other plot formats can also be substituted here.         |
                0578 C     | _RS is usually a REAL*4 field                            |
                0579 C     \==========================================================/
                0580       IMPLICIT NONE
                0581 
                0582 #include "SIZE.h"
                0583 #include "EEPARAMS.h"
                0584 #include "PARAMS.h"
                0585 
                0586 C     == Routine arguments ==
                0587 C     fld - Field to plot
                0588 C     fldNam - Name of field
                0589 C     fldNz  - No. of layers in the vertical
                0590 C              (Different fields may have different vertical extents)
                0591 C              (Under the present implementation all fields have the)
                0592 C              (same lateral extents.                               )
                0593 C     myIter - Iteration number for plot
                0594 C     myThid - Thread id of thread instance calling plot_field
                0595       INTEGER fldNz
                0596       _RS fld(1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
                0597       CHARACTER*(*) fldNam
                0598       INTEGER myThid
                0599       INTEGER myIter
                0600 
                0601 C     == Local variables ==
                0602       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0603       INTEGER iStart, iEnd, iStride
                0604       INTEGER jStart, jEnd, jStride
                0605       INTEGER kStart, kEnd, kStride
                0606       INTEGER biStart, biEnd, biStride
                0607       INTEGER bjStart, bjEnd, bjStride
                0608 
                0609 C--   To get around synchronisation and multi-threaded I/O issues
                0610 C--   thread 1 will do all the writes.
                0611       _BARRIER
                0612       IF ( myThid .EQ. 1 ) THEN
                0613 C--    Form name for identifying "plot"
                0614        IF ( myIter .GE. 0 ) THEN
                0615         WRITE(fldTitle,'(A,A,A,I10)') 
                0616      &  '// Field ', fldNam, ' at iteration ',
                0617      &  myIter
                0618        ELSE
                0619         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0620        ENDIF
                0621 C--    Do "plot" using textual contour map "execution environment" routine
                0622 C      Substitute other plotting utilities here!
                0623        iStart   =  1
                0624        iEnd     =  1
                0625        iStride  =  1
                0626        jStart   =  sNy
                0627        jEnd     =  1
                0628        jStride  = -1
                0629        kStart   =  1
                0630        kEnd     =  fldNz
                0631 C      kEnd     =  1
                0632        kStride  =  1
                0633        biStart  =  1
                0634        biEnd    =  nSx 
                0635        biStride =  1
                0636        bjStart  =  nSy
                0637        bjEnd    =  1    
                0638        bjStride = -1
                0639        CALL PRINT_MAPRS(
                0640      I        fld, fldTitle, PRINT_MAP_YZ,
                0641      I         1,1,1-OLy,sNy+OLy,1,fldNz,  nSx,  nSy,
                0642      I         iStart,   iEnd,  iStride,
                0643      I         jStart,   jEnd,  jStride,
                0644      I         kStart,   kEnd,  kStride,
                0645      I        biStart,  biEnd, biStride,
                0646      I        bjStart,  bjEnd, bjStride )
                0647       ENDIF
                0648       _BARRIER
                0649 
                0650       RETURN
                0651       END
                0652       SUBROUTINE PLOT_FIELD_YZRL( 
                0653      I                            fld, fldNam , fldNz, myIter, myThid )
                0654 
                0655 C     /==========================================================\
                0656 C     | SUBROUTINE PLOT_FIELD_XYZRL                              |
                0657 C     | Print out an XYZ _RL field using text map.               |
                0658 C     |==========================================================|
                0659 C     | This routine references "numerical model" parameters like|
                0660 C     | like the integration time. It uses these to create a     |
                0661 C     | title for the field before calling a generic execution   |
                0662 C     | environment support routine.                             |
                0663 C     | This routine can also be edited to cause only some region|
                0664 C     | of a field to be printed by default, or every other      |
                0665 C     | point etc..                                              |
                0666 C     | Other plot formats can also be substituted here.         |
                0667 C     | _RL is usually a REAL*8 field                            |
                0668 C     \==========================================================/
                0669       IMPLICIT NONE
                0670 
                0671 #include "SIZE.h"
                0672 #include "EEPARAMS.h"
                0673 #include "PARAMS.h"
                0674 
                0675 C     == Routine arguments ==
                0676 C     fld - Field to plot
                0677 C     fldNam - Name of field
                0678 C     fldNz  - No. of layers in the vertical
                0679 C              (Different fields may have different vertical extents)
                0680 C              (Under the present implementation all fields have the)
                0681 C              (same lateral extents.                               )
                0682 C     myIter - Iteration number for plot
                0683 C     myThid - Thread id of thread instance calling plot_field
                0684       INTEGER fldNz
                0685       _RL fld(1-OLy:sNy+OLy,1:fldNz,nSx,nSy)
                0686       CHARACTER*(*) fldNam
                0687       INTEGER myThid
                0688       INTEGER myIter
                0689 
                0690 C     == Local variables ==
                0691       CHARACTER*(MAX_LEN_MBUF) fldTitle
                0692       INTEGER iStart, iEnd, iStride
                0693       INTEGER jStart, jEnd, jStride
                0694       INTEGER kStart, kEnd, kStride
                0695       INTEGER biStart, biEnd, biStride
                0696       INTEGER bjStart, bjEnd, bjStride
                0697 
                0698 C--   To get around synchronisation and multi-threaded I/O issues
                0699 C--   thread 1 will do all the writes.
                0700       _BARRIER
                0701       IF ( myThid .EQ. 1 ) THEN
                0702 C--    Form name for identifying "plot"
                0703        IF ( myIter .GE. 0 ) THEN
                0704         WRITE(fldTitle,'(A,A,A,I10)') 
                0705      &  '// Field ', fldNam, ' at iteration ',
                0706      &  myIter
                0707        ELSE
                0708         WRITE(fldTitle,'(A,A)') '// Field ', fldNam
                0709        ENDIF
                0710 C--    Do "plot" using textual contour map "execution environment" routine
                0711 C      Substitute other plotting utilities here!
                0712        iStart   =  1
                0713        iEnd     =  1
                0714        iStride  =  1
                0715        jStart   =  sNy
                0716        jEnd     =  1
                0717        jStride  = -1
                0718        kStart   =  1
                0719        kEnd     =  fldNz
                0720 c      kEnd     =  1
                0721        kStride  =  1
                0722        biStart  =  1
                0723        biEnd    =  nSx 
                0724        biStride =  1
                0725        bjStart  =  nSy
                0726        bjEnd    =  1    
                0727        bjStride = -1
                0728        CALL PRINT_MAPRL(
                0729      I        fld, fldTitle, PRINT_MAP_YZ,
                0730      I         1,1,1-OLy,sNy+OLy,1,fldNz,  nSx,  nSy,
                0731      I         iStart,   iEnd,  iStride,
                0732      I         jStart,   jEnd,  jStride,
                0733      I         kStart,   kEnd,  kStride,
                0734      I        biStart,  biEnd, biStride,
                0735      I        bjStart,  bjEnd, bjStride )
                0736       ENDIF
                0737       _BARRIER
                0738 
                0739       RETURN
                0740       END