[Thread Prev][Thread Next][Index]

[ferret_users] Re: 3 Arguement (Curvilinear) Fill Problem



Hi Steve,
When you have a polar region, the curvilinear plotting commands can break down a bit. What do the longitudes look like?
yes? shade nndx
Here's one possibility for what's happening:  If the branch cuts across the region at an angle (see an example below with some data I happen to have), then the 3-argument plot commands can have some trouble, drawing across the plot because 0 is next to 360 at, say, i=60, but in the next row, 0 is next to 360 at i=59.

One way to deal with this is to break up the region into two or more so that the longitudes are monotonic in each one -- something along these lines.
yes? use example_wind.nc
yes? set view ul; shade longitude; go land
! Here, the longitudes are monotonic in j=1:60 and in j=61:122, if we add a constant value for longitude<0:
yes? let longfix = if longitude lt 0 then longitude + 360 else longitude
yes? set view ll; shade longitude[j=1:60]; go land
yes? set view lr; shade longfix[j=61:122]; go land
yes? frame/file=split_up_longitudes.gif
If this kind of thing is going on, then we can do a fill/vlim/hlim with part of the data, and fill/over with the rest of the data and a fix on the longitudes.  Let us know if this seems to be along the lines of what you need.

Ansley

Stephen Guimond wrote:
Hi Ansley,

My normal e-mail address (the one connected to the ferret users group) is having problems but I wanted to get this question out to the group.  If it doesn't go through can you forward on?

I am getting some wacky features when plotting data using the 3 argument fill command.  My data is on a cylindrical grid and thus a 2-D slice makes a circle.  Here is how I read in my data (array is (72,200)):

def axis/x=1:72:1/modulo xax;def axis/y=2:400:2/units=km yax
def grid/x=xax/y=yax g2
file/grid=g2/format=stream/var="ndx,ndy,uu" look

!necessary to regrid to fill the gap in the circle
def axis/x=1:73:1 nx
def grid/like=g2/x=nx g3

let nndx = ndx[g=g3]
let nndy = ndy[g=g3]
let nuu = uu[g=g3]

fill nuu,nndx,nndy

The attached plot is the output.  Looks okay for j=1:120 but after that things go wild.  I overlaid my grid points with polymark to show that they are not the problem.

Thanks for the help,
Steve


  



GIF image


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement