[gradsusr] xy2gr bug?

Jennifer M Adams jadams21 at gmu.edu
Wed Jul 5 11:42:46 EDT 2017


Hi, Dave — 
1. What are the XDEF and YDEF entries in your descriptor file?
2. What were the commands you issued (including the dimension environment) when you drew a plot before issuing the ‘q xy2gr’ command? Did you set mprog off?
—Jennifer

> On Jun 19, 2017, at 12:35 PM, Ryglicki, Dr. David <david.ryglicki at nrlmry.navy.mil> wrote:
> 
> Hey, GrADS list.
>  
> I’m getting an error with xy2gr – it’s duplicating the results of xy2w but only under specific circumstances. I’m using a Cartesian domain that’s not georeferenced (km from the origin as opposed to lat/lon on the planet). The two functions give similar results up to a point. To wit:
>  
> Position = 5.15564 2.55131 1 0
>  
> ga-> q xy2gr 5.15564 2.55131
> Xdim = 288.285  Ydim = -1179.48
>  
> ga-> q xy2w 5.15564 2.55131 
> Lon = 3862.26  Lat = -1179.48
>  
> ga-> q xy2gr 5.15564 1.55131
> Xdim = 288.285  Ydim = -1579.48
>  
> ga-> q xy2gr 5.15564 3.55131
> Xdim = 288.285  Ydim = 74.3479
>  
> ga-> q xy2gr 5.15564 2.55131
> Xdim = 288.285  Ydim = -1179.48
>  
> ga-> q xy2gr 5.15564 2.65131
> Xdim = 288.285  Ydim = -1139.48
>  
> ga-> q xy2gr 5.15564 2.75131
> Xdim = 288.285  Ydim = -1099.48
>  
> ga-> q xy2gr 5.15564 2.85131
> Xdim = 288.285  Ydim = -1059.48
>  
> ga-> q xy2gr 5.15564 2.95131
> Xdim = 288.285  Ydim = -1019.48
>  
> ga-> q xy2gr 5.15564 3.05131
> Xdim = 288.285  Ydim = 68.7923
>  
> ga-> q xy2gr 5.15564 3      
> Xdim = 288.285  Ydim = -1000
>  
> ga-> q xy2gr 5.15564 3.01
> Xdim = 288.285  Ydim = 68.3333
>  
> ga-> q xy2w 5.15564 3.01 
> Lon = 3862.26  Lat = -996
>  
> ga-> q xy2w 5.15564 3.00
> Lon = 3862.26  Lat = -1000
>  
>  
> The takeaway here is that when the position moves above -1000 “latitude,” then xy2gr is giving me the y-position grid index. Below that, then it’s the “world” coordinate. I don’t think the 3 means anything, here (just a guess).
>  
> Operator-error goof or bug?
>  
> ~Dave
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University






More information about the gradsusr mailing list