Dear Prof,I did'n understand to the exact, I used the following command to Interpolate, It gives the result Interpolated but I did'n see any difference and Interpolated maps based on this value. I attaching you the code which I used... Please give Instructions..yes? DEFINE AXIS/Y=-60:30N:10/UNIT=DEGREES ylatReplacing definition of axis YLATyes? DEFINE AXIS/Y=-60:30N:10/UNIT=DEGREES YLATyes? let swhcorgrid = scat2gridgauss_xy (lat, lon, swhcor, x[gx=xlon], y[gy=YLAT], 4,2,4,2)yes? stat swhcorgridSCAT2GRIDGAUSS_XY (LAT, LON, SWHCOR, X[GX=XLON], Y[GY=YLAT], 4,2,4,2)LONGITUDE: 10E to 130ELATITUDE: 65S to 35NZ: N/AT: N/AE: N/AF: N/ADATA SET: ./wm_20110101.ncTotal # of data points: 120 (12*10*1*1*1*1)# flagged as bad data: 40Minimum value: 0.62119Maximum value: 5.3594Mean value: 2.6417 (unweighted average)Standard deviation: 1.1658yes? SET MODE INTERPOLATEyes? LIST/L=1/X=15E:120E/Y=-60S:30N SWHCORVARIABLE : sea_surface_wave_significant_height_corrected (m)FILENAME : wm_20110101.ncSUBSET : 106 points (X)15 / 15: 3.14016 / 16: 1.54017 / 17: 3.38018 / 18: 1.74019 / 19: 3.16020 / 20: 1.52021 / 21: 3.59022 / 22: 1.60023 / 23: 3.15024 / 24: 1.56025 / 25: 3.46026 / 26: 1.37027 / 27: 3.40028 / 28: 1.36029 / 29: 3.21030 / 30: 1.64031 / 31: 3.42032 / 32: 1.56033 / 33: 3.42034 / 34: 1.45035 / 35: 1.42036 / 36: 3.44037 / 37: 1.52038 / 38: 3.54039 / 39: 1.48040 / 40: 3.24041 / 41: 1.49042 / 42: 3.56043 / 43: 1.54044 / 44: 3.53045 / 45: 1.74046 / 46: 3.17047 / 47: 1.45048 / 48: 3.96049 / 49: 1.46050 / 50: 3.36051 / 51: 1.58052 / 52: 3.90053 / 53: 1.51054 / 54: 3.36055 / 55: 1.42056 / 56: 3.30057 / 57: 1.59058 / 58: 1.65059 / 59: 3.29060 / 60: 1.71061 / 61: 3.41062 / 62: 1.56063 / 63: 3.68064 / 64: 1.50065 / 65: 3.11066 / 66: 1.63067 / 67: 3.50068 / 68: 1.72069 / 69: 3.67070 / 70: 1.74071 / 71: 3.56072 / 72: 1.62073 / 73: 3.22074 / 74: 1.61075 / 75: 3.60076 / 76: 1.50077 / 77: 3.26078 / 78: 1.60079 / 79: 3.32080 / 80: 1.60081 / 81: 1.50082 / 82: 3.66083 / 83: 1.90084 / 84: 3.29085 / 85: 1.99086 / 86: 3.08087 / 87: 3.83088 / 88: 1.89089 / 89: 3.73090 / 90: 1.69091 / 91: 4.11092 / 92: 1.55093 / 93: 3.65094 / 94: 1.67095 / 95: 3.33096 / 96: 1.62097 / 97: 4.05098 / 98: 1.47099 / 99: 4.110100 / 100: 1.470101 / 101: 4.320102 / 102: 1.580103 / 103: 1.670104 / 104: 3.860105 / 105: 1.730106 / 106: 3.760107 / 107: 1.600108 / 108: 3.770109 / 109: 1.340110 / 110: 3.940111 / 111: 1.660112 / 112: 3.860113 / 113: 1.550114 / 114: 3.770115 / 115: 1.740116 / 116: 3.260117 / 117: 1.490118 / 118: 4.190119 / 119: 1.500120 / 120: 4.160yes? LIST/L=1/Y=-60S:30N SWHCOR[X=15E:120E@ITP]VARIABLE : sea_surface_wave_significant_height_corrected (m)FILENAME : wm_20110101.ncX : 15 to 120 (interpolated)3.140yes?yes?yes?yes?Sent: Wednesday, February 5, 2014 11:48:03 PM
Subject: Re: [ferret_users] Spatial Trend
Hello,
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.ncThe Y axis definition should not have -60S, but either 60S or -60, without the S.
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
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? 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 swhcorgridSCAT2GRIDGAUSS_XY (LAT, LON, SWHCOR, X[GX=XLON], Y[GY=YLAT], 4,2,4,2)LONGITUDE: 10E to 130ELATITUDE: 25N to 65NZ: N/AT: N/AE: N/AF: N/ADATA SET: ./wm_20110101.ncTotal # of data points: 48 (12*4*1*1*1*1)# flagged as bad data: 17Minimum value: 0.5978Maximum value: 4.3431Mean value: 1.6993 (unweighted average)Standard deviation: 1.3002yes? 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)yes?
regards,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
Hello,
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:30To interpolate it to a grid, use one of the SCAT2GRID functions
yes? plot/vs/over/nolab/ribbon/thick/size=0.08/symbol=17/key/LEV= v LON,LAT,SWHCOR
yes? show function scat2grid*xyPerhaps the scat2gridgauss_xy function. A note on the syntax: in your axis definition, the latitude axis should be one of these:
DEFINE AXIS/Y=60S:30N:10/UNIT=DEGREES ylatNot -60S.
DEFINE AXIS/Y=-60:30:10/UNIT=DEGREES ylat
-Ansley
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. Russ 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? thanksSimply shade slope. Sent from my iPhoneOn 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 years? Thank you