/[MITgcm]/MITgcm/pkg/mdsio/mdsio_gl.F
ViewVC logotype

Diff of /MITgcm/pkg/mdsio/mdsio_gl.F

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

revision 1.12 by heimbach, Fri Aug 19 18:27:51 2005 UTC revision 1.13 by jmc, Sat Nov 5 01:05:14 2005 UTC
# Line 82  C Functions Line 82  C Functions
82        integer ILNBLNK        integer ILNBLNK
83        integer MDS_RECLEN        integer MDS_RECLEN
84  C Local variables  C Local variables
85        character*(80) dataFName        character*(MAX_LEN_FNAM) dataFName
86        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL
87        logical exst        logical exst
88        _RL arr(1-oLx:sNx+oLx,1-oLy:sNy+oLy,Nr,nSx,nSy)        _RL arr(1-oLx:sNx+oLx,1-oLy:sNy+oLy,Nr,nSx,nSy)
# Line 93  C Local variables Line 93  C Local variables
93        character*(max_len_mbuf) msgbuf        character*(max_len_mbuf) msgbuf
94  cph-usesingle(  cph-usesingle(
95        integer ii,jj        integer ii,jj
96        integer x_size,y_size,iG_IO,jG_IO,npe  c     integer iG_IO,jG_IO,npe
97          integer x_size,y_size
98        PARAMETER ( x_size = Nx )        PARAMETER ( x_size = Nx )
99        PARAMETER ( y_size = Ny )        PARAMETER ( y_size = Ny )
100        Real*4 xy_buffer_r4(x_size,y_size)        Real*4 xy_buffer_r4(x_size,y_size)
101        Real*8 xy_buffer_r8(x_size,y_size)        Real*8 xy_buffer_r8(x_size,y_size)
102        Real*8 global(Nx,Ny)        Real*8 global(Nx,Ny)
103        _RL    local(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  c     _RL    local(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
104  cph-usesingle)  cph-usesingle)
105    
106  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
# Line 142  C Check first for global file with simpl Line 143  C Check first for global file with simpl
143    
144  C If negative check for global file with MDS name (ie. fName.data)  C If negative check for global file with MDS name (ie. fName.data)
145           if (.NOT. globalFile) then           if (.NOT. globalFile) then
146            write(dataFname(1:80),'(2a)') fName(1:IL),'.data'            write(dataFname,'(2a)') fName(1:IL),'.data'
147            inquire( file=dataFname, exist=exst )            inquire( file=dataFname, exist=exst )
148            if (exst) globalFile = .TRUE.            if (exst) globalFile = .TRUE.
149           endif           endif
# Line 154  C Otherwise stop program. Line 155  C Otherwise stop program.
155            open( dUnit, file=dataFName, status='old',            open( dUnit, file=dataFName, status='old',
156       &         access='direct', recl=length_of_rec )       &         access='direct', recl=length_of_rec )
157           else           else
158            write(msgbuf,'(2a)') ' MDSREADFIELD: filename: ',dataFName            write(msgbuf,'(2a)')
159         &      ' MDSREADFIELD: filename: ',dataFName(1:IL)
160            call print_message( msgbuf, standardmessageunit,            call print_message( msgbuf, standardmessageunit,
161       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
162            call print_error( msgbuf, mythid )            call print_error( msgbuf, mythid )
# Line 177  C Check first for global file with simpl Line 179  C Check first for global file with simpl
179         inquire( file=dataFname, exist=exst )         inquire( file=dataFname, exist=exst )
180         if (exst) then         if (exst) then
181          write(msgbuf,'(a,a)')          write(msgbuf,'(a,a)')
182       &    ' MDSREADFIELD: opening global file: ',dataFName       &    ' MDSREADFIELD: opening global file: ',dataFName(1:IL)
183          call print_message( msgbuf, standardmessageunit,          call print_message( msgbuf, standardmessageunit,
184       &                      SQUEEZE_RIGHT , mythid)       &                      SQUEEZE_RIGHT , mythid)
185         endif         endif
186    
187  C If negative check for global file with MDS name (ie. fName.data)  C If negative check for global file with MDS name (ie. fName.data)
188         if (.NOT. globalFile) then         if (.NOT. globalFile) then
189          write(dataFname(1:80),'(2a)') fName(1:IL),'.data'          write(dataFname,'(2a)') fName(1:IL),'.data'
190          inquire( file=dataFname, exist=exst )          inquire( file=dataFname, exist=exst )
191          if (exst) then          if (exst) then
192           write(msgbuf,'(a,a)')           write(msgbuf,'(a,a)')
193       &     ' MDSREADFIELD_GL: opening global file: ',dataFName       &     ' MDSREADFIELD_GL: opening global file: ',dataFName(1:IL+5)
194           call print_message( msgbuf, standardmessageunit,           call print_message( msgbuf, standardmessageunit,
195       &                       SQUEEZE_RIGHT , mythid)       &                       SQUEEZE_RIGHT , mythid)
196           globalFile = .TRUE.           globalFile = .TRUE.
# Line 220  C If we are reading from a tiled MDS fil Line 222  C If we are reading from a tiled MDS fil
222          if (.NOT. globalFile) then          if (.NOT. globalFile) then
223           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
224           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
225           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname,'(2a,i3.3,a,i3.3,a)')
226       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              fName(1:IL),'.',iG,'.',jG,'.data'
227           inquire( file=dataFname, exist=exst )           inquire( file=dataFname, exist=exst )
228  C Of course, we only open the file if the tile is "active"  C Of course, we only open the file if the tile is "active"
# Line 228  C (This is a place-holder for the active Line 230  C (This is a place-holder for the active
230           if (exst) then           if (exst) then
231            if ( debugLevel .GE. debLevA ) then            if ( debugLevel .GE. debLevA ) then
232             write(msgbuf,'(a,a)')             write(msgbuf,'(a,a)')
233       &      ' MDSREADFIELD_GL: opening file: ',dataFName       &      ' MDSREADFIELD_GL: opening file: ',dataFName(1:IL+13)
234             call print_message( msgbuf, standardmessageunit,             call print_message( msgbuf, standardmessageunit,
235       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
236            endif            endif
# Line 239  C (This is a place-holder for the active Line 241  C (This is a place-holder for the active
241           else           else
242            fileIsOpen=.FALSE.            fileIsOpen=.FALSE.
243            write(msgbuf,'(a,a)')            write(msgbuf,'(a,a)')
244       &      ' MDSREADFIELD_GL: filename: ',dataFName       &      ' MDSREADFIELD_GL: filename: ',dataFName(1:IL+13)
245            call print_message( msgbuf, standardmessageunit,            call print_message( msgbuf, standardmessageunit,
246       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
247            call print_error( msgbuf, mythid )            call print_error( msgbuf, mythid )
# Line 469  C Functions Line 471  C Functions
471        integer ILNBLNK        integer ILNBLNK
472        integer MDS_RECLEN        integer MDS_RECLEN
473  C Local variables  C Local variables
474        character*(80) dataFName,metaFName        character*(MAX_LEN_FNAM) dataFName,metaFName
475        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL
476        Real*4 r4seg(sNx)        Real*4 r4seg(sNx)
477        Real*8 r8seg(sNx)        Real*8 r8seg(sNx)
# Line 479  C Local variables Line 481  C Local variables
481        logical fileIsOpen        logical fileIsOpen
482        character*(max_len_mbuf) msgbuf        character*(max_len_mbuf) msgbuf
483  cph-usesingle(  cph-usesingle(
484    #ifdef ALLOW_USE_MPI
485        integer ii,jj        integer ii,jj
486        integer x_size,y_size,iG_IO,jG_IO,npe        integer x_size,y_size,iG_IO,jG_IO,npe
487        PARAMETER ( x_size = Nx )        PARAMETER ( x_size = Nx )
# Line 486  cph-usesingle( Line 489  cph-usesingle(
489        Real*4 xy_buffer_r4(x_size,y_size)        Real*4 xy_buffer_r4(x_size,y_size)
490        Real*8 xy_buffer_r8(x_size,y_size)        Real*8 xy_buffer_r8(x_size,y_size)
491        Real*8 global(Nx,Ny)        Real*8 global(Nx,Ny)
492    #endif
493  cph-usesingle)  cph-usesingle)
494    
495  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
# Line 522  C globalFile is too slow, then try using Line 526  C globalFile is too slow, then try using
526  C Master thread of process 0, only, opens a global file  C Master thread of process 0, only, opens a global file
527         _BEGIN_MASTER( myThid )         _BEGIN_MASTER( myThid )
528          IF( mpiMyId .EQ. 0 ) THEN          IF( mpiMyId .EQ. 0 ) THEN
529           write(dataFname(1:80),'(2a)') fName(1:IL),'.data'           write(dataFname,'(2a)') fName(1:IL),'.data'
530           length_of_rec=MDS_RECLEN(filePrec,x_size*y_size,mythid)           length_of_rec=MDS_RECLEN(filePrec,x_size*y_size,mythid)
531           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
532            open( dUnit, file=dataFName, status=_NEW_STATUS,            open( dUnit, file=dataFName, status=_NEW_STATUS,
# Line 589  C Close data-file and create meta-file Line 593  C Close data-file and create meta-file
593         _BEGIN_MASTER( myThid )         _BEGIN_MASTER( myThid )
594          IF( mpiMyId .EQ. 0 ) THEN          IF( mpiMyId .EQ. 0 ) THEN
595           close( dUnit )           close( dUnit )
596           write(metaFName(1:80),'(2a)') fName(1:IL),'.meta'           write(metaFName,'(2a)') fName(1:IL),'.meta'
597           dimList(1,1)=Nx           dimList(1,1)=Nx
598           dimList(2,1)=1           dimList(2,1)=1
599           dimList(3,1)=Nx           dimList(3,1)=Nx
# Line 622  C Loop over all tiles Line 626  C Loop over all tiles
626  C If we are writing to a tiled MDS file then we open each one here  C If we are writing to a tiled MDS file then we open each one here
627           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
628           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
629           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname,'(2a,i3.3,a,i3.3,a)')
630       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              fName(1:IL),'.',iG,'.',jG,'.data'
631           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
632            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )
# Line 638  C If we are writing to a tiled MDS file Line 642  C If we are writing to a tiled MDS file
642          if (fileIsOpen) then          if (fileIsOpen) then
643           do k=1,Nr           do k=1,Nr
644            do j=1,sNy            do j=1,sNy
645               do ii=1,sNx               do i=1,sNx
646                  arr(ii,j,k,bi,bj)=arr_gl(ii,bi,ip,j,bj,jp,k)                  arr(i,j,k,bi,bj)=arr_gl(i,bi,ip,j,bj,jp,k)
647               enddo               enddo
648              iG = 0              iG = 0
649              jG = 0              jG = 0
# Line 698  C If we were writing to a tiled MDS file Line 702  C If we were writing to a tiled MDS file
702  C Create meta-file for each tile if we are tiling  C Create meta-file for each tile if we are tiling
703           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
704           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
705           write(metaFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(metaFname,'(2a,i3.3,a,i3.3,a)')
706       &              fName(1:IL),'.',iG,'.',jG,'.meta'       &              fName(1:IL),'.',iG,'.',jG,'.meta'
707           dimList(1,1)=Nx           dimList(1,1)=Nx
708           dimList(2,1)=((ip-1)*nSx+(bi-1))*sNx+1           dimList(2,1)=((ip-1)*nSx+(bi-1))*sNx+1
# Line 791  C Functions Line 795  C Functions
795        integer ILNBLNK        integer ILNBLNK
796        integer MDS_RECLEN        integer MDS_RECLEN
797  C Local variables  C Local variables
798        character*(80) dataFName        character*(MAX_LEN_FNAM) dataFName
799        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL
800        logical exst        logical exst
801        _RL arr(1-oLx:sNx+oLx,1-oLy:sNy+oLy,nLocz,nSx,nSy)        _RL arr(1-oLx:sNx+oLx,1-oLy:sNy+oLy,nLocz,nSx,nSy)
# Line 802  C Local variables Line 806  C Local variables
806        character*(max_len_mbuf) msgbuf        character*(max_len_mbuf) msgbuf
807  cph-usesingle(  cph-usesingle(
808        integer ii,jj        integer ii,jj
809        integer x_size,y_size,iG_IO,jG_IO,npe  c     integer iG_IO,jG_IO,npe
810          integer x_size,y_size
811        PARAMETER ( x_size = Nx )        PARAMETER ( x_size = Nx )
812        PARAMETER ( y_size = Ny )        PARAMETER ( y_size = Ny )
813        Real*4 xy_buffer_r4(x_size,y_size)        Real*4 xy_buffer_r4(x_size,y_size)
814        Real*8 xy_buffer_r8(x_size,y_size)        Real*8 xy_buffer_r8(x_size,y_size)
815        Real*8 global(Nx,Ny)        Real*8 global(Nx,Ny)
816        _RL    local(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)  c     _RL    local(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
817  cph-usesingle)  cph-usesingle)
818    
819  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
# Line 852  C Check first for global file with simpl Line 857  C Check first for global file with simpl
857    
858  C If negative check for global file with MDS name (ie. fName.data)  C If negative check for global file with MDS name (ie. fName.data)
859           if (.NOT. globalFile) then           if (.NOT. globalFile) then
860            write(dataFname(1:80),'(2a)') fName(1:IL),'.data'            write(dataFname,'(2a)') fName(1:IL),'.data'
861            inquire( file=dataFname, exist=exst )            inquire( file=dataFname, exist=exst )
862            if (exst) globalFile = .TRUE.            if (exst) globalFile = .TRUE.
863           endif           endif
# Line 864  C Otherwise stop program. Line 869  C Otherwise stop program.
869            open( dUnit, file=dataFName, status='old',            open( dUnit, file=dataFName, status='old',
870       &         access='direct', recl=length_of_rec )       &         access='direct', recl=length_of_rec )
871           else           else
872            write(msgbuf,'(2a)') ' MDSREADFIELD: filename: ',dataFName            write(msgbuf,'(2a)')
873         &      ' MDSREADFIELD: filename: ',dataFName(1:IL)
874            call print_message( msgbuf, standardmessageunit,            call print_message( msgbuf, standardmessageunit,
875       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
876            call print_error( msgbuf, mythid )            call print_error( msgbuf, mythid )
# Line 886  C Check first for global file with simpl Line 892  C Check first for global file with simpl
892         inquire( file=dataFname, exist=exst )         inquire( file=dataFname, exist=exst )
893         if (exst) then         if (exst) then
894          write(msgbuf,'(a,a)')          write(msgbuf,'(a,a)')
895       &    ' MDSREADFIELD: opening global file: ',dataFName       &    ' MDSREADFIELD: opening global file: ',dataFName(1:IL)
896          call print_message( msgbuf, standardmessageunit,          call print_message( msgbuf, standardmessageunit,
897       &                      SQUEEZE_RIGHT , mythid)       &                      SQUEEZE_RIGHT , mythid)
898         endif         endif
899    
900  C If negative check for global file with MDS name (ie. fName.data)  C If negative check for global file with MDS name (ie. fName.data)
901         if (.NOT. globalFile) then         if (.NOT. globalFile) then
902          write(dataFname(1:80),'(2a)') fName(1:IL),'.data'          write(dataFname,'(2a)') fName(1:IL),'.data'
903          inquire( file=dataFname, exist=exst )          inquire( file=dataFname, exist=exst )
904          if (exst) then          if (exst) then
905           write(msgbuf,'(a,a)')           write(msgbuf,'(a,a)')
906       &     ' MDSREADFIELD_GL: opening global file: ',dataFName       &     ' MDSREADFIELD_GL: opening global file: ',dataFName(1:IL+5)
907           call print_message( msgbuf, standardmessageunit,           call print_message( msgbuf, standardmessageunit,
908       &                       SQUEEZE_RIGHT , mythid)       &                       SQUEEZE_RIGHT , mythid)
909           globalFile = .TRUE.           globalFile = .TRUE.
# Line 929  C If we are reading from a tiled MDS fil Line 935  C If we are reading from a tiled MDS fil
935          if (.NOT. globalFile) then          if (.NOT. globalFile) then
936           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
937           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
938           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname,'(2a,i3.3,a,i3.3,a)')
939       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              fName(1:IL),'.',iG,'.',jG,'.data'
940           inquire( file=dataFname, exist=exst )           inquire( file=dataFname, exist=exst )
941  C Of course, we only open the file if the tile is "active"  C Of course, we only open the file if the tile is "active"
# Line 937  C (This is a place-holder for the active Line 943  C (This is a place-holder for the active
943           if (exst) then           if (exst) then
944            if ( debugLevel .GE. debLevA ) then            if ( debugLevel .GE. debLevA ) then
945             write(msgbuf,'(a,a)')             write(msgbuf,'(a,a)')
946       &      ' MDSREADFIELD_GL: opening file: ',dataFName       &      ' MDSREADFIELD_GL: opening file: ',dataFName(1:IL+13)
947             call print_message( msgbuf, standardmessageunit,             call print_message( msgbuf, standardmessageunit,
948       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
949            endif            endif
# Line 948  C (This is a place-holder for the active Line 954  C (This is a place-holder for the active
954           else           else
955            fileIsOpen=.FALSE.            fileIsOpen=.FALSE.
956            write(msgbuf,'(a,a)')            write(msgbuf,'(a,a)')
957       &      ' MDSREADFIELD_GL: filename: ',dataFName       &      ' MDSREADFIELD_GL: filename: ',dataFName(1:IL+13)
958            call print_message( msgbuf, standardmessageunit,            call print_message( msgbuf, standardmessageunit,
959       &                        SQUEEZE_RIGHT , mythid)       &                        SQUEEZE_RIGHT , mythid)
960            call print_error( msgbuf, mythid )            call print_error( msgbuf, mythid )
# Line 1179  C Functions Line 1185  C Functions
1185        integer ILNBLNK        integer ILNBLNK
1186        integer MDS_RECLEN        integer MDS_RECLEN
1187  C Local variables  C Local variables
1188        character*(80) dataFName,metaFName        character*(MAX_LEN_FNAM) dataFName,metaFName
1189        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL        integer ip,jp,iG,jG,irec,bi,bj,i,j,k,dUnit,IL
1190        Real*4 r4seg(sNx)        Real*4 r4seg(sNx)
1191        Real*8 r8seg(sNx)        Real*8 r8seg(sNx)
# Line 1189  C Local variables Line 1195  C Local variables
1195        logical fileIsOpen        logical fileIsOpen
1196        character*(max_len_mbuf) msgbuf        character*(max_len_mbuf) msgbuf
1197  cph-usesingle(  cph-usesingle(
1198    #ifdef ALLOW_USE_MPI
1199        integer ii,jj        integer ii,jj
1200        integer x_size,y_size,iG_IO,jG_IO,npe        integer x_size,y_size,iG_IO,jG_IO,npe
1201        PARAMETER ( x_size = Nx )        PARAMETER ( x_size = Nx )
# Line 1196  cph-usesingle( Line 1203  cph-usesingle(
1203        Real*4 xy_buffer_r4(x_size,y_size)        Real*4 xy_buffer_r4(x_size,y_size)
1204        Real*8 xy_buffer_r8(x_size,y_size)        Real*8 xy_buffer_r8(x_size,y_size)
1205        Real*8 global(Nx,Ny)        Real*8 global(Nx,Ny)
1206    #endif
1207  cph-usesingle)  cph-usesingle)
1208    
1209  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
# Line 1233  C globalFile is too slow, then try using Line 1241  C globalFile is too slow, then try using
1241  C Master thread of process 0, only, opens a global file  C Master thread of process 0, only, opens a global file
1242         _BEGIN_MASTER( myThid )         _BEGIN_MASTER( myThid )
1243          IF( mpiMyId .EQ. 0 ) THEN          IF( mpiMyId .EQ. 0 ) THEN
1244           write(dataFname(1:80),'(2a)') fName(1:IL),'.data'           write(dataFname,'(2a)') fName(1:IL),'.data'
1245           length_of_rec=MDS_RECLEN(filePrec,x_size*y_size,mythid)           length_of_rec=MDS_RECLEN(filePrec,x_size*y_size,mythid)
1246           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
1247            open( dUnit, file=dataFName, status=_NEW_STATUS,            open( dUnit, file=dataFName, status=_NEW_STATUS,
# Line 1300  C Close data-file and create meta-file Line 1308  C Close data-file and create meta-file
1308         _BEGIN_MASTER( myThid )         _BEGIN_MASTER( myThid )
1309          IF( mpiMyId .EQ. 0 ) THEN          IF( mpiMyId .EQ. 0 ) THEN
1310           close( dUnit )           close( dUnit )
1311           write(metaFName(1:80),'(2a)') fName(1:IL),'.meta'           write(metaFName,'(2a)') fName(1:IL),'.meta'
1312           dimList(1,1)=Nx           dimList(1,1)=Nx
1313           dimList(2,1)=1           dimList(2,1)=1
1314           dimList(3,1)=Nx           dimList(3,1)=Nx
# Line 1333  C Loop over all tiles Line 1341  C Loop over all tiles
1341  C If we are writing to a tiled MDS file then we open each one here  C If we are writing to a tiled MDS file then we open each one here
1342           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
1343           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
1344           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname,'(2a,i3.3,a,i3.3,a)')
1345       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              fName(1:IL),'.',iG,'.',jG,'.data'
1346           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
1347            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )
# Line 1349  C If we are writing to a tiled MDS file Line 1357  C If we are writing to a tiled MDS file
1357          if (fileIsOpen) then          if (fileIsOpen) then
1358           do k=1,nLocz           do k=1,nLocz
1359            do j=1,sNy            do j=1,sNy
1360               do ii=1,sNx               do i=1,sNx
1361                  arr(ii,j,k,bi,bj)=arr_gl(ii,bi,ip,j,bj,jp,k)                  arr(i,j,k,bi,bj)=arr_gl(i,bi,ip,j,bj,jp,k)
1362               enddo               enddo
1363              iG = 0              iG = 0
1364              jG = 0              jG = 0
# Line 1409  C If we were writing to a tiled MDS file Line 1417  C If we were writing to a tiled MDS file
1417  C Create meta-file for each tile if we are tiling  C Create meta-file for each tile if we are tiling
1418           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles           iG=bi+(ip-1)*nsx ! Kludge until unstructered tiles
1419           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles           jG=bj+(jp-1)*nsy ! Kludge until unstructered tiles
1420           write(metaFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(metaFname,'(2a,i3.3,a,i3.3,a)')
1421       &              fName(1:IL),'.',iG,'.',jG,'.meta'       &              fName(1:IL),'.',iG,'.',jG,'.meta'
1422           dimList(1,1)=Nx           dimList(1,1)=Nx
1423           dimList(2,1)=((ip-1)*nSx+(bi-1))*sNx+1           dimList(2,1)=((ip-1)*nSx+(bi-1))*sNx+1

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22