[Thread Prev][Thread Next][Index]

Re: [ferret_users] Spatial Trend

I will answer two questions you sent to me outside of the list.  First, some general comments about interpolation in Ferret.

MODE INTERPOLATE controls whether Ferret interpolates results when getting data out of a grid.  So, for instance, say you have a data on an axis which is every 10 degrees, such as
   define axis/x=0:360:10/units=degrees_east

and you ask Ferret to list data at x=28E.  With MODE INTERPOLATE turned on, Ferret would do a linear interpolation between the data values at x=20 and x=30 and return that interpolated result.  If MODE INTERPOLATE is off, it would return the data at the nearest location, x=30.

Interpolating to a grid can mean a couple of different things.  For your data, which is ungridded data with locations lon, lat and data at lon,lat; we use one of the scat2grid functions, as you show here. If the data is gridded, then interpolating to another grid is referred to in the documentation as "regridding".  Finally if you had gridded data, and wanted data at a set of X,Y locations, that would be "sampling".

Now, about scat2gridgauss_xy. The script you sent earlier needs one change.  You had this:
yes? use wm_20110101.nc
yes? DEFINE AXIS/X=15E:120:10/UNIT=DEGREES xlon
yes? DEFINE AXIS/Y=-60S:30N:10/UNIT=DEGREES ylat
yes? DEFINE GRID/X=xlon/Y=ylat gsnoopy2d
The Y axis definition should not have -60S, but either 60S or -60, without the S.
yes? use wm_20110101.nc
yes? DEFINE AXIS/X=15E:120:10/UNIT=DEGREES xlon

yes? let swhcorgrid = scat2gridgauss_xy (lat, lon, swhcor, x[gx=xlon], y[gy=ylat], 4,2,4,2)
yes? stat swhcorgrid
             SCAT2GRIDGAUSS_XY (LAT, LON, SWHCOR, X[GX=XLON], Y[GY=YLAT], 4,2,4,2)
             LONGITUDE: 10E to 130E
             LATITUDE: 65S to 35N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./wm_20110101.nc
 Total # of data points: 120 (12*10*1*1*1*1)
 # flagged as bad  data: 40
 Minimum value: 0.62119
 Maximum value: 5.3594
 Mean    value: 2.6417 (unweighted average)
 Standard deviation: 1.1658

On 2/4/2014 10:55 PM, Selvam G. wrote:
Dear Prof,

I tried another command with scat2gridgauss_xy , In this Interpolation data points are drawn. please guide me for Interpolating data points within this region, LON=15:120 and LAT=-60:30. 

yes? let swhcorgrid = scat2gridgauss_xy (lat, lon, swhcor, x[gx=xlon], y[gy=ylat], 4,2,4,2)
yes? stats swhcorgrid
             SCAT2GRIDGAUSS_XY (LAT, LON, SWHCOR, X[GX=XLON], Y[GY=YLAT], 4,2,4,2)
             LONGITUDE: 10E to 130E
             LATITUDE: 25N to 65N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./wm_20110101.nc
 Total # of data points: 48 (12*4*1*1*1*1)
 # flagged as bad  data: 17
 Minimum value: 0.5978
 Maximum value: 4.3431
 Mean    value: 1.6993 (unweighted average)
 Standard deviation: 1.3002
yes? let xlon = XSEQUENCE(lon)
yes? let ylat = YSEQUENCE(lat)
yes? let yswhcor = YSEQUENCE(swhcor)
yes? let salinite = SCAT2GRIDGAUSS_XY(xlon,ylat,yswhcor,x[gx=xlon],y[gy=ylat],2,2,2,2)

Selvam G.

From: "Ansley Manke" <ansley.b.manke@xxxxxxxx>
To: "Selvam G." <gselvam@xxxxxxx>
Cc: "ferret users" <ferret_users@xxxxxxxx>
Sent: Tuesday, February 4, 2014 11:18:17 PM
Subject: Re: [ferret_users] Spatial Trend

Your data is organized as lists of longitude, latitude, time and measurements. You used a good method, plot/vs/ribbon, to visualize the density and range of the data.
yes? go basemap x=15:120 y=-60:30
yes? plot/vs/over/nolab/ribbon/thick/size=0.08/symbol=17/key/LEV= v LON,LAT,SWHCOR
To interpolate it to a grid, use one of the SCAT2GRID functions
   yes? show function scat2grid*xy
Perhaps the scat2gridgauss_xy function. A note on the syntax: in your axis definition, the latitude axis should be one of these:
Not -60S. 


On 2/3/2014 7:49 PM, Selvam G. wrote:
Dear Prof,

I would like to know the ferret command for linear Interpolation. I am dealing with Ifremer altimeter wave data for Indian Ocean.I plotted the map but when the Interpolation command is given the .des file is not shown as it is Interpolated. I am attaching one of my wave data for your consideration. I request your guidance for this Interpolation. 

Thanks & regards
Selvam G.

----- Original Message -----
From: "Russ Fiedler" <russell.fiedler@xxxxxxxx>
To: "ferret users" <ferret_users@xxxxxxxx>
Sent: Tuesday, February 4, 2014 3:16:38 AM
Subject: Re: [ferret_users] Spatial Trend

The time units for the trend should correspond to the time axis for your 
data. If it's days then you will have to multiply by 365 or 365.25 to 
get the trend in terms of years.


On 03/02/14 23:45, iwlod@xxxxxxxxxxxxxxxxxxx wrote:
I dont think it is that simple - units on slope are way to small

can someone else confirm?

Simply shade slope.

Sent from my iPhone

On Jan 31, 2014, at 4:17 AM, iwlod@xxxxxxxxxxxxxxxxxxx wrote:

Collective Ferret Wisdom :-)

How do I go from a linear regression line plot (with go regresst) to a
SPATIAL (lat x lon) trend map of say, temperature  for the past 20

Thank you

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement