Re: NCEP Stage IV data: problem with summation

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 09 2011 - 11:29:40 MDT

Jimmy,

What version of NCL are you using? If you have version 6.0.0 on a 64-bit system, you can now handle arrays > 2 GB in total size, and you might be able to use dim_sum.

You are limited by the amount of memory on your system, of course.

--Mary

On Aug 9, 2011, at 11:00 AM, James Correia wrote:

> Hi Mary-
> I just figured it out. Apparently, the problem was that the grid point with the most precip had a missing value. I had to account for whole sections of the domain being missing at one particular time. My solution was to do this:
> prec = prec+where(.not.ismissing(temp),temp,0.)
>
> so that I check for missing values and set them to zero so when I add them they don't get set to missing. Of course I also have to keep track of the number of missing times so I know the dataset is mostly uniform.
>
> If I could have stored the entire dataset in an array and used the dim_sum I dont think this would have been an issue.
>
> Sorry for the bother.
> jimmyc
>
> On Tue, Aug 9, 2011 at 11:54 AM, Mary Haley <haley@ucar.edu> wrote:
> Hi,
>
> I don't really have enough information to go on here. I've certainly never heard of NCL "resetting" a summation in mid-loop, so I'm guessing that there's something
> else going on.
>
> Can you provide your full script and data so I can run it here?
>
> Please see:
>
> http://www.ncl.ucar.edu/report_bug.shtml
>
> --Mary
>
> On Aug 8, 2011, at 12:59 PM, James Correia wrote:
>
> > NCLers-
> > I am reading in hourly stage iv precip data, over conus, for a select period of 25 days. Since the grid is relatively large (881,1121) I read the data in and perform a running sum.
> > About half way through the script, the running sum resets. The code snippet is below. By reset, I mean the second print statement where max(prec) is being printed:
> > (0) Reading: ST4.2011051917.01h.grb 2276.34 0
> > (0) Reading: ST4.2011051918.01h.grb 267.42 0
> >
> >
> > Has anyone seen anything like this before?
> >
> > The files all have the same missing value, and I made sure my arrays have the same missing value. Metadata:
> > Variable: temp
> > Type: float
> > Total Size: 3950404 bytes
> > 987601 values
> > Number of Dimensions: 2
> > Dimensions and sizes: [g5_x_0 | 881] x [g5_y_1 | 1121]
> > Coordinates:
> > Number Of Attributes: 14
> > sub_center : Environmental Modeling Center
> > center : US National Weather Service - NCEP (WMC)
> > long_name : Total precipitation
> > units : kg/m^2
> > _FillValue : 1e+20
> > coordinates : g5_lat_0 g5_lon_1
> > level_indicator : 1
> > gds_grid_type : 5
> > parameter_table_version : 2
> > parameter_number : 61
> > model : River Forecast Center Quantitative Precipitation estimate mosaic generated by NCEP
> > forecast_time : 1
> > forecast_time_units : hours
> > initial_time : 05/19/2011 (23:00)
> >
> >
> > I plotted the raw data to see if there was a problem, but didnt really notice anything.
> > Thanks for any help
> > jimmyc
> >
> >
> >
> >
> >
> > ;CODE
> > prec = new((/881,1121/),float)
> > prep = new((/24,881,1121/),float)
> > prec = 0.
> > prep = 0.
> > pre = new((/24,881,1121/),float)
> > ts = new((/24*imax/),float)
> > ts@_FillValue = 1e20
> > printVarSummary(prec)
> > prec@_FillValue = 1e20
> > prep@_FillValue = 1e20
> > t = -1
> > do i=0,imax-1
> > if(i .eq. 0)then
> > mo = sup(0)
> > end if
> > if(i .eq. 17)then
> > mo = sup(1)
> > end if
> > do j=0,23
> >
> > file1 = nam+dat(i)+dy(j)+man
> > ;print("Reading:"+" "+file1)
> >
> > f = addfile(file1,"r")
> >
> > ;printVarSummary(f)
> >
> > temp = f->A_PCP_GDS5_SFC_acc1h
> > if(i.eq.9 )then
> > printVarSummary(temp)
> > print("Reading:"+" "+file1+" "+max(temp)+" "+min(temp))
> > pre(j,:,:) = temp
> > end if
> > prec = temp+prec
> > t=t+1
> > ts(t) = prec(249,517);(551,680);
> >
> > print("Reading:"+" "+file1+" "+max(prec)+" "+min(prec))
> > prep(j,:,:) = prep(j,:,:) + temp
> > delete(temp)
> > delete(file1)
> > end do
> > end do
> >
> > --
> > ------------------------------------------------------------------------------------------
> > The views expressed in this email do not necessarily reflect those of NOAA, the National Weather Service, or the University of Oklahoma.
> > ------------------------------------------------------------------------------------------
> > James Correia Jr.
> > OU CIMMS Research Associate
> > SPC HWT Liaison
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> --
> ------------------------------------------------------------------------------------------
> The views expressed in this email do not necessarily reflect those of NOAA, the National Weather Service, or the University of Oklahoma.
> ------------------------------------------------------------------------------------------
> James Correia Jr.
> OU CIMMS Research Associate
> SPC HWT Liaison
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 9 11:29:47 2011

This archive was generated by hypermail 2.1.8 : Fri Aug 12 2011 - 11:48:30 MDT