<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>Jim,</div>
<div><br>
</div>
<div>The missing value is –9.99e+08. Thanks for your help!</div>
<div><br>
</div>
<div>Joshua</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>"James T. Potemra" <<a href="mailto:jimp@hawaii.edu">jimp@hawaii.edu</a>><br>
<span style="font-weight:bold">Organization: </span>University of Hawaii<br>
<span style="font-weight:bold">Reply-To: </span>GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
<span style="font-weight:bold">Date: </span>Mon, 27 May 2013 13:26:51 -1000<br>
<span style="font-weight:bold">To: </span>GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [gradsusr] fwrite on mac<br>
</div>
<div><br>
</div>
<div>
<div bgcolor="#FFFFFF" text="#000000">Joshua:<br>
<br>
I think your missing values were changed from -9999 to -9e+08 (or something very close to that).<br>
You'll need to substitute that number in place of -9999 in your .ctl file.<br>
<br>
Jim<br>
<br>
<div class="moz-cite-prefix">On 5/27/13 3:26 AM, Qian, JianHua wrote:<br>
</div>
<blockquote cite="mid:CDC8D729.4870%25jianhua_qian@uml.edu" type="cite">
<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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a></pre>
</blockquote>
<br>
</div>
</div>
_______________________________________________ gradsusr mailing list <a href="mailto:gradsusr@gradsusr.org">
gradsusr@gradsusr.org</a> <a href="http://gradsusr.org/mailman/listinfo/gradsusr">
http://gradsusr.org/mailman/listinfo/gradsusr</a> </span>
</body>
</html>