[gradsusr] fwrite on mac
James T. Potemra
jimp at hawaii.edu
Mon May 27 19:26:51 EDT 2013
Joshua:
I think your missing values were changed from -9999 to -9e+08 (or
something very close to that).
You'll need to substitute that number in place of -9999 in your .ctl file.
Jim
On 5/27/13 3:26 AM, Qian, JianHua wrote:
> Dear grads users,
>
> 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:
> d pcp
> Contouring: -9e+08 to 0 interval 1e+08
>
> If I use "options little_endian", the number is of e+38.
>
> This is how I used the fwrite in a gs file:
>
> open
> /Users/jianhua_qian/Desktop/IRI/desktopdata/cmorph_indo/cmorph_indo.ctl
> set fwrite -sq cmorph_03_13_son_mjo1.dat
> %set fwrite -be cmorph_03_13_son_mjo1.dat (I tried --be, but it does
> not work either)
> set x 1 282
> set y 1 301
> set z 1
> set gxout fwrite
> set t 2145
> d pcp
> set t 2146
> d pcp
> set t 2147
> d pcp
> set t 2148
> d pcp
> .....
>
> And my ctl file is as follows:
>
> dset ^cmorph_03_13_son_mjo1.dat
> title cmorph data 7dec2002to14may2013 mjo plases
> options sequential
> %options big_endian
> undef -9999.
> xdef 282 linear 74.875 0.25
> ydef 301 linear -40.125 0.25
> zdef 1 levels 0
> tdef 952 linear 00z07Dec2002 3hr
> vars 1
> pcp 0 99 mm/hr (00z data represents pcp of 00z to 03z)
>
> -----
> I tried big_endian, little-endian, sequential, and biteswapped, but
> none works.
>
> Could someone in the grads user group give me a clue?
>
> Thanks!
> Joshua Qian
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130527/c2c0ecc7/attachment-0003.html
More information about the gradsusr
mailing list