[Thread Prev][Thread Next][Index]

Re: [ferret_users] Doubt on usage of SCAT2GRID_BIN_XYT function



Hi Joerg,
Try this to flip the plot over in Y:
SHADE/VLIMITS=90:0 
The axis definition will always have increasing coordinates, but in the graphics step, we can ask the plot to be drawn the other way up.

Yes, I think the question about the axis definition is due to rounding. Axis coordinate definitions are made in double precision, so 0.00833333 is smaller than 1/120 when stored in double precision. To define the axis without issues of precision, you could use /NPOINTS:
define axis/x=-180:180/npoints=43200/edges/unit=degrees x1km
Or, give the full double-precision value for 1/120
define axis/x=-180:180:0.008333333333333333/edges/unit=degrees x1km
Either of these gives you the correct modulo axis, with the grid cell edges at -180 and 180 and the grid cell centers half of a 1/120 degree grid cell size from each end. Writing delta-x without its full precision may result in the wrong number of cells, and if the total length becomes longer than 360 then it isn't a modulo axis.

Ansley

On 11/19/2013 2:52 AM, Kaduk, Joerg (Dr.) wrote:

Hello,

 

I am reading some binary stream data and I get them displayed upside down (see below).

I tried various things to turn the data around, but haven’t found the trick.

Any pointer most appreciated.

 

Another thing I found strange was that if I used the axes with /edges I got one point too many:

define axis/x=-180:180:0.00833333/edges/unit=degrees x1km

gave me 43201 points. A rounding issue?

 

This is:

                FERRET v6.84 

                Linux 2.6.32-358.11.1.el6.x86_64 64-bit - 09/05/13

 

Thank you very much!

Cheers,

Joerg

 

 

canc data 1

define axis/x=-179.99583333:179.99583333:0.00833333/unit=degrees x1km

define axis/y=89.99583333S:89.99583333N:0.00833333/unit=degrees y1km

define grid/x=x1km/y=y1km gr1km

set data/ez/format=stream/var=st/type=i2/grid=gr1km hwsd.bil

show data

set mem/size=4000

 

shade st[i=1:43200:60,j=1:21600:30]

 

 

I can reverse the y axis like so:

define axis/y=89.99583333N:89.99583333S:0.00833333/unit=degrees y1km

 

but that does not make a difference



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement