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

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

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

revision 1.1 by adcroft, Fri Aug 17 18:40:30 2001 UTC revision 1.2 by jmc, Wed Nov 2 14:49:12 2005 UTC
# Line 73  C Functions Line 73  C Functions
73        integer ILNBLNK        integer ILNBLNK
74        integer MDS_RECLEN        integer MDS_RECLEN
75  C Local variables  C Local variables
76        character*(80) dataFName,metaFName        character*(MAX_LEN_FNAM) dataFName,metaFName
77        integer iG,jG,irec,j,k,dUnit,IL        integer iG,jG,irec,j,k,dUnit,IL
78        Real*4 r4seg(sNx)        Real*4 r4seg(sNx)
79        Real*8 r8seg(sNx)        Real*8 r8seg(sNx)
# Line 107  C Assign a free unit number as the I/O c Line 107  C Assign a free unit number as the I/O c
107    
108  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
109        if (globalFile) then        if (globalFile) then
110         write(dataFname(1:80),'(2a)') fName(1:IL),'.data'         write(dataFname,'(2a)') fName(1:IL),'.data'
111         if (irecord .EQ. 1) then         if (irecord .EQ. 1) then
112          length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )          length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )
113          open( dUnit, file=dataFName, status='unknown',          open( dUnit, file=dataFName, status='unknown',
# Line 128  C If we are writing to a tiled MDS file Line 128  C If we are writing to a tiled MDS file
128          if (.NOT. globalFile) then          if (.NOT. globalFile) then
129           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles
130           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles
131           write(dataFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(dataFname,'(2a,i3.3,a,i3.3,a)')
132       &              fName(1:IL),'.',iG,'.',jG,'.data'       &              fName(1:IL),'.',iG,'.',jG,'.data'
133           if (irecord .EQ. 1) then           if (irecord .EQ. 1) then
134            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )            length_of_rec=MDS_RECLEN( filePrec, sNx, mythid )
# Line 210  C Create meta-file for each tile if we a Line 210  C Create meta-file for each tile if we a
210          if (.NOT. globalFile) then          if (.NOT. globalFile) then
211           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles           iG=bi+(myXGlobalLo-1)/sNx ! Kludge until unstructered tiles
212           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles           jG=bj+(myYGlobalLo-1)/sNy ! Kludge until unstructered tiles
213           write(metaFname(1:80),'(2a,i3.3,a,i3.3,a)')           write(metaFname,'(2a,i3.3,a,i3.3,a)')
214       &              fName(1:IL),'.',iG,'.',jG,'.meta'       &              fName(1:IL),'.',iG,'.',jG,'.meta'
215           dimList(1,1)=Nx           dimList(1,1)=Nx
216           dimList(2,1)=myXGlobalLo+(bi-1)*sNx           dimList(2,1)=myXGlobalLo+(bi-1)*sNx
# Line 263  C at the cost of "safe" distributed I/O. Line 263  C at the cost of "safe" distributed I/O.
263  C We put a barrier here to ensure that all processes have finished  C We put a barrier here to ensure that all processes have finished
264  C writing their data before we update the meta-file  C writing their data before we update the meta-file
265         _BARRIER         _BARRIER
266         write(metaFName(1:80),'(2a)') fName(1:IL),'.meta'         write(metaFName,'(2a)') fName(1:IL),'.meta'
267         dimList(1,1)=Nx         dimList(1,1)=Nx
268         dimList(2,1)=1         dimList(2,1)=1
269         dimList(3,1)=Nx         dimList(3,1)=Nx

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

  ViewVC Help
Powered by ViewVC 1.1.22