[Thread Prev][Thread Next][Index]
Re: [ferret_users] regriding data from (lon lat) axis to (x_page y_page) axis (stereographic projection)
Thank you , it works now !
I didn't have rect_to_curv on ferret5.70 so I downloaded ferret6.1
I had these 3 data file :
1> ./acan_arthern.nc
name
title
I
J
K L
ACC
Accumulation
1:361
1:61
... ...
on grid GTH1 with -1.000000E+34 for missing data
X=-0.5:360.5 Y=-90.2:-59.8
2> ./lonlat.nc
name
title
I
J
K L
LON
Longitude
1:311 1:311
... ...
degrees on grid GMZ1 with -1.000000E+34 for missing data
X=-3110:3110 Y=-3110:3110
LAT
Latitude
1:311 1:311
... ...
degrees on grid GMZ1 with -1.000000E+34 for missing data
X=-3110:3110 Y=-3110:3110
3> ./acanMAR0405.nc
name
title
I
J
K L
ACCMAR0405
(SNOWHY[D=snowHY.20050101,L=4]- 1:311
1:311 ...
1:1
on grid GNW1 with -1.000000E+34 for missing data
X=-3110:3110 Y=-3110:3110
time range: 01-JAN-2005 18:00
Where LON and LAT are the longitudes and latitudes corresponding to X and Y of ACCMAR0405
I wanted to have the same grid for ACC and ACCMAR0405 to compare them.
Here is the ferret command to do that :
let lonout=lon[d=2]
let latout=lat[d=2]
let ACC_new=rect_to_curv(ACC[d=1],lonout,latout,1)
Thanks,
Cécile
2008/5/14, Peter Szabo <szabpet83@xxxxxxxxx>:
Dear Cécile,
As i understand you question you need to have your (rectilinear) data set in a curvilinear grid.
You
can have it easily by the RECT_TO_CURV function. You only need two
curvilinear grid variables (2D fields of lons and lats describing the
curvilinear grid) from an other, curvilinear file or from yours:
go mp_stereographic_south
set grid your_old
!now you have variables like `mp_standard_parallel` and `mp_central_meridian` and x_page and y_page
!the
`mp_standard_parallel and `mp_central_meridian` are constants (the
middle of your map), the x_page and y_page are variables (they are just
differences from the standard_parallel and central_meridian). so
somehow you need to add them or sub them to get the correct curvilinear
coordinates. i did not have time for further analyse.
let x_st=x_page+`mp_standard_parallel`
let y_st=y_page+`mp_central_meridian`
after this you can use:
let your_new=rect_to_curv(your_old,x_st,y_st,1)
save/file="..." your_new
hope this helps a bit,
Peter
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement