[Thread Prev][Thread Next][Index]

Re: [ferret_users] subsampling as qualifier



Hi Ansley and Patrick,

I've been long wondering about the same problem as Patrick. But, my motivation may be a bit different. To me the main problem is the size of the vector graphics.  PostScript images from high-resolution data can be unbearably large.

Your idea does sound like a convenient method for reading data using strides, when the variables being plotted are file variables.  However if the SHADE plot is showing a more complex _expression_ perhaps involving combinations of variables regridded to a new grid, then the qualifier would be ambiguous.

So, I was wondering if strides or resolution or both can be an option to the SHADE and FILL commands.  After all potential computations, these commands find out the grid of the field they are going to plot.  So, it's best to ask them to regrid.

Of course you can always achieve the same result by writing a script such as Ansley showed us, but it's a bit more tedious than

    FILL/xres=600/yres=400  some_expression

Regards,

Ryo

It may be more cumbersome, but it is really necessary to to attach the striding information to the file variables or their grids.

Certainly a script can set up the striding according to the size of the grid and the output resolution of the image. Here's an example. Similar logic could be used to define a stride and use the SET AXIS/STRIDE command, or to define strides on a sub-region of the grid.

yes? let xres = 600
yes? let yres = 400

yes? let nx = `var,return=isize`
yes? let ny = `var,return=jsize`

yes? let istride = MAX(1,INT(nx/xres + 0.5))
yes? let jstride = MAX(1,INT(ny/yres + 0.5))

yes? define symbol region_spec = [i=1:`nx`:`istride`,j=1:`ny`:`jstride`]
yes? shade var($region_spec), lon2D($region_spec), lat2D($region_spec)
-Ansley


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

Privacy Policy | Disclaimer | Accessibility Statement