<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body bgcolor="#FFFFFF" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hello Ivan,</div>
<div><br>
</div>
<div>If grid spacing is what you need, you could follow the simple steps below. </div>
<div><br>
</div>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">* Earth's radius in meters</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define a=6.37*1E+06'</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo; min-height: 21px;">
<font size="2"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo; min-height: 21px;">
<font size="2">* Grid spacing of latitude (in radians)</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define dlat = cdiff(lat,y)*3.1415/180'</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">* Grid spacing of longitude (in radians)</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define dlon = cdiff(lon,x)*3.1415/180'</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">* Cosine of latitude for area weighting</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define coslat = cos(lat*3.1415/180)'</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo; color: rgb(195, 55, 32);">
<font size="2"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">* Longitude grid spacing (meters)</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define dx = a*coslat*dlon'</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">* Latitude grid spacing (meters)</font></p>
<p style="margin-right: 0px; margin-left: 0px; line-height: normal; font-family: Menlo;">
<font size="2">'define dy = a*dlat'</font></p>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">Hosmay Lopez<br>
<span style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">UM/CIMAS/RSMAS NOAA/AOML/PHOD</span><br style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">
<span style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">4301 Rickenbacker Causeway,</span><br style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">
<span style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">Miami, FL 33149, USA</span><br style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">
<span style="font-family:verdana,arial,sans-serif; background-color:rgb(255,255,255)">Phone: (305) 361-4329</span><br>
<br>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF380713" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> gradsusr-bounces@gradsusr.org [gradsusr-bounces@gradsusr.org] on behalf of Ivan Toman [ivtoman@inet.hr]<br>
<b>Sent:</b> Monday, June 06, 2016 3:07 PM<br>
<b>To:</b> gradsusr@gradsusr.org<br>
<b>Subject:</b> Re: [gradsusr] How to get grid distance within GrADS script?<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">Thanks,<br>
<br>
but I needed value inside .gs script to do some automatic calculations there (for example automatically set vector density on map, regardless of grid distance, plotted area, ...).<br>
<br>
Best regards,<br>
Ivan<br>
<br>
<br>
On 06/06/2016 07:15 PM, Anubhav Choudhary wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">hi ivan, if you just want the information,
<div>just try--</div>
<div>cdo griddes filename</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jun 6, 2016 at 10:27 PM, Ivan Toman <span dir="ltr">
<<a href="mailto:ivtoman@inet.hr" target="_blank">ivtoman@inet.hr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex; border-left:1px #ccc solid; padding-left:1ex">
Hello again,<br>
<br>
I found the way, if anyone is interested, I did this, for my application<br>
works OK:<br>
<br>
'set y 1'<br>
laty1 = subwrd(result,4)<br>
'set y 2'<br>
laty2 = subwrd(result,4)<br>
gridspacing=(laty2-laty1)*111<br>
<br>
<br>
Best regards,<br>
Ivan<br>
<div class="HOEnZb">
<div class="h5"><br>
<br>
On 06/03/2016 05:43 PM, Ivan Toman wrote:<br>
> Hello,<br>
><br>
> Is it possible to get grid distance value inside GrADS script somehow?<br>
><br>
><br>
> Best regards and thanks!<br>
><br>
> Ivan Toman<br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=CwMF-g&c=y2w-uYmhgFWijp_IQN0DhA&r=SxBofwRftFspVJzq44S86wrN3ZOaU78LZB_9EfkOUyQ&m=8nZG2cnSSaaOel1eutvkpM8ZaCWyMMMEJ6XJu_JfrEc&s=uFK21vrD3zY19u488ZyxasJxtLSAqQkq0UOKMWXMH4g&e=" rel="noreferrer" target="_blank">
http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=CwMF-g&c=y2w-uYmhgFWijp_IQN0DhA&r=SxBofwRftFspVJzq44S86wrN3ZOaU78LZB_9EfkOUyQ&m=8nZG2cnSSaaOel1eutvkpM8ZaCWyMMMEJ6XJu_JfrEc&s=uFK21vrD3zY19u488ZyxasJxtLSAqQkq0UOKMWXMH4g&e=" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr"><span style="font-family:arial; font-size:small">Anubhav Choudhary</span>
<div style="font-family:arial; font-size:small">Ph.D. Student (UGC-JRF)<br>
School of Environmental Sciences<br>
Jawaharlal Nehru University, New Delhi
<div><br>
Ph: +91-8527706122<br>
Email: <a href="mailto:yoursanubhav@gmail.com" target="_blank">yoursanubhav@gmail.com</a></div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset> <br>
<pre>_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=CwMF-g&c=y2w-uYmhgFWijp_IQN0DhA&r=SxBofwRftFspVJzq44S86wrN3ZOaU78LZB_9EfkOUyQ&m=8nZG2cnSSaaOel1eutvkpM8ZaCWyMMMEJ6XJu_JfrEc&s=uFK21vrD3zY19u488ZyxasJxtLSAqQkq0UOKMWXMH4g&e=" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</div>
</div>
</body>
</html>