difference between avg and dim_avg (BIG DIFFERENCE ????????)

From: Sanjiv Kumar <sanjivconscious_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 02 2010 - 09:54:42 MDT

Hello,

I am using follwing functions to calculate average monthly value for the
mississipi river basin.
I have a mask file for the mississippi river basin that i used to mask the
data.

*PrintVarSummary(pcp)*
Variable: pcp
Type: float
Total Size: 41880240 bytes
            10470060 values
Number of Dimensions: 3
Dimensions and sizes: [month | 12] x [lat | 621] x [lon | 1405]
Coordinates:
            month: [0..11]
            lat: [49.9375..24.0625]
            lon: [-125.0208..-66.47912]
Number Of Attributes: 5
  units : mm/month
  long_name : monthly_prism_pcp
  _FillValue : -9999
  time_op_ncl : Climatology: 25 years
  info : function clmMonLLT: contributed.ncl

*option 1: print(dim_avg_Wrap(dim_avg_Wrap(pcp)))*
**
(0) 58.64856
(1) 58.87543
(2) 74.17915
(3) 79.49629
(4) 102.1536
(5) 105.3508
(6) 89.25518
(7) 77.08332
(8) 74.19021
(9) 71.37045
(10) 71.6111
(11) 63.43136

*Average: 77.14*
**
**
*Option2: *
**
*do i= 0, 11
     print(avg(pcp(month|i, lat|:, lon|:)))
end do*

(0) 40.91084
(0) 43.56288
(0) 61.70639
(0) 72.314
(0) 98.81877
(0) 95.28362
(0) 84.07236
(0) 72.15498
(0) 67.86727
(0) 61.63789
(0) 59.42875
(0) 48.38778

*Average: 67.16*
**
*My question is whay there is big difference between these
two???????????????*
**
*Results obtained from option 2 seem to be more realistic to me.*
**
*Let me know if you need any further detail.*
**
*thanks*
*sanjiv*

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 2 09:54:50 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 08 2010 - 08:08:50 MST