Hi -
Thanks for writing back. It sounds like we need an addition to the
documentation.
Ansley
On 10/5/2010 12:19 PM, Szymon Roziewski wrote:
Thank You for response Ansley.
Yes, You are right!
I defined a rotated grid (x=-5.666667:5.25,y=-2.0:10.0) so this
grid is not a subset the initial curvilinear grid.
2010/10/5 Ansley Manke <Ansley.B.Manke@xxxxxxxx>
Hi -
It should not be a problem to use a small subset of the range
of the curvilinear grid. What is the approximate resolution of
the curvilinear grid? If there are only a few points on the
curvilinear grid and you want to regrid to this very fine
output grid, I expect your results might not be very good.
Are the longitude curvilinear coordinates also expressed as
East longitudes, so that they contain the range
x=-5.666667:5.25 ? If not then use values for the longitudes
in your axis definition that are on the same branch of modulo
longitudes as what is in the curvilinear coordinate variable.
You have probably done this, but it's always a good idea to
make plots of the data in its curvilinear form to be sure you
are reading it correctly.
On 10/5/2010 11:03 AM, Szymon Roziewski wrote:
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
--
Z wyrazami szacunku,
Szymon Roziewski
|