<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Dear grads users,</div>
<div><br>
</div>
<div>I have trouble in using fwrite on a mac os x laptop. I get the data written from fwrite, but when I plot the data (the correct values should be between 0 and about 100 mm/day), I got unrealistic number:</div>
<div>
<div>d pcp</div>
<div>Contouring: -9e+08 to 0 interval 1e+08</div>
</div>
<div><br>
</div>
<div>If I use "options little_endian", the number is of e+38.</div>
<div><br>
</div>
<div>This is how I used the fwrite in a gs file:</div>
<div><br>
</div>
<div>
<div>open /Users/jianhua_qian/Desktop/IRI/desktopdata/cmorph_indo/cmorph_indo.ctl</div>
<div>set fwrite -sq cmorph_03_13_son_mjo1.dat</div>
<div>%set fwrite -be cmorph_03_13_son_mjo1.dat (I tried –be, but it does not work either)</div>
<div>set x 1 282</div>
<div>set y 1 301</div>
<div>set z 1</div>
<div>set gxout fwrite</div>
<div> set t 2145</div>
<div> d pcp</div>
<div> set t 2146</div>
<div> d pcp</div>
<div> set t 2147</div>
<div> d pcp</div>
<div> set t 2148</div>
<div> d pcp</div>
</div>
<div>…..</div>
<div><br>
</div>
<div>And my ctl file is as follows:</div>
<div><br>
</div>
<div>
<div>dset ^cmorph_03_13_son_mjo1.dat</div>
<div>title cmorph data 7dec2002to14may2013 mjo plases</div>
<div>options sequential</div>
<div>%options big_endian</div>
<div>undef -9999.</div>
<div>xdef 282 linear 74.875 0.25</div>
<div>ydef 301 linear -40.125 0.25</div>
<div>zdef 1 levels 0</div>
<div>tdef 952 linear 00z07Dec2002 3hr</div>
<div>vars 1</div>
<div>pcp 0 99 mm/hr (00z data represents pcp of 00z to 03z)</div>
</div>
<div><br>
</div>
<div>-----</div>
<div>I tried big_endian, little-endian, sequential, and biteswapped, but none works.</div>
<div><br>
</div>
<div>Could someone in the grads user group give me a clue?</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Joshua Qian</div>
<div><br>
</div>
</body>
</html>