[ncl-talk] Hodogragh plots
Amadou Coulibaly
mpapin24 at gmail.com
Thu Nov 6 07:02:25 MST 2014
Dear NCL Users
I want to change a daily hodogragh script to a monthly hodogragh or seasonal
hodogragh, but I have a problem how to do it. The script works for daily
hodogragh like following:
timeindex = ind(times(:,0).eq.2010 .and. times(:,1) .eq. 2 .and. times(:,2)
.eq. 12) ; 12Z data for February 2010
But when I used following timeindex:
timeindex = ind(times(:,0).eq.2010 .and. times(:,1) .eq. 3) ; find indices
for March 2010 only
it will show me the following errors messages:
fatal:Dimension sizes of left hand side and right hand side of assignment
do not match
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 5660 in
file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 163 in
file test1.ncl
fatal:["Execute.c":7743]:Execute: Error occurred at or near line 238 in
file test1.ncl
The problem is that how to change the daily labels into the monthly labels
from:
labels = " " + ispan(0,23,1) ; labels for 24 hours
(daily labels)
nStride = 1
txid =
gsn_add_text(wks,plot,labels(::nStride),u(::nStride),v(::nStride),txres)
labels(23) = " "
;Don't do the last one.
I tried to use a loop over a month (March for instance) like:
do month=0,30,1
labels(month) = " " + ispan(0,23,1)
nStride = 1
txid =
gsn_add_text(wks,plot,labels(::nStride),u(::nStride),v(::nStride),txres)
labels(23) = " "
end do
It didn't work. I need your help.
Best regards
--
* COULIBALY AMADOU *
PhD Student on West African Climate System (WACS)
FUTA - Federal University of Technology of Akure, Nigeria
*Visiting Student - *
*University of Cologne, Germany**Institute of Geophysics and Meteorology*
Pohligstr. 3 / Office 3.102
D-50969 Köln
*Project*: WASCAL (West African Science Service Centre on Climate Change
and Adapted Land Use)
Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
15218352574
E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
"*The time is always right to do right": Nelson Mandela*
*"Character is like a tree and reputation like a shadow. The shadow is
what we think of it; the tree is the real thing" : Abraham Lincoln*
*"Do what you can, with what you have, where you are" Theodore Roosevelt*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141106/5c078b56/attachment.html
More information about the ncl-talk
mailing list