<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>And I completely spaced on #2.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Here are the commands, with another script called in the middle that issues “set mproj off.” Here’s the code snippet:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'reinit'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>rc=gsfallow('on')<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>ctl = 'cotc.Patricia.grid_1.ctl'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'open 'ctl<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'set lon 2500 5500'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'set lat -2000 1000'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'q file'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>rec = sublin(result,5)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>nx = subwrd(rec,3)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>ny = subwrd(rec,6)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>nz = subwrd(rec,9)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>nt = subwrd(rec,12)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>ne = subwrd(rec,15)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>fname = 'Patricia.grid_1.loc.txt'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>tt = 1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>while (tt <= nt)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set t 'tt<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'square 0.5'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set xlint 500'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set ylint 500'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set z 1'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'd absvor'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> say 'Click on the center of the TC'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'q pos'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> say result<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> rec = sublin(result,1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> xpos = subwrd(rec,3) ; ypos = subwrd(rec,4)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'q xy2gr 'xpos' 'ypos<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> rec = sublin(result,1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> xdim.tt = subwrd(rec,3) ; ydim.tt = subwrd(rec,6)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> xdim.tt = math_nint(xdim.tt)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> ydim.tt = math_nint(ydim.tt)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'q xy2w 'xpos' 'ypos<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> rec = sublin(result,1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> xlon.tt = subwrd(rec,3) ; ylon.tt = subwrd(rec,6) <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>...<snip>...<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>…and square.gs:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>function square(arg)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>*<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>* set parea into square.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>*<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>mgn = ''<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>mgn = subwrd(arg,1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>if (mgn = '')<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> mgn = 1.0<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>endif<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>if (mgn >= 4.25)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> say 'Margin too large.'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> return<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>endif<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'q gxinfo'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>rec = sublin(result,2)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>psx = subwrd(rec,4)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>psy = subwrd(rec,6)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>'set mproj off'<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>if (psx > psy)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>* Landscape<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set parea '1.25+mgn' '9.75-mgn' 'mgn' '8.5-mgn<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>else<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>* Portrait<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'> 'set parea 'mgn' '8.5-mgn' '1.25+mgn' '9.75-mgn<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>endif<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New"'>return<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>~Dave<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='color:#1F497D'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gradsusr-bounces@gradsusr.org [mailto:gradsusr-bounces@gradsusr.org] <b>On Behalf Of </b>Ryglicki, Dr. David<br><b>Sent:</b> Wednesday, July 5, 2017 10:32 AM<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> Re: [gradsusr] xy2gr bug?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoPlainText>Hi, Jennifer.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I've attached the control file. The XDEF and YDEF entries specifically are:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>xdef 361 linear -6480.0 36.0<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>ydef 191 linear -3420.0 36.0<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>As an extra data point, I can replicate this in both the newest version of GrADS (2.1.1.b0) and OpenGrADS 2.1.0.oga.1. WordPad added the extra .txt extension. It’s a ctl file on the Linux side.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>~Dave<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [<a href="mailto:gradsusr-bounces@gradsusr.org">mailto:gradsusr-bounces@gradsusr.org</a>] On Behalf Of Jennifer M Adams<br>Sent: Wednesday, July 5, 2017 8:43 AM<br>To: GrADS Users Forum<br>Subject: Re: [gradsusr] xy2gr bug?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hi, Dave —<o:p></o:p></p><p class=MsoPlainText>1. What are the XDEF and YDEF entries in your descriptor file?<o:p></o:p></p><p class=MsoPlainText>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?<o:p></o:p></p><p class=MsoPlainText>—Jennifer<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> On Jun 19, 2017, at 12:35 PM, Ryglicki, Dr. David <<a href="mailto:david.ryglicki@nrlmry.navy.mil"><span style='color:windowtext;text-decoration:none'>david.ryglicki@nrlmry.navy.mil</span></a>> wrote:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Hey, GrADS list.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Position = 5.15564 2.55131 1 0<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.55131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1179.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2w 5.15564 2.55131<o:p></o:p></p><p class=MsoPlainText>> Lon = 3862.26 Lat = -1179.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 1.55131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1579.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 3.55131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = 74.3479<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.55131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1179.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.65131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1139.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.75131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1099.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.85131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1059.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 2.95131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1019.48<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 3.05131<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = 68.7923<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 3 <o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = -1000<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2gr 5.15564 3.01<o:p></o:p></p><p class=MsoPlainText>> Xdim = 288.285 Ydim = 68.3333<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2w 5.15564 3.01<o:p></o:p></p><p class=MsoPlainText>> Lon = 3862.26 Lat = -996<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ga-> q xy2w 5.15564 3.00<o:p></o:p></p><p class=MsoPlainText>> Lon = 3862.26 Lat = -1000<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 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).<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Operator-error goof or bug?<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ~Dave<o:p></o:p></p><p class=MsoPlainText>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>> gradsusr mailing list<o:p></o:p></p><p class=MsoPlainText>> <a href="mailto:gradsusr@gradsusr.org"><span style='color:windowtext;text-decoration:none'>gradsusr@gradsusr.org</span></a><o:p></o:p></p><p class=MsoPlainText>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr"><span style='color:windowtext;text-decoration:none'>http://gradsusr.org/mailman/listinfo/gradsusr</span></a><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>--<o:p></o:p></p><p class=MsoPlainText>Jennifer Miletta Adams<o:p></o:p></p><p class=MsoPlainText>Center for Ocean-Land-Atmosphere Studies (COLA) George Mason University<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>_______________________________________________<o:p></o:p></p><p class=MsoPlainText>gradsusr mailing list<o:p></o:p></p><p class=MsoPlainText><a href="mailto:gradsusr@gradsusr.org"><span style='color:windowtext;text-decoration:none'>gradsusr@gradsusr.org</span></a><o:p></o:p></p><p class=MsoPlainText><a href="http://gradsusr.org/mailman/listinfo/gradsusr"><span style='color:windowtext;text-decoration:none'>http://gradsusr.org/mailman/listinfo/gradsusr</span></a><o:p></o:p></p></div></body></html>