[ncl-talk] Cartesian coordinate plotting

Dennis Shea shea at ucar.edu
Tue Jul 23 21:25:28 MDT 2019


[1]
I am not sure why you want to convert to a Cartesian coordinate system.
No extra information is provided and you lose geographic referencing.

[2] Not sure why you are using the following example as a basis:
            *http://www.ncl.ucar.edu/Applications/regrid.shtml*
<http://www.ncl.ucar.edu/Applications/regrid.shtml>
             regrid_15.ncl

[3] You can convert a region (say: 300km ) around a specified map location
[clat, clon] and directly convert to Cartesian. See attached.


On Fri, Jul 19, 2019 at 1:53 AM Md. Jalal Uddin via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi all,
>
> I set a Cartesian coordinate (x,y) below.
>
>   pi       =   3.141593
>   deg2rad  =  pi/180.
>
>   earth_radius = 6371.
>
>   r = ispan(0,300,10)
>   theta  = ispan(0,360,10)
>
>   x =
> conform_dims((/dimsizes(r),dimsizes(theta)/),r,0)*cos(conform_dims((/dimsizes(r),dimsizes(theta)/),theta,1)*deg2rad)
>   y =
> conform_dims((/dimsizes(r),dimsizes(theta)/),r,0)*sin(conform_dims((/dimsizes(r),dimsizes(theta)/),theta,1)*deg2rad)
>
>    ;printVarSummary(x)                ; [31] x [37]
>    ;printVarSummary(y)                ; [31] x [37]
>
>
> My precipitation data within 300 Km from the center lat and lon.
>  cen_avg  = dim_avg_n_Wrap(time_avg,0)    ;[radius | 31] x [circle | 180]
>
> How can I conform to cen_avg data as x, y and plot? Full code in the
> attached file?
>
> ;Jalal
>
> --
> *Md. Jalal Uddin*
> MSc in Applied Meteorology
> Nanjing University of Information, Science and Technology, China
> B.Sc. in Disaster Management (Hons.)
> Patuakhali Science and Technology University, Bangladesh.
> Cell: +8613260859092, +8801792052662
> Web: www.dmjalal90.weebly.com
> Facebook: jalal.hossen.39
> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190723/7ca79f53/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cartesian_trmm.000001.png
Type: image/png
Size: 145107 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190723/7ca79f53/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cartesian_trmm.000002.png
Type: image/png
Size: 55611 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190723/7ca79f53/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cartesian_trmm.000003.png
Type: image/png
Size: 54610 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190723/7ca79f53/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cartesian.ncl
Type: application/octet-stream
Size: 9278 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190723/7ca79f53/attachment.obj>


More information about the ncl-talk mailing list