# Re: recommended practices for moving from one curvilinear grid to another curvilinear grid

From: Seth McGinnis <mcginnis_at_nyahnyahspammersnyahnyah>
Date: Wed, 08 Jul 2009 15:16:17 -0600

Hi Bill,

I have written an NCL script to do exactly what you describe. I don't
know that I'd go so far as to call it a "best practice", but the technique
I found fairly speedy and not too ugly code-wise is to loop by hand
over the cells of the target grid using rcm2points() to do the
interpolation for each point separately. (The other approaches I looked
at either took forever or gave me results I had a hard time being sure
were structured correctly.) Here's the essence:

do j = 0,ny-1
do i = 0,nx-1
ipol = rcm2points(lat2d,lon2d,data,outlat(j,i),outlon(j,i),1)
outdata(:,j,i) = (/ipol/)
end do
end do

Cheers,

--Seth

```----
Seth McGinnis
Associate Scientist
NARCCAP Data Manager
ISSE / NCAR
----
>Message: 2
>Date: Wed, 8 Jul 2009 14:11:18 -0600
>From: "Capehart, William J" <William.Capehart_at_sdsmt.edu>
>Subject: recommended practices for moving from one
>	curvilinear grid to another curvilinear grid
>To: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu>
>Message-ID: <C67A5986.D657%wcapehar_at_sdsmt.edu>
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>Hi All
>
>there are a number of functions in NCL to resample or interpolate between
>one regular grid to another or from a curvilinear (e.g., RCM/WRF/NARR) into
>rectilinear grids or vice versa but not much guidance on the "Regridding
>Functions" page in the NCL documentation on how to go from one curvilinear
>grid to another curvilinear gird.  There a few multi-step approaches I can
>see doing but I'd rather be able to do it in one "relatively painless" step
>to avoid mangling the data more than needed.  Are there any recommendations
>on how to do that?
>
>Thanks Much
>================================================================
>Bill Capehart <William.Capehart_at_sdsmt.edu>   Associate Professor
>Institute of Atmospheric Sciences         Land Surface Processes
>213 Mineral Industries Building                 Hydrometeorology
>South Dakota School of Mines and Technology Ph:  +1-605-394-1994
>501 East Saint Joseph Street                Fax: +1-605-394-6061
>Rapid City, SD 57701-3995                Mobile: +1-605-484-5692
>=================== http://capehart.sdsmt.edu ==================
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
```
Received on Wed Jul 08 2009 - 15:16:17 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 13 2009 - 20:56:19 MDT