Re: reorder longitude

From: Mary Haley (haley AT ucar.edu)
Date: Sun Nov 06 2005 - 10:58:38 MST


On Sat, 5 Nov 2005 cluo@uci.edu wrote:

> Hi,
>
> I reorder the longitude in ncl script by using
>
> fl_out->lon=lonFlip(lon)
>
> The error message is"
>
> fatal:Dimension size mismatch on subscript #0, left-hand and right-hand
> side dimensions do not match
> fatal:Execute: Error occurred at or near line 4117 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> Since longitude dimenison is 1383, Is this problem related to the odd
> number of logitude? How to reorder the odd number arry?
>
> Thanks much for any help!
>
> Chao

Hi Chao,

The error message says that the left-hand and right-hand side
dimensions don't match, so it looks like there's already a
"fl_out->lon" variable in existence (perhaps from earlier variable
that you wrote to fl_out), and it is something other than 1383
elements, which is what your local variable "lon" is.

Did you write a variable to fl_out that contained a "lon" coordinate
array? If so, then this "lon" coordinate array already got written to
the file. If you want to write over it, you need to do so with a
variable of the same size.

Without seeing your whole script, I'm not sure what you are trying to
accomplish with "lonFlip", but you might need to give it a different
variable name on the file.

--Mary

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Sun Nov 06 2005 - 11:56:28 MST