[gradsusr] Obtaining total values of a dimension on a netCDFfile
Rashed Mahmood
rashidcomsis at gmail.com
Thu Jul 29 05:34:30 EDT 2010
Thiago
Please try this:
'define FinalOutputVariableName'
'set sdfwrite filename.nc'
'sdfwrite FinalOutputVariableName'
Hope it works
Rashed
On Sat, Jul 24, 2010 at 4:33 AM, Thiago Veloso <thi_veloso at yahoo.com.br>wrote:
> Dr. Bernd,
>
> 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).
>
> Now the big question is: how to write these results into a netcdf file?
>
> Best regards,
>
> Thiago.
>
>
> --- On *Fri, 23/7/10, Becker, Bernd <bernd.becker at metoffice.gov.uk>*wrote:
>
>
> From: Becker, Bernd <bernd.becker at metoffice.gov.uk>
> Subject: Re: [gradsusr] Obtaining total values of a dimension on a
> netCDFfile
> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> Date: Friday, 23 July, 2010, 5:37
>
>
> Ok.
> you are getting there.
>
> try:
> set t 1
>
> d sum(data,t=1,t=32)
>
> any numbers looking familiar?
> Cheers,
> Bernd.
>
>
> ------------------------------
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Thiago Veloso
> *Sent:* 22 July 2010 18:06
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] Obtaining total values of a dimension on a
> netCDFfile
>
> Dear Bernd,
>
> Thanks for your reply.
>
> After trying the procedure you suggested I received lots of information
> on display. Each information set corresponding to a specific day.
>
> For example, setting t 1 3 generates:
>
> ga-> set t 1 3
> Time values set: 2009:1:1:0 2009:1:3:0
> ga-> d cmorph
> Data Type = grid
> Dimensions = 0 1
> I Dimension = 0 to 4949 Linear -0.0363783 0.0727567
> J Dimension = 1 to 1649 Linear -59.9636 0.0727714
> Sizes = 4950 1649 8162550
> Undef value = -9.99e+08
> Undef count = 114789 Valid count = 8047761
> Min, Max = 0 241
> Cmin, cmax, cint = 0 240 20
> Stats[sum,sumsqr,root(sumsqr),n]: 4.20946e+06 8.7492e+07 9353.71
> 8047761
> Stats[(sum,sumsqr,root(sumsqr))/n]: 0.523059 10.8716 3.29721
> Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.523059 10.8716 3.29721
> Stats[(sigma,var)(n)]: 3.25546 10.598
> Stats[(sigma,var)(n-1)]: 3.25546 10.598
> Data Type = grid
> Dimensions = 0 1
> I Dimension = 0 to 4949 Linear -0.0363783 0.0727567
> J Dimension = 1 to 1649 Linear -59.9636 0.0727714
> Sizes = 4950 1649 8162550
> Undef value = -9.99e+08
> Undef count = 89326 Valid count = 8073224
> Min, Max = 0 217
> Cmin, cmax, cint = 0 200 20
> Stats[sum,sumsqr,root(sumsqr),n]: 3.78218e+06 7.38863e+07 8595.71
> 8073224
> Stats[(sum,sumsqr,root(sumsqr))/n]: 0.468485 9.15202 3.02523
> Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.468485 9.15202 3.02523
> Stats[(sigma,var)(n)]: 2.98874 8.93254
> Stats[(sigma,var)(n-1)]: 2.98874 8.93254
> Data Type = grid
> Dimensions = 0 1
> I Dimension = 0 to 4949 Linear -0.0363783 0.0727567
> J Dimension = 1 to 1649 Linear -59.9636 0.0727714
> Sizes = 4950 1649 8162550
> Undef value = -9.99e+08
> Undef count = 177477 Valid count = 7985073
> Min, Max = 0 200
> Cmin, cmax, cint = 0 200 20
> Stats[sum,sumsqr,root(sumsqr),n]: 3.8412e+06 9.12816e+07 9554.14
> 7985073
> Stats[(sum,sumsqr,root(sumsqr))/n]: 0.481048 11.4315 3.38105
> Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 0.481048 11.4315 3.38106
> Stats[(sigma,var)(n)]: 3.34666 11.2001
> Stats[(sigma,var)(n-1)]: 3.34666 11.2001
> ga->
>
> Is this information enough?
>
> Best wishes,
>
> Thiago.
>
>
> --- On *Thu, 22/7/10, Becker, Bernd <bernd.becker at metoffice.gov.uk>*wrote:
>
>
> From: Becker, Bernd <bernd.becker at metoffice.gov.uk>
> Subject: Re: [gradsusr] Obtaining total values of a dimension on a netCDF
> file
> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> Date: Thursday, 22 July, 2010, 12:20
>
> sdfopen file.nc
> set gxout stats
>
> set t 1 32
> d var
>
> what does that produce?
>
> Bernd.
>
> ------------------------------
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Thiago Veloso
> *Sent:* 22 July 2010 15:18
> *To:* gradsusr at gradsusr.org
> *Subject:* [gradsusr] Obtaining total values of a dimension on a netCDF
> file
>
> Dear GrADS colleagues,
>
> 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.
>
> Could anybody give some directions?
>
> Best regards,
>
> Thiago.
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org <http://mc/compose?to=gradsusr@gradsusr.org>
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100729/53c7f0e5/attachment-0003.html
More information about the gradsusr
mailing list