subscript out of range error!!

From: marziyeh dadizadeh <marzi_d65_at_nyahnyahspammersnyahnyah>
Date: Mon Jul 23 2012 - 13:48:34 MDT

Dear NCL users,   I have a script that worked with it and it was true, without any problem. now I,m trying run it again, didn't change any thing but I am not understanding why get this error:   fatal:Subscript out of range, error in subscript #1 fatal:Execute: Error occurred at or near line 29 in file pmm.ncl   Can anyone suggests a way to solve this problem?   thanks in advance, Marzie     here is the script: --------------------------------------------------------- load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin a = addfile("wrfout_d01_2010-05-18_00_00_00.nc","r") times = wrf_user_getvar(a,"times",-1) ntimes = dimsizes(times) do it = 0,ntimes-1,1; TIME LOOP DUST_1 = wrf_user_getvar(a,"DUST_1",it) DUST_2 = wrf_user_getvar(a,"DUST_2",it) DUST_3 = wrf_user_getvar(a,"DUST_3",it) DUST_4 = wrf_user_getvar(a,"DUST_4",it) DUST_5 = wrf_user_getvar(a,"DUST_5",it) DUST = DUST_1 DUST = 0 DUST = ((DUST_1)+(DUST_2)+(DUST_3)+(DUST_4)+(DUST_5)) dust_total = DUST(0,:,:)         dust_total!0 = "lat" dust_total!1 = "lon" printVarSummary(DUST_1) printVarSummary(DUST) printVarSummary(dust_total) data= asciiread("lat&lon-M.csv",(/20/),"float") output = new((/10/),float) output!0 = "Dust" do i = 0,19,2 loc= wrf_user_ll_to_ij(a, data(i),data(i+1), 0) output(i/2) = dust_total(loc(0)-1,loc(1)-1) end do printVarSummary(output) asciiwrite("dust.txt",output) end do end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 23 13:49:42 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT