Re: "Subscript out of range, error in subscript #0"

From: Satyaban Bishoyi Ratna <satyaban14_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 17 2011 - 14:17:31 MST

Dear Axel,
Thanks for suggestion.
I removed the dimension "level" from the script.
Now it is working fine.

Best regards
Satyaban

On Tue, Jan 18, 2011 at 2:01 AM, Seifert Axel <Axel.Seifert@dwd.de> wrote:

>
> v1 =f->olr
> dsizes_x = dimsizes(v1)
> ntim = dsizes_x(0)
> nlat = dsizes_x(1)
> nlev = dsizes_x(2)
> mlon = dsizes_x(3)
>
> olr only has dimensions (time, lat, lon), which are 3, not 4, I guess.
>
> Axel
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: ncl-talk-bounces@ucar.edu im Auftrag von Satyaban Bishoyi Ratna
> Gesendet: Mo 17.01.2011 21:19
> An: Dennis Shea
> Cc: ncl-talk@ucar.edu
> Betreff: Re: [ncl-talk] "Subscript out of range, error in subscript #0"
>
>
> Dear Dr. Shea,
> Thanks for suggestion. I couldn't find any mistake in the script.
> Please find herewith attached the NCL script and inform me where it is
> going
> wrong.
>
> Thanks.
> Best regards
> Satyaban
>
> On Tue, Jan 18, 2011 at 1:37 AM, Dennis Shea <shea@ucar.edu> wrote:
>
> > This tells us nothing.
> > =====
> >
> > Look at line 16 in your script.
> >
> > Remember NCL is written in C. Hence, it has zero based indexing.
> > This is different from fortran's one based indexing
> >
> > Consider x(N)
> >
> > NCL:
> > do n=0,N-1
> > ... x(n) ...
> > end do
> >
> > Fortran
> > do n=1,N
> > ... x(n) ...
> > end do
> >
> >
> >
> >
> >
> >
> > On 1/17/11 1:00 PM, Satyaban Bishoyi Ratna wrote:
> >
> >> Dear NCL user,
> >> I am getting "Subscript out of range, error in subscript #0", while
> >> running a NCL
> >> script. Following is the error message. Kindly provide me solution.
> >>
> >> ***************
> >> fatal:Subscript out of range, error in subscript #0
> >> fatal:An error occurred reading dsizes_x
> >> fatal:Execute: Error occurred at or near line 16 in file filterdata.ncl
> >> ******************
> >>
> >> My file is having following Header.
> >> netcdf olr.day.mean.djf1980-2009 {
> >> dimensions:
> >> lon = 144 ;
> >> lat = 73 ;
> >> time = 2707 ;
> >> variables:
> >> double lon(lon) ;
> >> lon:units = "degrees_east" ;
> >> lon:long_name = "Longitude" ;
> >> double lat(lat) ;
> >> lat:units = "degrees_north" ;
> >> lat:long_name = "Latitude" ;
> >> double time(time) ;
> >> time:long_name = "Time" ;
> >> time:units = "minutes since 1980-12-01 00:00" ;
> >> double olr(time, lat, lon) ;
> >> olr:missing_value = -999000000. ;
> >> }
> >>
> >>
> >> Thanks.
> >> Best regards
> >> Satyaban
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 17 14:21:38 2011

This archive was generated by hypermail 2.1.8 : Tue Jan 25 2011 - 14:22:15 MST