<div dir="ltr">Dear GrADS users,<div><br></div><div>I need your kind help in solving this issue. </div><div>I converted my model outputs from hourly data to daily data using fwrite command as follows;</div><div><br></div><div>
<div><div>'open r_p.ctl'</div><div>'set x 1 257'</div><div>'set y 1 170'</div><div>'set lev 1'</div><div>t1=1</div><div>while(t1<=360)</div><div>'set t ' t1</div><div>'set fwrite pre.dat'</div>
<div>'set gxout fwrite'</div><div>'d ave(pratesfc,t='t1',t='t1+23')'</div><div>'disable fwrite'</div><div>t1= t1+24</div><div>endwhile</div></div><div><br></div><div>Now in order to display the binary data i prepared following control file;</div>
<div><br></div><div><div>dset ^pre.dat</div><div>options little_endian</div><div>title sample daily data</div><div>undef 9.999e+20</div><div>xdef 257 linear 7.756 0.47019140625</div><div>ydef 170 linear -20.826 0.47019140625</div>
<div>zdef 1 levels 1</div><div>tdef 360 linear 00z01jan1999 1dy</div><div>*</div><div>vars 1</div><div>pratesfc 0 99 surface precipitation</div><div>endvars</div></div><div><br></div><div>When i opened this control file in grads (v1.9.0-rc1 32-bit little-endian readline sdf/xdf netcdf lats athena printim), it successfully displays first time step, but from second time step on-wards, it give following error message;</div>
<div><br></div><div><div>ga-> open prect.ctl</div><div>Scanning description file: prect.ctl</div><div>Data file pre.dat is open as file 1</div><div>LON set to 7.756 128.125</div><div>LAT set to -20.826 58.6363</div><div>
LEV set to 1 1</div><div>Time values set: 1999:1:1:0 1999:1:1:0</div><div>ga-> set t 2</div><div>Time values set: 1999:1:2:0 1999:1:2:0</div><div>ga-> d pratesfc</div><div>Low Level I/O Error: Read error on data file</div>
<div> Data file name = pre.dat</div><div> Error reading 257 bytes at location 43690</div><div>Data Request Error: Error for variable 'pratesfc'</div><div> Error ocurred at column 1</div><div>DISPLAY error: Invalid expression</div>
<div> Expression = pratesfc</div></div><div><br></div><div><br></div><div>The original hourly data file was of size= 6903 (with 87 variables) , while the file i prepared for reading (one variable) as daily data is of size= 258, while my working platform is Linux.</div>
<div><br></div><div>This is first time i am using fwrite function.Please guide me where i am doing wrong.<br></div><div><br></div><div>Thank You</div><div><br></div><div>With Best Regards,</div><div><br></div><div>Mehwish</div>
<div><br></div><div><br></div><div><br></div><div dir="ltr"><div><br></div><div><br></div></div>
</div></div>