| 1 |
C $Header: /u/gcmpack/MITgcm_contrib/ecco_darwin/v4_llc270/code/MDSIO_BUFF_3D.h,v 1.1 2017/11/28 22:09:00 dimitri Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
CBOP |
| 5 |
C !ROUTINE: MDSIO_BUFF_3D.h |
| 6 |
C !INTERFACE: |
| 7 |
C include "MDSIO_BUFF_3D.h" |
| 8 |
C |
| 9 |
C !DESCRIPTION: |
| 10 |
C *==========================================================* |
| 11 |
C | MDSIO_BUFF_3D.h |
| 12 |
C | o Shared 3-D Buffers used for I/O |
| 13 |
C *==========================================================* |
| 14 |
CEOP |
| 15 |
|
| 16 |
C size3dBuf :: buffer 3rd dimension, corresponds to the maximum number |
| 17 |
C of levels that can be read/written at a time. |
| 18 |
C Note: minimum value = Nr, but in few cases (vertical interpolation, |
| 19 |
C NrPhys from Fizhi, ...) needs to be larger. Here we pick 2*Nr |
| 20 |
C which should be enough for most applications. |
| 21 |
INTEGER size3dBuf |
| 22 |
#ifdef ALLOW_FIZHI |
| 23 |
PARAMETER ( size3dBuf = Nr+NrPhys ) |
| 24 |
#else |
| 25 |
PARAMETER ( size3dBuf = 2*Nr ) |
| 26 |
#endif |
| 27 |
|
| 28 |
C-- COMMON /MDS_3D_BUFFERS/ 3-D Shared Local Buffers |
| 29 |
C Those buffers have be in common block to be shared by all threads; |
| 30 |
C considered to be "owned" by master-thread and any access by other |
| 31 |
C than master thread needs to be put protected by BARRIER. |
| 32 |
C shared3dBuf_rx :: Heap storage buffer to which master thread |
| 33 |
C read-in/write-from data which all threads copy from |
| 34 |
C (during read) or copy to (during write). |
| 35 |
COMMON /MDS_3D_BUFFERS/ shared3dBuf_r8, shared3dBuf_r4 |
| 36 |
Real*8 shared3dBuf_r8( sNx*sNy*size3dBuf*nSx*nSy ) |
| 37 |
Real*4 shared3dBuf_r4( sNx*sNy*size3dBuf*nSx*nSy ) |
| 38 |
|
| 39 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |