NCL is a 'stronly typed language.' One aspect of this feature
is that, by default, the variable sizes on the left and right
of the assignment operator (=) must be the same size and shape.
Let
x = (/ 1, 2, 3/)
y = (/77,88,99/)
then, as expected, since 'x' is the same size and shape as 'y'
y = x ; 'y' will contain (/ 1, 2, 3/)
===
If
z = (/5,6/)
Then, the following
z = y
will result in the error message you got
> fatal:Dimension sizes of left hand side and right hand side of
assignment do not match
because 'z' is size 2 and 'y' is size 3
===
There are 2 solutions
[1] at the end of the iday loop,
frame(wks) ; advance the frame
delete(fils) ; <============
end do
[2] If you have 6.1.2 or later, use the reassignment operator ( := )
http://www.ncl.ucar.edu/current_release.shtml#NewOperator6.1.1
fils := systemfunc("ls CCO_wind_2011_Dec/cco11"+iday+".*w")
On 4/15/13 4:08 PM, Gurer, Kemal@ARB wrote:
> Hello,
>
> I am trying to plot wind profiler data with wind barbs and temperature contours drawn together, similar to the "barb_temp.gif" file that I generated using a low and high-level NCAR graphics. However, since it is not easy to work with older versions of graphics, I want to be able to better control the parameters, I want to switch to using ncl. There are two attached scripts: "test_wind.ncl" and "test_wind_temp.ncl." test_wind.ncl works fine (see barb.gid) but only for a single day at a time. First, I want to be able to draw wind barbs for each day on a different frame. When I change the day loop from a single day to multiple days, it gives an error for "fils" variable as:
>
> fatal:Dimension sizes of left hand side and right hand side of assignment do not match
> fatal:Execute: Error occurred at or near line 22 in file test_wind.ncl
>
> Since that variable is used to read multiple data files within each day, I need to read 24 hours of data files within each day and repeat this process for the next day on a separate frame. Once I pass reading wind data files for a single day, I want to plot temperature contours on the same frame along with wind barbs using test_wind_temp.ncl script. I realize that I haven't passed the first step yet, but I still want to give you a complete picture as to what I am trying to do. When I ran "test_wind_temp.ncl" script, I get the error:
>
> fatal:Subscript out of range, error in subscript #1
> fatal:An error occurred reading TestData
> fatal:Execute: Error occurred at or near line 125 in file test_wind_temp.ncl
>
> I appreciate your help.
>
> Kemal.
>
>
>
> _______________________________________________
> 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 Apr 15 16:34:30 2013
This archive was generated by hypermail 2.1.8 : Mon Apr 15 2013 - 20:12:25 MDT