[Thread Prev][Thread Next][Index]

Re: Discontinuous time axis seen as continuous



Hi Patrick,
The COMPRESSL function might be what you need. There's an FAQ on creating
a seasonal mask:

http://www.ferret.noaa.gov/Ferret/FAQ/analysis/seasonal_masking.html

Based on the example in that writeup, here is a way to generate a
list of all the "springtime" values on an abstract L axis:

use reynolds_sst_wk
let year_days = mod(t[gt=wsst], 365.2425)
let daily_mask_a = if year_days gt 59 then 1
let daily_mask_b = if year_days lt 152 then 1
let daily_mask = daily_mask_a * daily_mask_b
! Springtime data, with missing-data flag at other times.
let spring_only = if daily_mask then fsst
set view upper
plot/x=180/y=0/t=15-jan-1985:15-jan-2000 fsst
plot/over/x=180/y=0/t=15-jan-1985:15-jan-2000/color=green/thick spring_only
! use COMPRESSL to make a list of all springtime data
set view lower
let all_spring = compressl(spring_only[x=180,y=0,t=15-jan-1985:15-jan-2000])
let npts = all_spring[L=@ngd]
plot all_spring[L=1:`npts` ]


Patrick Brockmann wrote:

Hi all,

Is there a way to plot only summer months from a time serie.

Let work from an usual example:

yes? use monthly_navy_winds.cdf
! Plot the all time serie
yes? plot UWND[i=@ave,j=@ave]

Now I would like to plot only JUL-AUG-SEP months from years 1982 to 1992.
JUL-1982; AUG-1982; SEP-1982; JUL-1983; AUG-1983; SEP-1983

Extract the selected months and save them into a file:

yes? save/file=extract.nc/clobber/bounds UWND[i=@ave,j=@ave,l=`7+12*0`:`9+12*0`]
yes? save/file=extract.nc/append/bounds UWND[i=@ave,j=@ave,l=`7+12*1`:`9+12*1`]
yes? save/file=extract.nc/append/bounds UWND[i=@ave,j=@ave,l=`7+12*2`:`9+12*2`]
yes? save/file=extract.nc/append/bounds UWND[i=@ave,j=@ave,l=`7+12*3`:`9+12*3`]
yes? save/file=extract.nc/append/bounds UWND[i=@ave,j=@ave,l=`7+12*4`:`9+12*4`]

Have a look to the extracted file
yes? use extract.nc
yes? plot UWND

I get a correct plot with my selected months.
But what could I do to remove graphically blanks between summer months ?
I have done this using several viewports to plot each time a summer of a specific year
but it a little bit tricky. Is there a simpler solution ?

Thanks for any help on this topic

Happy new year to all

Patrick







[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement