[ncl-talk] Query reg areal average

Kyle Griffin ksgriffin2 at wisc.edu
Fri Nov 14 07:04:18 MST 2014


Hi Geeta,

Only *you* can tell us if you're using the weighted averaging function
correctly. If it works, then you are using the correct technique to use the
function. However, if you want to weight the average by area, I believe you
are not using it correctly and need to consider a weighting by latitude to
account for the shrinking area as your y (lat) coordinate increases.

I have no idea what the function 'aave' is supposed to do in grads - you
need to provide more details if you want to duplicate those results - but I
assume it might be an areal-average calculation with similar weighting
considerations to what I mentioned above.

Reply back to the list with any further questions...


Kyle

----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1421
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2 at wisc.edu

On Fri, Nov 14, 2014 at 4:39 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> Hi.
> i want to clarify a doubt regarding the computation of average rainfall
> for a domain say, 9-22N/74-87E.
>
> for this I am using following script.
> begin
> fili    = "model24_2011060100.nc"         ;       file
> ;***************************************************************
>
>
> f      = addfile (fili, "r")
>
>
> data=f->APCP_24(:,:)
> printVarSummary(data)
>
>
> rf_averg=wgt_areaave(data,1.0,1.0,0)
> print(rf_averg)
>
> So NCL gives me the areaaverf of 6.40mm.
> OUTPUT:--------------------------------------------------
> bash-3.2$ ncl mdlrf.ncl
>  Copyright (C) 1995-2007 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 5.0.0
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
>
>
> Variable: data
> Type: float
> Total Size: 106276 bytes
>             26569 values
> Number of Dimensions: 2
> Dimensions and sizes:   [lat | 163] x [lon | 163]
> Coordinates:
> Number Of Attributes: 12
>   name :        APCP
>   long_name :   Total precipitation
>   level :       A24
>   units :       kg/m^2
>   grib_code :   61
>   _FillValue :  -9999
>   init_time :   20110601_000000
>   init_time_ut :        1306886400
>   valid_time :  20110602_030000
>   valid_time_ut :       1306983600
>   accum_time :  240000
>   accum_time_sec :      86400
>
>
> Variable: rf_averg
> Type: float
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:   [1]
> Coordinates:
> Number Of Attributes: 1
>   _FillValue :  -9999
> (0)     6.400823
> bash-3.2$
>
>
> I have two questions pertaining to this.
> 1. is the usage of the function  wgt_areaave Correct.
> 2. when I calculate the areal average using the function aave of grads
> ga-> define x1= APCPsfc.1-APCPsfc.2
> Define memory allocation size = 106928 bytes
> ga-> d aave(x1,lon=74,lon=87,lat=9,lat=22)
> Result value = 6.68369
> There is discrepancy in the results.
>
> kindly guide me towards right direction.
> Geeta
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141114/1aeb2ad8/attachment.html 


More information about the ncl-talk mailing list