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) |
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', |
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 ) |
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 |
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 |