[ncl-talk] Subscript Errors
Kelly Neugent
kjneugent at mail.plymouth.edu
Mon Nov 2 10:39:03 MST 2015
Hello,
I am attempting to run a do loop where I can get it to run monthly, but I keep getting an error message: "fatal:Illegal subscript. Vector subscripts must be integer"
MaxMonthT = new((/3,12/),"double")
x = new((/3,12/),"float")x = new((/3,12/),"float")
do i=1,12,1
MaxMonthT(0,i-1) = avg(MaxF(ind(datestrsplit(:,1)).eq.i))
MaxMonthT(1,i-1) = max(MaxF(ind(datestrsplit(:,1)).eq.i))
MaxMonthT(2,i-1) = min(MaxF(ind(datestrsplit(:,1)).eq.i))
x(0,(i-1)) = i
x(1,(i-1)) = i
x(2,(i-1)) = i
end do
I have checked both MaxF and datestrplit by using VarSummary and I have adjusted both of these so that they are integers.
The error occurs on the 4th line shown here--- MaxMonthT(0,i-1) = avg(MaxF(ind(datestrsplit(:,1)).eq.i))
Could you provide any assistance on this matter? Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151102/10baee66/attachment.html
More information about the ncl-talk
mailing list