[Thread Prev][Thread Next][Index]
Re: subsampling of grided data onto point location and time.
Hi Yogesh,
If you 'just' want to get the data at a particular point from
a gridded file to a new variable then use 'let' command to extract the
data like..
!suppose you want to get data at 59E and 1S
set data coads_climatology
! to get 12 values corresponding to each month
LET airt_x59E_y1S = airt[X=59E,Y=1S,l=1:12]
! to get 1 value corresponding to APR-15
LET airt_x59E_y1S = airt[X=59E,Y=1S,t="15-APR"]
You can use this new variable to compare with the second "point"
dataset values. Or if you want to fix the location according to
the second dataset then you have to make sure that you have common
lat, lon & time points in both the datasets. If you want a better
feedback please post the result of 'ncdump -c' for both the NetCDF
files and explain exactly what you want do with these two datasets
..(like comparison of time series). Anyway here is a quick example.
Hope This Helps
With Regards
Jaison
!----------example.jnl-----------------------
set data coads_climatology ! gridded data
sh da ! see the contents
! let us create some "point data"
! suppose data at one particular location say..59E,1S
! is available for mid-day of each month for one year
! (for conviniece take it as 0000 to match with coads
! climatology)
let tair = TSEQUENCE({26.3,27.4,27.2,26.9,28.0,27.9,28.3,\
28.3,28.5,28.7,28.2,27.8})
let lonx = 59
let laty = -1
DEFINE AXIS/t="16-JAN-0000:00":"16-DEC-0000:00":`365.2425/12`/\
units=days/T0="01-JAN-0000:00" tmon
DEFINE AXIS/x=`lonx`:`lonx`:1/units=longitude xaxlon
DEFINE AXIS/y=`laty`:`laty`:1/units=latitude yaxlat
let xyt_stamp = X[GX=xaxlon] *0 + Y[GY=yaxlat] *0 + T[GT=tmon]*0
let tair_xyt = RESHAPE(tair,xyt_stamp)
plot tair_xyt-airt[d=1,x=59,y=1S,l=1:12]
!-----------------end of example.jnl---------------
On Fri, 12 Nov 2004, Yogesh K. Tiwari wrote:
> Hello Ferret Users,
>
> How I can do the subsampling of a grided data on a given point location
> and time.
>
> Both the grided data and point data are in netcdf format.
>
> The grided data looks like, for example :
>
> title I J K L
> CO2_mod 1:360 1:180 -- 1:100
>
> here L is time steps.
>
> And point data looks like :
>
> title I J K L
> CO2_sat -- -- -- 1:1860206
> lat -- -- -- 1:1860206
> lon -- -- -- 1:1860206
>
> here L is number of index.
>
> I could not get much help from ferret users guide.
>
> Many thanks in advance,
>
> Regards,
> Yogesh
>
>
>
>
>
--
___________________________________________________
Jaison Kurian
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3942505
+91-80-3600450
Fax:+91-80-3600865
___________________________________________________
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement