[Thread Prev][Thread Next][Index]

Re: [ferret_users] curv_to_rect_map problem?



Hi Peter,
The curv_to_rect_map function computes the mapping function, which does store information using all four dimensions: the original X and Y dimensions represent the output longitude, latitude grid, and Z and T directions are used to save information about four neighbors (hence K=1:4) and the indices of the input longitude and latitude grids are saved using the T dimension.  This is described a bit more near the end the documentation of the curv_to_rec_map function, where it says "The weights are based on the distance..."

Your odd result is I think because the lon,lat curvilinear coordinate variables must be on the same 2D grid of index values as the variable you are regridding, but you have read them in as 1-dimensional variables. 

Lon and lat should have the same grid as prec[d=2], so that you could make a curvilinear plot using a command like

   fill  prec[d=2], lon, lat

and then you could regrid prec[d=2] to a rectilinear grid using the two functions curv_to_rect_map and curv_to_rect. 

Ansley



Peter Szabo wrote:
Somehow it didnt get through, i try it now.
----------
Hello Users,

i have an ASCII data set and a coordinate file in the same format as well. I want to have the data in loat-lon coord system.
During creating a map with curv_to_rect_map, a strange thing has happened: some added dimensions just appeared.

set data/ez/var="lon,lat" "/home/szabop/ARPEGE/coords" !i guess, these are the curvilinear coordinates. i attach a pics about the x-y coords (coords.gif)
def axis/x=4.5:31.78:0.44/mod/units=degrees xax
def axis/y=37:52.84:0.44/units=degrees yax
let llvar=y[gy=yax]+x[gx=xax]
let arpmap=curv_to_rect_map(lon,lat,llvar,0.88)
save/file="ARPEGE/arpmap.nc" arpmap
quit

After this, if i list the grid of arpmap, i see that a Z and T dimension is added.

use "ARPEGE/arpmap.nc"
sh grid arpmap
    GRID GQW1
 name       axis              # pts   start                end
 XAX       LONGITUDE           63mr   4.5E                 31.78E
 YAX       LATITUDE            37 r   37N                  52.84N
 ZAX1_4    Z                    4 r   1                    4
 TAX1_3    T                    3 r   1                    3

Why is that?
When i applied the curv_to_rect function for this creted map, i get a strange result as well (see the attached strangelonlat.gif):

def grid/x=xax/y=yax gridxy
set data/ez/var="prec"/grid=gridxy "/home/szabop/ARPEGE/pre/LSP.1960-1989.DJF"
let newpre=curv_to_rect(prec[d=2],arpmap[d=1])
fill newpre

This is quite strange for me as i already used this function without any error.
Thanks for any help,

Peter









[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement