[Thread Prev][Thread Next][Index]

[ferret_users] Question to CURV_TO_RECT_MAP, CURV_TO_RECT (remapping)



Hi there,

I have problem with an applying of functions  CURV_TO_RECT_MAP and then CURV_TO_RECT.
Curvilinear grid reffers to greater area than the output rectilinear grid - maybe this issue causes problem.

! making grid for curvilinear coordinates - lon and lat

DEFINE AXIS/x=1:448:1/unit=degree xaxis
DEFINE AXIS/y=1:615:1/unit=degree yaxis
DEFINE GRID/x=xaxis/y=yaxis gridlonlat

!loading curvilinear coords

FILE/VARIABLES=clon_in/COLUMNS=448/GRID=gridlonlat "/home/szymon/WAM/CHECK/um_c3_lon_448x615.txt"
FILE/VARIABLES=clat_in/COLUMNS=448/GRID=gridlonlat "/home/szymon/WAM/CHECK/um_c3_lat_448x615.txt"

!making an output grid 132x145

define axis/x=-5.666666667:5.25:0.083333333/modulo/units=degrees xax
def axis/y=-2.0:10.0:0.083333333/units=degrees yax
let grid_out = y[gy=yax] + x[gx=xax]

let map = CURV_TO_RECT_MAP(clon_in[d=1], clat_in[d=2], grid_out, 10)
save/clobber/file=curv_map_UM_TO_ICM.nc map
Everything was done without any problems.

Then next step is to use this variable data for remapping wind field to smaller rectilinear grid which reffers to the area that is contained in greater curvilinear area.

DEFINE AXIS/x=1:448:1/unit=degree xaxis
DEFINE AXIS/y=1:615:1/unit=degree yaxis

DEFINE GRID/x=xaxis/y=yaxis gridlonlat

!loading  wind which reffers to curvilinear grid.

file/var=wlon/grid=gridlonlat/format=stream/type=r4/swap "/home/szymon/WAM/CHECK/03225_2010092100+03000000c3hs000000000000000"
file/var=wlat/grid=gridlonlat/format=stream/type=r4/swap "/home/szymon/WAM/CHECK/03226_2010092100+03000000c3hs000000000000000"

! using mapping data
use curv_map_UM_TO_ICM.nc

!remapping
let wlon_icm = curv_to_rect(wlon[d=1], map[d=3])
let wlat_icm = curv_to_rect(wlat[d=2], map[d=3])

vector/over/title="WIND"/length=15/xskip=10/yskip=10 wlon_icm, wlat_icm
!unfortunately there's no any data for plotting..
frame/file=interpolate.gif

these are data sets:

     currently SET data sets:
    1> /home/szymon/WAM/CHECK/03225_2010092100+03000000c3hs000000000000000
 name     title                             I         J         K         L
 WLON     WLON                             1:448     1:615     ...       ...
 
    2> /home/szymon/WAM/CHECK/03226_2010092100+03000000c3hs000000000000000
 name     title                             I         J         K         L
 WLAT     WLAT                             1:448     1:615     ...       ...
 
    3> ./curv_map_UM_TO_ICM.nc  (default)
 name     title                             I         J         K         L
 MAP      CURV_TO_RECT_MAP(CLON_IN[D=1],   1:132     1:145     1:4       1:3

How can I work around that issue?

--
With best regards,
Simon

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement