<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. &nbsp;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&#43;08 to 0 interval 1e&#43;08</div>
</div>
<div><br>
</div>
<div>If I use &quot;options little_endian&quot;, the number is of e&#43;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 &nbsp; (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>&nbsp;set t &nbsp; &nbsp; &nbsp; &nbsp; 2145</div>
<div>&nbsp;d pcp</div>
<div>&nbsp;set t &nbsp; &nbsp; &nbsp; &nbsp; 2146</div>
<div>&nbsp;d pcp</div>
<div>&nbsp;set t &nbsp; &nbsp; &nbsp; &nbsp; 2147</div>
<div>&nbsp;d pcp</div>
<div>&nbsp;set t &nbsp; &nbsp; &nbsp; &nbsp; 2148</div>
<div>&nbsp;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 &nbsp;-9999.</div>
<div>xdef &nbsp;282 linear 74.875 0.25</div>
<div>ydef &nbsp;301 linear -40.125 0.25</div>
<div>zdef 1 levels 0</div>
<div>tdef &nbsp;952 linear &nbsp;00z07Dec2002 3hr</div>
<div>vars 1</div>
<div>pcp &nbsp; &nbsp; &nbsp;0 99 mm/hr (00z data represents pcp of 00z to 03z)</div>
</div>
<div><br>
</div>
<div>-----</div>
<div>I tried big_endian, &nbsp;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>