[gradsusr] How to get grid distance within GrADS script?
Hosmay Lopez
hlopez at rsmas.miami.edu
Mon Jun 6 15:27:02 EDT 2016
Hello Ivan,
If grid spacing is what you need, you could follow the simple steps below.
* Earth's radius in meters
'define a=6.37*1E+06'
* Grid spacing of latitude (in radians)
'define dlat = cdiff(lat,y)*3.1415/180'
* Grid spacing of longitude (in radians)
'define dlon = cdiff(lon,x)*3.1415/180'
* Cosine of latitude for area weighting
'define coslat = cos(lat*3.1415/180)'
* Longitude grid spacing (meters)
'define dx = a*coslat*dlon'
* Latitude grid spacing (meters)
'define dy = a*dlat'
Hope this helps,
Hosmay Lopez
UM/CIMAS/RSMAS NOAA/AOML/PHOD
4301 Rickenbacker Causeway,
Miami, FL 33149, USA
Phone: (305) 361-4329
________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Ivan Toman [ivtoman at inet.hr]
Sent: Monday, June 06, 2016 3:07 PM
To: gradsusr at gradsusr.org
Subject: Re: [gradsusr] How to get grid distance within GrADS script?
Thanks,
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, ...).
Best regards,
Ivan
On 06/06/2016 07:15 PM, Anubhav Choudhary wrote:
hi ivan, if you just want the information,
just try--
cdo griddes filename
On Mon, Jun 6, 2016 at 10:27 PM, Ivan Toman <ivtoman at inet.hr<mailto:ivtoman at inet.hr>> wrote:
Hello again,
I found the way, if anyone is interested, I did this, for my application
works OK:
'set y 1'
laty1 = subwrd(result,4)
'set y 2'
laty2 = subwrd(result,4)
gridspacing=(laty2-laty1)*111
Best regards,
Ivan
On 06/03/2016 05:43 PM, Ivan Toman wrote:
> Hello,
>
> Is it possible to get grid distance value inside GrADS script somehow?
>
>
> Best regards and thanks!
>
> Ivan Toman
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
> http://gradsusr.org/mailman/listinfo/gradsusr<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=>
>
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<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=>
--
Anubhav Choudhary
Ph.D. Student (UGC-JRF)
School of Environmental Sciences
Jawaharlal Nehru University, New Delhi
Ph: +91-8527706122
Email: yoursanubhav at gmail.com<mailto:yoursanubhav at gmail.com>
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<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=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160606/e39f0ee2/attachment.html
More information about the gradsusr
mailing list