[ncl-talk] Fw: script for daily average

Dennis Shea shea at ucar.edu
Wed Jan 31 14:51:50 MST 2018


I am not sure what you were doing but *read the following documentation":

https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml
requires 6.4.0

========
  nDim    = 0
  tc2DayAvg= calculate_daily_values(tc2, "avg", nDim, False)
  tc2DayAvg at description = "Daily Mean: " + tc2 at description

  printVarSummary(tc2DayAvg)
  printMinMax(tc2DayAvg,0)
  print("-----")

On Wed, Jan 31, 2018 at 2:24 PM, Muhammad Omer Mughal via ncl-talk <
ncl-talk at ucar.edu> wrote:

>
>
>
>> Muhammad Omer Mughal
> MSc BSc Mechanical Engineering
> PhD  Research Scholar
> Remote Sensing and Satellite Research Group
> Department of Imaging and Applied Physics
> Curtin University
>
> Curtin University
> Tel | +61 8 9266 7962 <+61%208%209266%207962>
> Fax | +61 8 9266 2377 <+61%208%209266%202377>
> Mobile | 0470 237 525
>
> Email | m.mughal1 at postgrad.curtin.edu.au
> Web | http://curtin.edu.au
>
> ​ Curtin University is a trademark of Curtin University of Technology.
> CRICOS Provider Code 00301J (WA), 02637B (NSW)
>
>> ------------------------------
> *From:* Muhammad Omer Mughal
> *Sent:* Wednesday, 31 January 2018 12:17:57 PM
> *To:* ncl-talk at ucar.edu
> *Subject:* script for daily average
>
>
> Hi
>
>
> I wrote the following script to calculate the daily averages
>
>
> a=addfile("./wrfout_d05_2016-04-01_00:00:00","r")
> tc2= wrf_user_getvar(a,"T2",-1)
> tc2_dims=dimsizes(tc2)
> ntim=tc2_dims(0)
> nlat=tc2_dims(1)
> nlon=tc2_dims(2)
>
> ndays=ntim/24
>
> tc2D=reshape(tc2,(/ndays,nlat,nlon/))
> copy_VarAtts(tc2,tc2D)
> tc2_hr_avg=dim_avg_n_Wrap(tc2D,0)
>
> printVarSummary(tc2_hr)
>
> but I am seeing the following error
>
>
> input dimension sizes cannot conform to dimensions of input array
>
> The Var summaries are as follows
> Variable: tc2
> Type: float
> Total Size: 75526920 bytes
>             18881730 values
> Number of Dimensions: 3
> Dimensions and sizes:    [Time | 697] x [south_north | 129] x [west_east |
> 210]
> Coordinates:
> Number Of Attributes: 6
>   coordinates :    XLONG XLAT XTIME
>   stagger :
>   units :    K
>   description :    TEMP at 2 M
>   MemoryOrder :    XY
>   FieldType :    104
>
> Variable: nlat
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:    [1]
> Coordinates:
> (0)    129
>
>
>
>
>
>
>
> Muhammad Omer Mughal
> MSc BSc Mechanical Engineering
> PhD  Research Scholar
> Remote Sensing and Satellite Research Group
> Department of Imaging and Applied Physics
> Curtin University
>
> Curtin University
> Tel | +61 8 9266 7962
> Fax | +61 8 9266 2377
> Mobile | 0470 237 525
>
> Email | m.mughal1 at postgrad.curtin.edu.au <m.lynch at curtin.edu.au>
> Web | http://curtin.edu.au
>
> Curtin University is a trademark of Curtin University of Technology.
> CRICOS Provider Code 00301J (WA), 02637B (NSW)
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20180131/8d7267fe/attachment.html>


More information about the ncl-talk mailing list