[Thread Prev][Thread Next][Index]

Re: [ferret_users] Script crashed -- scat2gridgauss_xy




Thank You for your response.
When I tried your approach I got what you can see in that picture which I attach.
So this is not what I wanted to do. But thank you for suggestions.

kind regards,
Szymon Roziewski

2011/1/31 Russell Fiedler <russell.fiedler@xxxxxxxx>

Hi Szymon,

Rather than using linear interpolation use the @AVE operator. This will give you values within the area of
the coarse grid and won't chop off the edges.

If you wish to filter for some reason on the fine grid but want the edges kept you can use a mask

let var_fine = var_coarse[gxy=grid_fine@AVE]   ! Doesn't chop off
let var_fine_filtered = var_fine[x=@SBX:5]          ! example filter. Lose outside points
let var_fine_filtered_1 = if ( var_fine_filtered  ) then var_fine_filtered else var_fine  ! Interior points are filtered but keep the outer points.

Russ


On Saturday 29 January 2011 11:37, Szymon Roziewski wrote:
> The data which I try to interpolate in this case are the same as the previous but the previous were as cdf and now I have in txt file. And when I read it I use the flag "bad". So, I'm wondering why this script is not working for this data as worked for the previous one.
>
> Kind regards,
> Szymon Roziewski
>
> 2011/1/29 Szymon Roziewski <szymon.roziewski@xxxxxxxxx<mailto:szymon.roziewski@xxxxxxxxx>>
> I have to use this or similar function because I get horrible result. I discussed that problem with Dr. Hein and he advised me to use scat2gridgauss_xy. Then I had cdf data and all worked properly. But now when I try to reuse it it doesn't work. The script looks like being hanged.
> I give the link to what Dr. Hein said.
> http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2010/msg00803.html
>
> Kind regards,
> Szymon Roziewski
>
>
> 2011/1/28 Ansley Manke <Ansley.B.Manke@xxxxxxxx<mailto:Ansley.B.Manke@xxxxxxxx>>
>
> Hi -
> Is Ferret crashing, or the script exiting?  Or does it just take a very long time? Why are you using the scat2grid function?  It seems that you're starting with gridded data and regridding it to this very fine grid. The Ferret regridding transformations would do this directly.
>
> Once you have read in your data, and defined the fine grid,
>
>   yes? let swh_smooth = swh_grid[gx=xfine,gy=yfine]
>   yes? fill swh_smooth
>
> This regrids almost at once. There are several regridding transformations to choose from; run the Ferret command SHOW TRANSFORMS command for a list of them.
>
> Ansley
>
>
> On 1/28/2011 4:44 AM, Szymon Roziewski wrote:
> Dear Ferreters,
> I have such a script:
> set win/size=6.0/aspect=`1.1`
> SET VIEWPORT FULL
> CANCEL MODE LOGO
> DEFINE AXIS/X=-5.666666667:5.25:0.083333333/unit=degree xlon
> DEFINE AXIS/Y=-2.0:10.0:0.083333333/unit=degree ylat
> DEFINE GRID/x=xlon/y=ylat grid_xlon_xlat
> FILE/VARIABLES=swh_grid/COLUMNS=132/GRID=grid_xlon_xlat swh20101018090000.txt
> set var/bad=-1 swh_grid
> set var/units=meters swh_grid
> set var/title="Significant Wave Height" swh_grid
> DEFINE AXIS/X=-5.666666667:5.25:0.010416667/unit=degree xfine
> DEFINE AXIS/Y=-2.0:10.0:0.010416667/unit=degree yfine
> DEFINE GRID/x=xfine/y=yfine fine_grid
> let xpts = xsequence(0*swh_grid+x[g=swh_grid])
> let ypts = xsequence(0*swh_grid+y[g=swh_grid])
> let datapts = xsequence(swh_grid)
> let xscale=0.1
> let yscale=0.1
> let cutoff=2
> let swh_smooth = scat2gridgauss_xy(xpts,ypts,datapts,x[g=fine_grid],y[g=fine_grid],xscale,yscale,cutoff,0)
> list swh_smooth
>
> wchich should do interpolation data, but it doesn't. The script follows up to the line with list swh_smooth and as reached as is iddle.
> I think the line with scat2gridgauss_xy function failed. But I don't know the reason.
> Why is that I don't know. I have very similar script which copes with cdf data and do it well.
> But in this case previous approach failed. (When I try using txt data with flag bad=-1.)
> I attach the data file.
>
>
> Kind regards,
> Szymon Roziewski
>
>
>
> --
> Z wyrazami szacunku,
> Szymon Roziewski
>
>
>
> --
> Z wyrazami szacunku,
> Szymon Roziewski
>



--
Z wyrazami szacunku,
Szymon Roziewski

Attachment: dasdasdasd
Description: Binary data


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

Privacy Policy | Disclaimer | Accessibility Statement