Re: rainfall calculations

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 22 Aug 2006 14:24:30 -0600 (MDT)

On Tue, 22 Aug 2006, anil rohilla wrote:

> Dear lest .
> i am trying to find our accumulated rainfall daily from my
> data. my script is giving this error ..........
>
> -------------------------------------------
> [anilkuma_at_farkleberry WRF_NCL]$ ncl ra.ncl
> Copyright (C) 1995-2004 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 4.2.0.a032
> The use of this software is governed by a License Agreement.
> See http://ngwww.ucar.edu/ncl/ for more details.
>
>
> Variable: rain
> Type: float
> Total Size: 5018112 bytes
> 1254528 values
> Number of Dimensions: 3
> Dimensions and sizes: [33] x [192] x [198]
> Coordinates:
> fatal:(time) is not a named dimension in variable (rain).
> fatal:Execute: Error occurred at or near line 19 in file ra.ncl

Hi Anil,

The quick answer is that your "rain" variable has no coordinate
information attached to it because you are assigning it with
the following code:

     rain=(/RAINC+RAINC/)

When you put "(/" and "/)" around a variable, this tells NCL not to
copy any metadata information. The error message is coming from the
line:

      ntim = dimsizes(rain&time)

which is effectively trying to access a coordinate variable called "time"
that is supposed to be attached to "rain".

If instead you do:

     rain=RAINC+RAINC

you may get the coordinate information that you expect. This depends
however, on RAINC having coordinate information attached to it.

--Mary

> ---------------my script is
> load "WRFOptions.ncl" ; set basic plot options here
> load "gsn_code.ncl"
> load "WRFPlot.ncl"
> load "WRFUserARW.ncl"
> load "SkewTFunc.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
> diri = "/datatmp3/anilkuma/JULY-06_RUN/betts-miler-10aug/"
> fils = systemfunc ("ls "+diri+"wrfout_d02*")
> g = addfiles (fils+".nc", "r") ; note the "s" of addfile
> RAINC = g[:]->RAINC ; (Time, south_north, west_east)
> RAINNC = g[:]->RAINNC
> rain=(/RAINC+RAINC/)
> printVarSummary (rain)
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ntim = dimsizes(rain&time)
> finppt = rain(0::ntim/8-1,:,:) ; preallocate space for new daily ppt
> array
> ; metadata information kept
> temp = rain(lat|:,lon|:,time|:) ; reorder array so that time is the
> ; rightmost dimension. dim_sum will operate
> ; on the rightmost dimension
> delete(rain_tot)
> cntr = 0
> do gg = 0,ntim-1,8 ; increment do loop by 8
> finppt(cntr,:,:) = (/ dim_sum(temp(:,:,gg:gg+7)) /)
> cntr = cntr+1
> end do
> delete(temp)
> delete(cntr)
> printVarSummary(finppt)
> end
>
>
> -------------------------------------------
> i tryed to change time to times ,,but time variable in my script it is
> not able to find out ....but when i am printing the summary for rain
> variable it is taking time as shown in output ,,,,,33 values..
>
> Any help is much appriciated ..you can email me at anilkuma_at_ucar.edu also /..
>
> regards
>
>
>
>
>
> --
> ANIL KUMAR ROHILLA
> Meteorologist
> Long Range Forecasting Section
> NATIONAL CLIMATE CENTER
> O/o ADGM(Research)
> India Meteorological Department
> Shivaji Nagar
> PUNE-411005.
> INDIA
> Mobile: 09422023277
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 22 2006 - 14:24:30 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 22 2006 - 14:25:33 MDT