Hi NCL users,
I just wonder how to figure out this error: fatal:Subscript out of range,
error in subscript #0
I think I've set everything quite well as follow:
begin
f = addfile(./sst.nc", "r") ; ALL times on file
time = f->time
ymd = cd_calendar(time, -2) ; convert
ymdStrt = 20070601 ; year-month start
ymdLast = 20070610 ; year-month last
iStrt = ind(ymd.eq.ymdStrt) ; index start
iLast = ind(ymd.eq.ymdLast) ; index last
delete(time)
delete(ymd)
==================
SST = f->sst *(iStrt:iLast,:,:)* ; read only specified time period
SST@_FillValue= -999
[SNIP]
==================
print("PLOT --->>>")
*do i=iStrt, iLast*
wks = gsn_open_wks("pdf","SST"+i)
gsn_define_colormap(wks,"GreenYellow") ; choose color map
* res@tiMainString = "SST Pacific, Time: "+i+" "*
plot = gsn_csm_contour_map(wks,*SST(i,:,:)*,res)
delete(wks)
end do
end
======
I also just wonder how to reversed the index values back to the ymd values
thus i can attach it on my res@tiMainString correctly.
Thanks a lot
Cheers...
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 24 15:17:32 2012
This archive was generated by hypermail 2.1.8 : Wed Sep 26 2012 - 13:56:04 MDT