[ncl-talk] Question regarding cylindrical coordinate transformation using NCL.

Dennis Shea shea at ucar.edu
Fri Oct 6 15:51:42 MDT 2017


Please do not write directly to me:   ncl-talk at ucar.edu  only

---
A possible reason you have had no response is that the question(s) posed
are not clear ... at least to me.

--
Question 1:

What do you mean: "Say I have WRF output on standard lat/lon grid".
To what 'standard lat/lon grid' are you referring?

Typically:
WRF lat/lon are (Time, south_north, west_east).
WRF Variables are: (Time, bottom_top, south_north, west_east)  and (Time,
south_north, west_east)
WRF grids are regional not global

Climate models are often global (time,level,lat,lon), (time,lat,lon)
Grids are rectilinear: lat(lat), lon(lon)
Some are regional.

---
Cylindrical coordinates; I have never used cylindrical  x,y,z coordinates.
Do you mean (time,z,lat,lon)? ... That is *not* a math cylindrical coord
system.

This is a possible generic approach.
---

   xp = ... ; (time,Np,lat2d,lon2d)
   xz <=== xp               ; <=== *you* must interpolate to 'z' (Nz)


   clat = ....            ; center lat at each time
   clon = ....            ;        lon
   crad = (/ 1,3,5,.../)  ; radii (degrees)


   Ntim = dimsizes(clat)  ; # time steps
   Nrad = 5               ; # of radii
   Npts = 100             ; # of points at each radii

   Rlat = new( Npts, "float")   ; lat at each radius and time
   Rlon = new( Npts, "float")

   Drad = new( (/Ntim,Nrad,Nz,Npts/), "float")  ; data at each time/radii

   do nt=0,Ntim-1
     do nr=0,Nrad-1
        nggcog(clat(nt), clon(nt), crad(nr), Rlat, Rlon)
       do nz=0,KZ-1
            ... interpolate to Z ... some WRF function
            ; curvilinear grid
            Drad(nt,nr,nz,:) = rcm2points_Wrap (lat2d, lon2d, x(nt,nz,:,:),
Rlat, Rlon, 0)
            ; linint2 for gloable rectilinear grids
     end do
   end do

; Likely very slow ... *save to netCDF once it works correctly

;----------
Question 2: "cylindrical equidistant projection"  is a map projection.

Is your WRF grid global or limited area (regional)

Using an FFT on a regional grids makes no sense to me; only on global grids.
You can not get appropriate wave numbers on a regional grid.


On Thu, Oct 5, 2017 at 6:26 PM, Prashanth Bhalachandran <
prashanth.bhalachandran at gmail.com> wrote:

> Hello and Warm Greetings !!
>
> I am Prashanth, a PhD student at Purdue and I primarily study hurricanes.
> I had a quick question regarding NCL that I was hoping you’d help me with.
>
> Say I have WRF output on standard lat/lon grid. I am interested in
> converting all the data to storm-centric (I know the coordinates of the
> moving storm center), cylindrical coordinates. That is lat-lon (x,y,z) to
> r, theta and z. Can you please tell me as to what the best way to do this
> is using NCL?
>
> I also noticed that NCL had a cylindrical equidistant projection? However,
> I understand that this is only for plotting? I am guessing I need to do a
> coordinate transform compulsorily because I intend to take a Fourier
> transform in the theta direction.
>
> Any direction from your end will be greatly appreciated.
>
> Please help me out.
>
> Prashanth
>
> _______________________________________________
> 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/20171006/3caef819/attachment.html>


More information about the ncl-talk mailing list