<div dir="ltr">Hi,<div><br></div><div>Attached is the GrADS script which extract information from 360x180 per record file (exactly your file size) and writes ASCII file which you can import into excel very easily.</div><div>
<br></div><div>In the file "ifp" is the input file path where your .nc file is located.</div><div>"ofp" is the output file path where you want to put the newly written ASCII file.</div><div>The script writes variable 'tmin' (minimum temperature) and creates a daily file. The naming convention is "tminYYYYDDMM.dat"</div>
<div><br></div><div>Edit x1 and x2 to 60 & 100 and y1, y2 to 5 & 40, ncol=41 (in your case).</div><div>My nc file is "<a href="http://tmin_daily_1965-1965.nc">tmin_daily_1965-1965.nc</a>"</div><div>I have replaced 1965 or whatever year it is by variable "i' through the script.</div>
<div><br></div><div>In short, "fprintf" function does what you are looking for. All you have to do is manage accordingly to your needs.</div><div><br></div><div>Hope the script solves your problem and useful to you.</div>
<div><br></div><div>-rupak</div><div><br></div><div>++++++++++++++++++++++++++++++++++</div><div>Rupak Rajbhandari</div><div>Department of Meteorology</div><div>TriChandra College</div><div>Kathmandu</div><div><br></div><div>
<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 3, 2013 at 8:46 PM, Sushant Das <span dir="ltr"><<a href="mailto:sushant_models@yahoo.com" target="_blank">sushant_models@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><br></div><div><div><div><div><div>
<div>Dear GrADS Users,<br><br></div>I need to know how to extract data from .nc format and write it in excel gridded format file?<br>For eg. <br></div></div>I have a netcdf file consisting of 180 by 360 data. Now i have to extract for the Indian domain say 60-100E and 5-40N<br>
</div></div>so total grids would would be 40*35.<br>After
extracting the data it has to be written in excel sheet having format
with varying lat in y axis and varying lon in x axis containing 40*35
data cells.<br><br>Thanks in advance,<br> </div><div>Regards, <br></div><div>----------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div><span style="font-weight:bold;font-size:13px">SUSHANT DAS,</span></div><div><span style="font-weight:bold;font-size:13px">CSIR Research Fellow,</span></div><div><span style="font-weight:bold;font-size:13px">Centre for Atmospheric Sciences,Block VI</span></div>
<div><span style="font-weight:bold;font-size:13px">Indian Institute of Technology, Delhi</span></div><div><span style="font-weight:bold;font-size:13px">New Delhi-110016,</span></div><div><span style="font-weight:bold;font-size:13px">INDIA</span></div>
<div>----------------------------------------------------------------------------------------------------------------------------------------------------------------</div></div></div><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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>