bugfix: filename variable, ghost reshape

This commit is contained in:
Michael Stumpf 2019-04-05 11:49:06 +02:00
parent 356beef2d9
commit c8d257b1a3
1 changed files with 3 additions and 3 deletions

View File

@ -105,9 +105,9 @@ function [data,ib,jb,kb,nxl,nyl,nzl,ighost] = read_field_chunk_legacy(file,fproc
end
% Open uvwp file
fid = fopen(fuvwp,'r',endian);
fid = fopen(file,'r',endian);
if fid<0
error('File not found: %s',fuvwp);
error('File not found: %s',file);
end
% Determine header size
@ -131,7 +131,7 @@ function [data,ib,jb,kb,nxl,nyl,nzl,ighost] = read_field_chunk_legacy(file,fproc
else
fseek(fid,nheader+reclen,'cof');
data = fread(fid,ndata,precision);
data = reshape(data,nxl,nyl,nzl);
data = reshape(data,nxl+2*ighost,nyl+2*ighost,nzl+2*ighost);
end
end