RE: [ncl-talk] rainfall calculations

From: Debasish Pai Mazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Tue, 22 Aug 2006 12:24:08 -0800

Dear Anil Rohilla,

Give a try the way mention below

time = fspan( start, finish , num) ; in your case num=33
rain!0 ="time"
rain&time=time

put this three lines before the 17 th line in your program .

Good luck
Debasish

-----Original Message-----
From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf
Of anil rohilla
Sent: Tuesday, August 22, 2006 11:28 AM
To: ncl-talk_at_ucar.edu
Subject: rainfall calculations

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

---------------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:08 MDT

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