[Thread Prev][Thread Next][Index]

RE: [ferret_users] redefining dimension values of variables on an irregular grid

Hi Ansley,

Thanks for getting back to me. I think the function I want to use is rect_to_curv, because I'm trying to put a variable, let's say TEMP[100,122], onto the curvilinear grid. The curvilinear grid coordinates are held in variables TLONG[100,122] and TLAT[100,122].

I'll show you what they look like: TEMP --> TLONG --> TLAT

I can do the following successfully:

    shade TEMP, TLONG, TLAT

However, I want to save this output as a new variable. I tried this with "rect_to_curv" without success.
    let temp_curv = rect_to_curv(TEMP, TLONG, TLAT, 3)
    sha temp_curv
    Bailing out of external function "rect_to_curv":
        input grid not modulo, output grid must be inside input grid
 **ERROR: error in external function

Hope there is a simple solution to this. The grids are the same size.


From: owner-ferret_users@xxxxxxxx [owner-ferret_users@xxxxxxxx] on behalf of Ansley C. Manke [ansley.b.manke@xxxxxxxx]
Sent: 08 August 2018 12:59
To: ferret_users@xxxxxxxx
Subject: Re: [ferret_users] redefining dimension values of variables on an irregular grid

Hi Pearse,

This is what's called in the Ferret documentation a "curvilinear grid".  There are techniques for visualizing data on these grids directly and also capabilities for regridding to and from such grids. Have a look at the Ferret documentation under "curvilinear grids" and "curvilinear coordinates" and see if that'll get you started..


On 8/8/2018 7:01 AM, Pearse J. Buchanan wrote:
Hello all,

I've been given some model data. The grid on which the ocean model exists is irregular, with a displaced north pole. The grid is 100 units in x and 122 units in y.

All variables exist on this grid type. However, the dimensions of each variable are not in degrees of longitude or latitude. Rather, they are in units of grid cells (i.e. 1 --> 100, and 1 --> 122).

What I want to do is take each variable and redefine their latitude and longitude dimensions so that they are now in degrees, not grid cell number. The ocean model provides this information in separate variables called TLONG and TLAT:
  • TLONG(100,122) = array of t-grid longitudes (degrees east)
  • TLAT(100,122) = array of t-grid latitudes (degrees north)
So I am struggling with how to take the values held in the variables TLONG and TLAT and set them as the dimension values for other ocean variables, say TEMP and SALT.

There must be a simply way of doing this so I thought I'd ask.


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement