[ncl-talk] Query reg areal average

Geeta Geeta geetag54 at yahoo.com
Fri Nov 14 03:39:19 MST 2014


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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141114/9fb92a46/attachment.html 


More information about the ncl-talk mailing list