<div>Thiago</div>
<div> </div>
<div>Please try this:</div>
<div><span lang="EN"><span lang="EN">
<p>'define FinalOutputVariableName'</p></span></span></div>
<div><span lang="EN">'set sdfwrite <a href="http://filename.nc">filename.nc</a>'</span></div>
<div>
<p>'sdfwrite FinalOutputVariableName'</p>
<p>Hope it works</p>
<p>Rashed<br><br></p></div>
<div class="gmail_quote">On Sat, Jul 24, 2010 at 4:33 AM, Thiago Veloso <span dir="ltr"><<a href="mailto:thi_veloso@yahoo.com.br">thi_veloso@yahoo.com.br</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"> Dr. Bernd,
<div><br></div>
<div> Thank you very much for this step-by-step guide. Please find attached the resulting figure of the integration. I also defined my own spatial domain to produce the figure (southern Brazil).</div>
<div><br></div>
<div> Now the big question is: how to write these results into a netcdf file?</div>
<div><br></div>
<div> Best regards,</div>
<div><br></div>
<div> Thiago.
<div class="im"><br><br>--- On <b>Fri, 23/7/10, Becker, Bernd <i><<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>></i></b> wrote:<br></div>
<blockquote style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">
<div class="im"><br>From: Becker, Bernd <<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>><br>Subject: Re: [gradsusr] Obtaining total values of a dimension on a netCDFfile<br>
To: "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br></div>Date: Friday, 23 July, 2010, 5:37
<div>
<div></div>
<div class="h5"><br><br>
<div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Ok. </span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>you are getting there.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>try:</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>set t 1</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2">d sum(data,t=1,t=32)</font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2">a<span>ny numbers looking familiar?</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>Cheers,</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>Bernd.</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font> </div>
<div><br></div>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Thiago Veloso<br>
<b>Sent:</b> 22 July 2010 18:06<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> Re: [gradsusr] Obtaining total values of a dimension on a netCDFfile<br></font><br></div>
<div></div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"> Dear Bernd,
<div><br></div>
<div> Thanks for your reply.</div>
<div><br></div>
<div> After trying the procedure you suggested I received lots of information on display. Each information set corresponding to a specific day.</div>
<div><br></div>
<div> For example, setting t 1 3 generates:</div>
<div><br></div>
<div>
<div>ga-> set t 1 3</div>
<div>Time values set: 2009:1:1:0 2009:1:3:0 </div>
<div>ga-> d cmorph</div>
<div>Data Type = grid</div>
<div>Dimensions = 0 1</div>
<div>I Dimension = 0 to 4949 Linear -0.0363783 0.0727567</div>
<div>J Dimension = 1 to 1649 Linear -59.9636 0.0727714</div>
<div>Sizes = 4950 1649 8162550</div>
<div>Undef value = -9.99e+08</div>
<div>Undef count = 114789 Valid count = 8047761</div>
<div>Min, Max = 0 241</div>
<div>Cmin, cmax, cint = 0 240 20</div>
<div>Stats[sum,sumsqr,root(sumsqr),n]: 4.20946e+06 8.7492e+07 9353.71 8047761</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/n]: 0.523059 10.8716 3.29721</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.523059 10.8716 3.29721</div>
<div>Stats[(sigma,var)(n)]: 3.25546 10.598</div>
<div>Stats[(sigma,var)(n-1)]: 3.25546 10.598</div>
<div>Data Type = grid</div>
<div>Dimensions = 0 1</div>
<div>I Dimension = 0 to 4949 Linear -0.0363783 0.0727567</div>
<div>J Dimension = 1 to 1649 Linear -59.9636 0.0727714</div>
<div>Sizes = 4950 1649 8162550</div>
<div>Undef value = -9.99e+08</div>
<div>Undef count = 89326 Valid count = 8073224</div>
<div>Min, Max = 0 217</div>
<div>Cmin, cmax, cint = 0 200 20</div>
<div>Stats[sum,sumsqr,root(sumsqr),n]: 3.78218e+06 7.38863e+07 8595.71 8073224</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/n]: 0.468485 9.15202 3.02523</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.468485 9.15202 3.02523</div>
<div>Stats[(sigma,var)(n)]: 2.98874 8.93254</div>
<div>Stats[(sigma,var)(n-1)]: 2.98874 8.93254</div>
<div>Data Type = grid</div>
<div>Dimensions = 0 1</div>
<div>I Dimension = 0 to 4949 Linear -0.0363783 0.0727567</div>
<div>J Dimension = 1 to 1649 Linear -59.9636 0.0727714</div>
<div>Sizes = 4950 1649 8162550</div>
<div>Undef value = -9.99e+08</div>
<div>Undef count = 177477 Valid count = 7985073</div>
<div>Min, Max = 0 200</div>
<div>Cmin, cmax, cint = 0 200 20</div>
<div>Stats[sum,sumsqr,root(sumsqr),n]: 3.8412e+06 9.12816e+07 9554.14 7985073</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/n]: 0.481048 11.4315 3.38105</div>
<div>Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.481048 11.4315 3.38106</div>
<div>Stats[(sigma,var)(n)]: 3.34666 11.2001</div>
<div>Stats[(sigma,var)(n-1)]: 3.34666 11.2001</div>
<div>ga-> </div></div>
<div><br></div>
<div> Is this information enough?</div>
<div><br></div>
<div> Best wishes,</div>
<div><br></div>
<div> Thiago.</div>
<div><br><br>--- On <b>Thu, 22/7/10, Becker, Bernd <i><<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>></i></b> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><br>From: Becker, Bernd <<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>><br>
Subject: Re: [gradsusr] Obtaining total values of a dimension on a netCDF file<br>To: "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br>Date: Thursday, 22 July, 2010, 12:20<br>
<br>
<div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>sdfopen <a href="http://file.nc/" target="_blank">file.nc</a></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>set gxout stats</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>set t 1 32</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>d var</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>what does that produce?</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span>Bernd.</span></font></div><br>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Thiago Veloso<br>
<b>Sent:</b> 22 July 2010 15:18<br><b>To:</b> <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><b>Subject:</b> [gradsusr] Obtaining total values of a dimension on a netCDF file<br></font><br>
</div>
<div></div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"> Dear GrADS colleagues,
<div><br></div>
<div> I am working with a netCDF file which contains precipitation values for 31 days. What I am trying to do is to use NCO to obtain the sum of the "time" dimension (thus, the 31 days), but with no success until the present moment.</div>
<div><br></div>
<div> Could anybody give some directions?</div>
<div><br></div>
<div> Best regards,</div>
<div><br></div>
<div> Thiago.</div></td></tr></tbody></table><br></div><br>-----Inline Attachment Follows-----<br><br>
<div>_______________________________________________<br>gradsusr mailing list<br><a rel="nofollow">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="nofollow" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></blockquote></div></td></tr></tbody></table><br></div><br>-----Inline Attachment Follows-----<br><br>
<div>_______________________________________________<br>gradsusr mailing list<br><a href="http://mc/compose?to=gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></div></blockquote></div></td></tr></tbody></table><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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>