[gradsusr] question about FWRITE

Jennifer M Adams jadams21 at gmu.edu
Fri Mar 3 07:30:49 EST 2017


GrADS writes out floating point numbers with fwrite, 4 bytes each. The problem you’re seeing is more likely because of the undef value in your data set. Which version of GrADS are you using? If you have 2.0a6 or higher, you can specify the output undef value with ‘set undef’
http://cola.gmu.edu/grads/gadoc/gradcomdsetundef.html.
—Jennifer

On Mar 3, 2017, at 3:55 AM, 姚凯 <ken3yao at 126.com<mailto:ken3yao at 126.com>> wrote:

Dear all:
    I used the 'set gxout fwrite' function to separate the large GRD data including the radar reflectivity (about 77G) into pieces and saved them as .grd file.Now, I want to do some calculation about the reflectivity using MATLAB. But, when I used the fopen and fread function in MATLAB to read the small grd data, I found that the value of the reflectivity was excessing 10E8 which is unreasonable. I thought that maybe caused by the different precision between the grads fwrite and the MATLAB fread. So I wonder what precision used by fwrite in grads.

Thanks in advance!



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170303/0ec78e43/attachment.html 


More information about the gradsusr mailing list