<div dir="ltr">Pls do the following. Just send one days output as grd file and corresponding ctl file. <div>There is a big chance for wrong contouring due to the endian difference in machines. So you may have to give options little_endian or big endian whatever may be the case. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 4:43 PM, Lekshmi Mudra <span dir="ltr"><<a href="mailto:lekshmimdr@gmail.com" target="_blank">lekshmimdr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried the same and got the binary data. The .ctl file prepared for<br>
the same is opening in grads, but the plott displaying is wrong. There<br>
is some problem in contouring, but how it is occuring that i'm not<br>
understanding.<br>
<br>
Thank you.<br>
<div class="HOEnZb"><div class="h5"><br>
On 5/18/16, Jayakrishnan P.R <<a href="mailto:prjayakrishnan@gmail.com">prjayakrishnan@gmail.com</a>> wrote:<br>
> Try this one. Why 'define january=rainfall' and 'd rainfall' ??.....instead<br>
> of d january ?.. Also the set time 'set time Jan1950 Dec2015'<br>
> statement is inactive inside he loop. I removed that also. If still error,<br>
> then try with set x and set y.<br>
><br>
> 'reinit'<br>
> 'c'<br>
> 'sdfopen IMD_Precip_1948-2015.nc'<br>
> 'set lat 6.5 38.5'<br>
> 'set lon 66.5 100'<br>
> 'set fwrite jan.bin'<br>
> tt=25<br>
> while(tt<=816)<br>
> 'set t 'tt<br>
> 'set gxout fwrite'<br>
> 'd rainfall'<br>
> tt=tt+12<br>
> endwhile<br>
> 'disable fwrite'<br>
><br>
><br>
> On Wed, May 18, 2016 at 2:03 PM, Lekshmi Mudra <<a href="mailto:lekshmimdr@gmail.com">lekshmimdr@gmail.com</a>><br>
> wrote:<br>
><br>
>> Before using sdfwrite, i tried 'fwrite'. The resultant binary file is<br>
>> not working. Here i'm attaching gs file for extracting monthly data<br>
>> from nc file and respective .ctl file for the monthly data.<br>
>><br>
>> Below given are the details of .nc file for IMD rainfall from 1948-2015<br>
>> Grid coordinates :<br>
>> 1 : lonlat > size : dim = 17415 nx = 135 ny = 129<br>
>> lon : first = 66.5 last = 100 inc =<br>
>> 0.25 degrees_east<br>
>> lat : first = 6.5 last = 38.5 inc =<br>
>> 0.25 degrees_north<br>
>> Vertical coordinates :<br>
>> 1 : surface : 0<br>
>> Time coordinate : 816 steps<br>
>> ><br>
>> ga-> q file<br>
>> File 1 : Monthly cumulative rainfall<br>
>> Descriptor: IMD_Precip_1948-2015.nc<br>
>> Binary: IMD_Precip_1948-2015.nc<br>
>> Type = Gridded<br>
>> Xsize = 135 Ysize = 129 Zsize = 1 Tsize = 816 Esize = 1<br>
>> Number of Variables = 1<br>
>> rainfall 0 t,y,x Rainfall<br>
>><br>
>><br>
>> Thank you all for the suggestions.<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On 5/18/16, Jayakrishnan P.R <<a href="mailto:prjayakrishnan@gmail.com">prjayakrishnan@gmail.com</a>> wrote:<br>
>> > Share your gs file along with the ctl file which you used for opening<br>
>> > the<br>
>> > converted binary file so that someone can have a look into it for<br>
>> > error.<br>
>> As<br>
>> > already pointed out by users, sdfwrite is for writing a file into<br>
>> > netcdf<br>
>> > format. Here is a sample gs file which can be used for converting OLR<br>
>> into<br>
>> > .bin file. Have a look and modify it for your purpose. Best of Luck.<br>
>> ><br>
>> > 'reinit'<br>
>> > 'sdfopen D:/computation2008/IITM_OLR_2008.nc'<br>
>> > 'set lon 62 72'<br>
>> > 'set lat 5 15'<br>
>> > prompt 'key-in file name for olr : '<br>
>> > pull fname<br>
>> > 'set fwrite 'fname<br>
>> > tt=153<br>
>> > 'set t 'tt<br>
>> > 'set gxout fwrite'<br>
>> > 'd olr'<br>
>> > 'disable fwrite'<br>
>> ><br>
>> ><br>
>> ><br>
>> > On Tue, May 17, 2016 at 8:59 PM, Mikovitz, Colleen (LARC-E302)[SCIENCE<br>
>> > SYSTEMS AND APPLICATIONS, INC] <<a href="mailto:j.c.mikovitz@nasa.gov">j.c.mikovitz@nasa.gov</a>> wrote:<br>
>> ><br>
>> >> The sdfwrite is for writing into another .nc file (sdf=self-describing<br>
>> >> format).<br>
>> >><br>
>> >> Use ‘set gxout fwrite’ along with ‘set fwrite’ Check out the<br>
>> >> documentation on <a href="http://cola.gmu.edu/grads/gadoc/gadocindex.html" rel="noreferrer" target="_blank">http://cola.gmu.edu/grads/gadoc/gadocindex.html</a> for<br>
>> each<br>
>> >> of those.<br>
>> >><br>
>> >> As a tip, make sure your x and y are set exactly to what you want<br>
>> output.<br>
>> >> For example, ‘set x 1 360’ for a one-degree grid.<br>
>> >><br>
>> >> Colleen<br>
>> >><br>
>> >> On May 17, 2016, at 6:18 AM, Lekshmi Mudra <<a href="mailto:lekshmimdr@gmail.com">lekshmimdr@gmail.com</a>><br>
>> wrote:<br>
>> >><br>
>> >> > Dear All,<br>
>> >> ><br>
>> >> > I have all India gridded (0.25 x 0.25) imd rainfall data<br>
>> >> > from<br>
>> >> > 1948 to 2015, which is in .nc format. I wanted to convert the same<br>
>> >> > into .bin format. I have tried using sdfwrite command. The resulted<br>
>> >> > binary file is not working properly.<br>
>> >> > Is there any solution?<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > Lekshmi Mudra<br>
>> >> > _______________________________________________<br>
>> >> > gradsusr mailing list<br>
>> >> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> >> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> gradsusr mailing list<br>
>> >> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> >> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Sincerely<br>
>> ><br>
>> > **************************************************<br>
>> > Dr. Jayakrishnan P.R<br>
>> > Post Doctoral Research Fellow<br>
>> > C308, Institute of Ocean and Earth Sciences (IOES)<br>
>> > University of Malaya<br>
>> > 50603, Kuala Lumpur<br>
>> > Tel: <a href="tel:%28%2B603%29%207967%204640" value="+60379674640">(+603) 7967 4640</a> / 6995<br>
>> > Mobile: 012-3526094<br>
>> ><br>
>> > ****************************************************<br>
>> ><br>
>><br>
>> _______________________________________________<br>
>> gradsusr mailing list<br>
>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>><br>
>><br>
><br>
><br>
> --<br>
> Sincerely<br>
><br>
> **************************************************<br>
> Dr. Jayakrishnan P.R<br>
> Post Doctoral Research Fellow<br>
> C308, Institute of Ocean and Earth Sciences (IOES)<br>
> University of Malaya<br>
> 50603, Kuala Lumpur<br>
> Tel: <a href="tel:%28%2B603%29%207967%204640" value="+60379674640">(+603) 7967 4640</a> / 6995<br>
> Mobile: 012-3526094<br>
><br>
> ****************************************************<br>
><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div style="font-size:12.8px">Sincerely</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">**************************************************</div><div style="font-size:12.8px">Dr. Jayakrishnan P.R</div><div style="font-size:12.8px">Post Doctoral Research Fellow</div><div style="font-size:12.8px">C308, Institute of Ocean and Earth Sciences (IOES)</div><div style="font-size:12.8px">University of Malaya</div><div style="font-size:12.8px">50603, Kuala Lumpur</div><div style="font-size:12.8px">Tel: (+603) 7967 4640 / 6995</div><div style="font-size:12.8px">Mobile: 012-3526094</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">****************************************************</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><span style="color:rgb(7,55,99)"><font size="1"><br></font></span></div><div style="font-size:12.8px"><span style="color:rgb(7,55,99)"><font size="1"><br></font></span></div><div style="font-size:12.8px"><br></div></div></div>
</div>