<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You have to loop over T and then Z and write out one 2-D grid at a time. Something like this:<div><br></div><div><font class="Apple-style-span" face="Courier">'set gxout fwrite'</font></div><div><font class="Apple-style-span" face="Courier">'set fwrite -ap myfile.dat'</font></div><div><font class="Apple-style-span" face="Courier">t=10</font></div><div><font class="Apple-style-span" face="Courier">while (t<=200)</font></div><div><font class="Apple-style-span" face="Courier"> 'set t 't</font></div><div><font class="Apple-style-span" face="Courier"> z=1</font></div><div><font class="Apple-style-span" face="Courier"> while (z<=17)</font></div><div><font class="Apple-style-span" face="Courier"> 'set z 'z</font></div><div><font class="Apple-style-span" face="Courier"> 'd var'</font></div><div><font class="Apple-style-span" face="Courier"> z=z+1</font></div><div><font class="Apple-style-span" face="Courier"> endwhile</font></div><div><font class="Apple-style-span" face="Courier"> t=t+1</font></div><div><font class="Apple-style-span" face="Courier">endwhile</font></div><div><font class="Apple-style-span" face="Courier">'disable fwrite'</font></div><div><br></div><div>--Jennifer</div><div><br></div><div><div><div>On Jun 28, 2011, at 12:58 PM, DHRUBA wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>How to extract 4-d binary file from nedcdf file in grads?<br>the nc file has both the dimension of level(z) and time(t). I want to get data for a specific time range for all levels for all lon and lat. How to do that?<br>When I am giving 'set z 1 17' and 'set t 10 200' (for eg.)...it is showing too many variables to vary.<br><br>What to do??<br><br>-- <br>With best regards,<br><br>Dhruba.<br><br>****************************************************************<br>Dhrubajyoti Samanta<br>PhD Scholar<br>Centre for Oceans, Rivers, Atmosphere and Land Sciences (CORAL)<br>Indian Institute of Technology Kharagpur<br>Kharagpur, West Bengal<br>India - 721 302<br>Ph.: +91 99329 08496 (Mob)<br> +91 3222-281291 (Lab)<br>*****************************************************************<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></body></html>