<div dir="ltr"><div><div><div><div>Wendi,<br>Keep in mind what happens when you alter the geographical bounds in the control file. Those XDEF/YDEF/ZDEF/TDEF lines control the bounds of your dimension environment when running grads. Now that you've set the xdef and ydef to start at 1 and increment by very small values, the maximum x and y values in your dimension environment are now <br><br></div>max_x = 1 + 319*0.005483962 = 2.749<br></div>max_y = 1 + 319*0.00452226 = 2.443<br><br></div>Notice how this math is derived from your control file. This means the maximum values for lat and lon that won't result in an error are 2.749 and 2.443. You set lat and lon to well outside those ranges in your script, which is why you are getting the error. You can instead reset lat and lon so that they're within the bounds above, but I think that's getting away from the problem you're trying to solve. My understanding is that you want to plot a field using linear distance coordinates rather than geographical coordinates. If so, then you don't want to be using lat/lon to set your dimensions. Use 'set x' and 'set y', and also set your initial value in your XDEF and YDEF lines to zero so that the lower left corner of your plots will be at distance coordinate (0,0) and increasing as you go up and right. Is this what you wanted to do?<br><br></div><div>Jeff Duda<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 5, 2016 at 1:35 AM, wendi harjupa <span dir="ltr"><<a href="mailto:wendiharjupa@gmail.com" target="_blank">wendiharjupa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Mr. Jeff<div><br></div><div>Thank you very much for your advice.</div><div>I have tried it for several times, but it does not work.</div><div>I am very sorry for asking you again.</div><div><br></div><div>I got an error as below</div><div><div>Data Request Warning: Request is completely outside file limits</div><div>Cannot contour grid - all undefined values </div><div>Error in <a href="http://xcbar.gs" target="_blank">xcbar.gs</a>: No shading information</div></div><div><br></div><div><br></div><div>Here my ctl file and gs file</div><div><br></div><div>try.ctl</div><div><div><br></div><div>DSET /TAKAYASU/wendi/xband/G000.<wbr>grads/KINKI/20150808_0900-<wbr>1700/data/KINKI00001-20150808-<wbr>1400-G000-EL000000.bin</div><div>UNDEF -999</div><div> XDEF 319 LINEAR 1 0.005483962</div><div> YDEF 319 LINEAR 1 0.00452226</div><div># ZDEF 81 LINEAR 125 250</div><div>TDEF 120 LINEAR 09:00Z14JUL1500 60yr</div><div>VARS 1</div><div>rr 81 99 rainfall (mm)</div><div>ENDVARS</div></div><div><br></div><div><br></div><div><a href="http://try.gs" target="_blank">try.gs</a></div><div><br></div><div><div> 'reinit'</div><div> 'open /TAKAYASU/wendi/overlay_cappi/<wbr>try.ctl'</div><div> 'setXrain.gs'</div><div># 'set mproj off'</div><div># 'setCOMMON.gs'</div><div> 'set lon 134.9 135.4'</div><div> 'set lat 34 34.5'</div><div> 'd rr'</div><div> 'xcbar 8.6 8.8 0.8 4 -fw 0.11 -fh 0.15 -edge triangle -fstep 1 -line on -lc 1'</div><div> 'set strsiz 0.15 0.15'</div><div> 'draw string 8.5 4.15 mm'</div><div><br></div><div># 'set xaxis 0 10 1'</div><div># 'set yaxis 0 10 1'</div><div><br></div><div> 'close 1'</div></div><div><br></div><div>Thank you very much.</div><div>Best regards,</div><div>wendi</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 3, 2016 at 1:37 AM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Wendi,<br></div>You can always change the text of any control file. There should not be anything stopping you from doing that. Please clarify what you mean.<span class="m_2880498474926929323HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_2880498474926929323HOEnZb"><font color="#888888">Jeff<br></font></span></div><div class="m_2880498474926929323HOEnZb"><div class="m_2880498474926929323h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 1, 2016 at 11:53 PM, wendi harjupa <span dir="ltr"><<a href="mailto:wendiharjupa@gmail.com" target="_blank">wendiharjupa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Mr Jeff<div><br></div><div>Thank you very much for your help.</div><div><br></div><div>I have two different types of data set and I need to make composite data with those data.</div><div>One data is mismatch, then I need to know how far the mismatch.</div><div><br></div><div>One of my data set is binary and another one is netCDF.<br></div><div>I can change my control file in my binary data. But, I cannot do this for my netCDF data.</div><div>Would you mind to suggest me, how to change XDEF and YDEF in netCDF data?</div><div><br></div><div>Thank you very much</div><div><br></div><div>best regards,</div><div>wendi</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 12:02 AM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Wendi,<br></div>It sounds like you want to draw a plot with geographic coordinates replaced by straight-line/distance coordinates instead. If that is the case, one thing you can try is removing the PDEF line from your control file and resetting your XDEF and YDEF lines to start at 0 (but keep the delta value). That might work. If that doesn't work, you could also try turning off the map projection in grads (set mproj off) and then using 'set xaxis' and 'set yaxis' in clever ways to make it look like the map you draw is in terms of linear distance. Good luck.<br><br></div><div>Jeff Duda<br></div></div><div class="gmail_extra"><div><div class="m_2880498474926929323m_-9080633864368325419m_-8048344603456066404h5"><br><div class="gmail_quote">On Tue, Nov 1, 2016 at 9:32 AM, HARVEY, PHILIP O NH-03 USAF AFMC 412 OSS/OSW <span dir="ltr"><<a href="mailto:philip.harvey.1@us.af.mil" target="_blank">philip.harvey.1@us.af.mil</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">See Ed Williams' Aviation Formulary at <a href="http://williams.best.vwh.net/avform.htm" rel="noreferrer" target="_blank">http://williams.best.vwh.net/a<wbr>vform.htm</a> for great circle distance, etc formulas. The formula you desire is only requires 1 line and can easily be written into a function.<br>
<br>
Phil<br>
<div><div class="m_2880498474926929323m_-9080633864368325419m_-8048344603456066404m_-4573382565156428094h5"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@grads<wbr>usr.org</a>] On Behalf Of wendi harjupa<br>
Sent: Tuesday, November 01, 2016 2:01 AM<br>
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br>
Subject: [gradsusr] convert world coordinate distance to real distance (km)<br>
<br>
Dear every one<br>
<br>
I have problem with converting distance in world coordinate to distance,<br>
<br>
I have map with<br>
lon = 135 135.5<br>
lat = 34.5 35<br>
<br>
I want to set lon =135, as 0 km, and lat=34.5 as 0 km.<br>
as we know that 1 deg is about 110 km.<br>
<br>
Is there any function in grads that can directly convert the world coordinat distance to real distance (km)?<br>
<br>
Please, any help would be very appreciate.<br>
<br>
thank you<br>
regards,<br>
wendi<br>
<br>
</div></div>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><span class="m_2880498474926929323m_-9080633864368325419HOEnZb"><font color="#888888"><br></font></span></div></div><span class="m_2880498474926929323m_-9080633864368325419HOEnZb"><font color="#888888"><span class="m_2880498474926929323m_-9080633864368325419m_-8048344603456066404HOEnZb"><font color="#888888">-- <br><div class="m_2880498474926929323m_-9080633864368325419m_-8048344603456066404m_-4573382565156428094gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</font></span></font></span></div><span class="m_2880498474926929323m_-9080633864368325419HOEnZb"><font color="#888888">
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br></font></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><br>-- <br><div class="m_2880498474926929323m_-9080633864368325419gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div></div><span class="HOEnZb"><font color="#888888"><br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/li<wbr>stinfo/gradsusr</a><br>
<br></font></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</div>