[Thread Prev][Thread Next][Index]

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



Hi everyone,
After some more discussion off-line, we've found that Steve's data, where the units of the coordinate data are in km, was triggering a test in the Ferret code for whether we've crossed a branch cut.  That code is intended to do a better job of matching data across the branch cut, but it caused this curvilinear data with units of km to go haywire.  I think I have a fix for this and it'll be included in the next release.

Ansley


Stephen Guimond wrote:
Hi Ansley,
  Thanks for your quick reply.  My x and y points are actually in km not longitudes (don't know if that makes any difference).  The center of the domain is at (0,0) with points to the right and left having positive and negative values, respectively.  I tried overlaying "rings" of points instead of all at once and you can start to see some breakdown on the edges of the circle.  As I said, I can lay down j=1:120 fine, but over this things get messy.  Here is a list of x and y values for a point inside j=1:120 and a point outside j=1:120...

I'm still not sure what the answer is.

yes? list nndx[g=nuu,j=100],nndy[g=nuu,j=100],nndx[g=nuu,j=130],nndy[g=nuu,j=130]
             DATA SET: ./look
             X: 0.5 to 73.5
 Column  1: NNDX[Y=200] is NDX[G=G3]
 Column  2: NNDY[Y=200] is NDY[G=G3]
 Column  3: NNDX[Y=260] is NDX[G=G3]
 Column  4: NNDY[Y=260] is NDY[G=G3]
            NNDX   NNDY   NNDX   NNDY
1    /  1:  192.0    7.0  252.0   12.0
2    /  2:  190.0   24.0  249.0   35.0
3    /  3:  186.0   41.0  244.0   57.0
4    /  4:  181.0   58.0  237.0   78.0
5    /  5:  174.0   74.0  229.0   99.0
6    /  6:  166.0   90.0  218.0  120.0
7    /  7:  157.0  104.0  206.0  139.0
8    /  8:  146.0  118.0  192.0  157.0
9    /  9:  134.0  131.0  177.0  173.0
10   / 10:  122.0  143.0  160.0  189.0
11   / 11:  108.0  153.0  142.0  202.0
12   / 12:   93.0  163.0  123.0  215.0
13   / 13:   78.0  171.0  103.0  225.0
14   / 14:   61.0  177.0   82.0  234.0
15   / 15:   45.0  183.0   60.0  241.0
16   / 16:   28.0  186.0   38.0  246.0
17   / 17:   10.0  189.0   16.0  249.0
18   / 18:   -6.0  190.0   -6.0  250.0
19   / 19:  -23.0  189.0  -29.0  249.0
20   / 20:  -41.0  186.0  -51.0  246.0
21   / 21:  -58.0  183.0  -73.0  241.0
22   / 22:  -74.0  177.0  -95.0  234.0
23   / 23:  -91.0  171.0 -116.0  225.0
24   / 24: -106.0  163.0 -136.0  215.0
25   / 25: -121.0  153.0 -155.0  202.0
26   / 26: -135.0  143.0 -173.0  189.0
27   / 27: -147.0  131.0 -190.0  173.0
28   / 28: -159.0  118.0 -205.0  157.0
29   / 29: -170.0  104.0 -219.0  139.0
30   / 30: -179.0   89.0 -231.0  119.0
31   / 31: -187.0   74.0 -242.0   99.0
32   / 32: -194.0   58.0 -250.0   78.0
33   / 33: -199.0   41.0 -257.0   57.0
34   / 34: -203.0   24.0 -262.0   35.0
35   / 35: -205.0    7.0 -265.0   12.0
36   / 36: -206.0  -10.0 -266.0  -10.0
37   / 37: -205.0  -27.0 -265.0  -32.0
38   / 38: -203.0  -44.0 -262.0  -55.0
39   / 39: -199.0  -61.0 -257.0  -77.0
40   / 40: -194.0  -78.0 -250.0  -98.0
41   / 41: -187.0  -94.0 -242.0 -119.0
42   / 42: -179.0 -110.0 -231.0 -140.0
43   / 43: -170.0 -124.0 -219.0 -159.0
44   / 44: -159.0 -138.0 -205.0 -177.0
45   / 45: -147.0 -151.0 -190.0 -193.0
46   / 46: -135.0 -163.0 -173.0 -209.0
47   / 47: -121.0 -173.0 -155.0 -222.0
48   / 48: -106.0 -183.0 -136.0 -235.0
49   / 49:  -91.0 -191.0 -116.0 -245.0
50   / 50:  -74.0 -197.0  -95.0 -254.0
51   / 51:  -58.0 -203.0  -73.0 -261.0
52   / 52:  -41.0 -206.0  -51.0 -266.0
53   / 53:  -23.0 -209.0  -29.0 -269.0
54   / 54:   -6.0 -210.0   -6.0 -270.0
55   / 55:   10.0 -209.0   16.0 -269.0
56   / 56:   28.0 -206.0   38.0 -266.0
57   / 57:   45.0 -203.0   60.0 -261.0
58   / 58:   61.0 -197.0   82.0 -254.0
59   / 59:   78.0 -191.0  103.0 -245.0
60   / 60:   93.0 -183.0  123.0 -235.0
61   / 61:  108.0 -173.0  142.0 -222.0
62   / 62:  122.0 -163.0  160.0 -209.0
63   / 63:  134.0 -151.0  177.0 -193.0
64   / 64:  146.0 -138.0  192.0 -177.0
65   / 65:  157.0 -124.0  206.0 -159.0
66   / 66:  166.0 -109.0  218.0 -139.0
67   / 67:  174.0  -94.0  229.0 -119.0
68   / 68:  181.0  -78.0  237.0  -98.0
69   / 69:  186.0  -61.0  244.0  -77.0
70   / 70:  190.0  -44.0  249.0  -55.0
71   / 71:  192.0  -27.0  252.0  -32.0
72   / 72:  193.0  -10.0  253.0  -10.0
73   / 73:  192.0    7.0  252.0   12.0


----- Original Message -----
From: Ansley Manke <Ansley.B.Manke@xxxxxxxx>
Date: Tuesday, July 8, 2008 11:12 am
Subject: Re: 3 Arguement (Curvilinear) Fill Problem
To: Stephen Guimond <sguimond@xxxxxxx>
Cc: oar.pmel.ferret_users@xxxxxxxx

  
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


  

------------------------------------------------------------------
      
------
    




[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement