[Thread Prev][Thread Next][Index]
[ferret_users] Two interpolation syntax questions
Dear Ferreters:
I have two separate, but related questions. I have latitudes,
longitudes and times for the
positions of several tropical cyclones and need to co-locate with some
satellite data.
Basically, just need to do a simple interpolation to find the position of
the storm at satellite
overpass. So, the positions of the storm are at 20.50,53.50 at 0000Z and
21.34,52.10 at
0600Z and the satellite overpass is at 0325Z.
Data looks like:
day i=1:48
time i=1:48
lat i=1:48
lon i=1:48
I wanted to find the appropriate "i" position in the array that 0325Z
was between and then
apply my own interpolation calculations, but found this difficult. In
fortran I would code:
do i=1,48
if ( 0325 .gt. time(i) .and. 0325 .lt. time(i+1) ) then
complete interpolation
endif
enddo
I tried this in ferret by saying:
repeat/range=1:48:1/name=a (if 20 eq day[i=`a`] and 0325 gt time[i=`a`]
and 0325 lt
time[i=`a`+1] then complete interpolation)
I tried various sequences, but could not get the equivalent of my fortran
code in ferret to
work.
Additionally, I tried using the @weq transformation as:
let test = lat*time[x=@weq:1030] !trying a different time here
let nlat = test[x=1:48@sum]
This worked for the first time in the array between 0000Z and 0600Z, but
did not produce a
field of coefficients for the rest of the times that I needed. This is
what I got from listing test
and time together...
time test
1/1: 600. 3.173
2/2:1200. 8.027
3/3:1800. ....
4/4: 0. ....
5/5: 600. ....
6/6:1200. ....
etc.......
why are there not coefficients for the rest of the times at 1030?
Can anyone help to clear up (1) how to cycle through data element by
element like fortran
for the statement above and (2) how to get coefficients for all the times
and not just the first
instance of 1030 like I showed above?
Many thanks...
Steve Guimond
*****************************************
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies
*****************************************
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement