[Thread Prev][Thread Next][Index]

Re: [ferret_users] Randomly distributed time series plots



Hi

Another way to look at a lot of timeseries from a dataset would be to use PLOT/ALONG=  ( introduced in Ferret v7.)

Here you specify a 2-dimensional slab of data and plot a set of line plots from it.  If you plot a few lines, a line-key is drawn showing what the locations are,

yes? use monthly_navy_winds
yes? plot/along=t/x=180 uwnd[y=-40:40:20]

 or to plot many timeseries lines and get an idea of the general character, draw them with a single line style and no line key

yes? plot/along=t/y=-50/line/color=blue/nokey uwnd


On 7/19/2020 8:37 PM, Ryo Furue wrote:
Fabio,

On Fri, Jul 17, 2020 at 11:35 PM 'Fabio' via _OAR PMEL Ferret Users <ferret_users@xxxxxxxx> wrote:
Sometimes I need to do a 'quick check' across a large area and visualize
the time series of a particular variable at random locations to get an
idea of the general trend through time.
[ . . . ]
 
Additionally, I want to use the maximum allowed by multi_view, which I
think is 15 windows, and do it multiple times in a loop if I need to
sample a large region.

Is there anyway to make this more automatic? Such as sampling randomly
lat and long from the available range?

I'm sure that this is doable in Ferret, but that doesn't mean that Ferret is the best tool for it.

My recommendation would be to use a general scripting language to do the looping and call ferret within it.  In a pseudo-code

is = random_samples(1, imax, samples=5)
js = random_samples(1, jmax, samples=7)

fignum = 0
for j in js
    for i in is
       fignum = fignum + 1
       system("pyferret -nodisplay -script plot_one_panel.jnl #{i} #{j} panel#{fignum}")
   endfor
endfor

system("montage panel*.png -geometry 5x7+1+1 combined.png")

In this pseudo scripting language, "system" is the command to call an external program.  The "montage" command is in the imagemagick suite, which tiles multiple images into a single image.

I suppose that R can call Ferret from within it.  If so, you can use R to do the looping.

If you need a simple algorithm to select a set of random indices (random_samples in my pseudo code above), I can provide one.

In general, to use a general scripting language for the "control logic" and use Ferret as an "engine" is flexible and versatile.

Ryo


-- 
Ansley Manke
Science Data Integration Group
NOAA Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115

I am currently teleworking and am available Tue-Wed-Thu.

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

Privacy Policy | Disclaimer | Accessibility Statement