Hi all One more information I forgot to put here. The file size of fwrite is: 2624000 grads.fwrite It is equal to 41(x,lon)*32(y,lat)*20(z,level)*25(t,time)*4(byte). That is why I can not find out where the problem is. Again, thank you for reading my problems. Mark