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

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

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

revision 1.2 by heimbach, Tue Jul 8 15:00:27 2003 UTC revision 1.3 by heimbach, Fri Jul 18 21:10:50 2003 UTC
# Line 61  C Functions Line 61  C Functions
61        integer ILNBLNK        integer ILNBLNK
62        integer MDS_RECLEN        integer MDS_RECLEN
63  C Local variables  C Local variables
64        character*(80) dataFName,metaFName,pfName        character*(128) dataFName,metaFName,pfName
65        integer iG,jG,irec,dUnit,IL,pIL        integer iG,jG,irec,dUnit,IL,pIL
66        logical fileIsOpen        logical fileIsOpen
67        integer dimList(3,3),ndims        integer dimList(3,3),ndims
# Line 91  C Assume nothing Line 91  C Assume nothing
91    
92  C Assign special directory  C Assign special directory
93        if ( mdsioLocalDir .NE. ' ' ) then        if ( mdsioLocalDir .NE. ' ' ) then
94         write(pFname(1:80),'(2a)') mdsioLocalDir(1:pIL), fName(1:IL)         write(pFname(1:128),'(2a)')
95         &  mdsioLocalDir(1:pIL), fName(1:IL)
96        else        else
97         pFname= fName         pFname= fName
98        endif        endif
# Line 102  C Assign a free unit number as the I/O c Line 103  C Assign a free unit number as the I/O c
103    
104  C If we are writing to a global file then we open it here  C If we are writing to a global file then we open it here
105        if (globalFile) then        if (globalFile) then
106         write(dataFname(1:80),'(2a)') fName(1:IL),'.data'         write(dataFname(1:128),'(2a)') fName(1:IL),'.data'
107         if (irecord .EQ. 1) then         if (irecord .EQ. 1) then
108          length_of_rec = MDS_RECLEN( filePrec, narr, mythid )          length_of_rec = MDS_RECLEN( filePrec, narr, mythid )
109          open( dUnit, file=dataFName, status=_NEW_STATUS,          open( dUnit, file=dataFName, status=_NEW_STATUS,
# Line 123  C If we are writing to a tiled MDS file Line 124  C If we are writing to a tiled MDS file
124          if (.NOT. globalFile) then          if (.NOT. globalFile) then
125           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles
126           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles
127           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname(1:128),'(2a,i3.3,a,i3.3,a)')
128       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              pfName(1:pIL),'.',iG,'.',jG,'.data'
129           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
130            length_of_rec = MDS_RECLEN( filePrec, narr, mythid )            length_of_rec = MDS_RECLEN( filePrec, narr, mythid )
131            open( dUnit, file=dataFName, status=_NEW_STATUS,            open( dUnit, file=dataFName, status=_NEW_STATUS,
# Line 173  C Create meta-file for each tile file Line 174  C Create meta-file for each tile file
174          if (.NOT. globalFile) then          if (.NOT. globalFile) then
175           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles
176           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles
177           write(metaFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(metaFname(1:128),'(2a,i3.3,a,i3.3,a)')
178       &              fName(1:IL),'.',iG,'.',jG,'.meta'       &              pfName(1:pIL),'.',iG,'.',jG,'.meta'
179           dimList(1,1) = nPx*nSx*narr           dimList(1,1) = nPx*nSx*narr
180           dimList(2,1) = ((myXGlobalLo-1)/sNx + (bi-1))*narr + 1           dimList(2,1) = ((myXGlobalLo-1)/sNx + (bi-1))*narr + 1
181           dimList(3,1) = ((myXGlobalLo-1)/sNx +   bi  )*narr           dimList(3,1) = ((myXGlobalLo-1)/sNx +   bi  )*narr
# Line 200  C If global file was opened then close i Line 201  C If global file was opened then close i
201    
202  C Create meta-file for global file  C Create meta-file for global file
203        if (globalFile) then        if (globalFile) then
204         write(metaFName(1:80),'(2a)') fName(1:IL),'.meta'         write(metaFName(1:128),'(2a)') fName(1:IL),'.meta'
205         dimList(1,1) = nPx*nSx*narr         dimList(1,1) = nPx*nSx*narr
206         dimList(2,1) = 1         dimList(2,1) = 1
207         dimList(3,1) = nPx*nSx*narr         dimList(3,1) = nPx*nSx*narr

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22