# Re: [ferret_users] problem with EF rect_to_curv

```Hi Andrew,
```
Your original data cross 0 degrees longitude. I am guessing that the longitude coordinates have values include both 0 to 42, east of the meridian, and 330 to 360 to the west. What's happening is that the function is putting in values between 42 and 330 East. The function should work better if you subtract 360 from the values to the west of the prime meridian, so that the values in the longitude array are more continuous.
```
yes? LET lon2 = if longitude GT 300 then longitude-360 else longitude

```
and send lon2 into the function instead of the original longitudes. Let us know if this does the trick, and if so we should add a note about this to the documentation.
```
Ansley

Andrew Ferrone wrote:
```
```Dear ferreters

```
I'm working with a regional climate model, which is defined in curvilinear coordinates. For the moment I need to interpolate some globale data on a 1°x1° regular grid onto my curvilinear grid (0.2°x0.2°). For this purpose I tried the external function rect_to_curv in ferret (the lon and lat were used from the output of the regional model). The output I produced was not the one I attended.
```
```
I've attached the original data (on the region I am interested in) in CLM_inerpol2.tiff and the result in CLM_inerpol2.tiff. There is clearly a problem when the interoplation crosses the 0° meridian. Has anyone experienced some similar problems with this function and knows hoa to resolve it?
```
Any help and suggestion is welcome!

Thanks a lot

Andrew

______________________________________________________________
Andrew FERRONE
Physicist, PhD student
Regional climate modelling, Climate Impacts of Aviation

Université catholique de Louvain (UCL)
Institut d'astronomie et de géophysique G. Lemaître (ASTR)
Chemin du Cyclotron, 2, B-1348 Louvain-la-Neuve (Belgium)
Phone: +32 (0)10 473365   Fax: +32 (0)10 474722
E-mail: andrew.ferrone@xxxxxxxxxxxx

```
```
```