[Thread Prev][Thread Next][Index]

Re: Log(depth) plot



On Fri, 18 Feb 2005, Tony Jolibois wrote:

> I read the mail archive about it but I'm not able to reproduce on my data.
> I want to make a plot with the vertical axis = log(depth) on a grid like
> yes? show grid temperature
>     GRID GEX2
>  name       axis              # pts   start                end
>  TRACK     X                   29 r   1                    29
>  DEPTH     Y (m)               33 i-  0                    5500
>  TIME      Z (days)           519 i   19601                20120
>  normal    T

Hi Tony,
	If it is a line plot you want then you should look in the
manual rather than the mail since the log plot functionality has
become much more user friendly.  You should look at the /HLOG
/VLOG and perhaps the /TRANSPOSE options of the PLOT command.
	For a SHADE or FILL with log axis the three-argument
versions may be best suited to the job, and there is a recent
reply of mine
http://ferret.wrc.noaa.gov/Ferret/Mail_Archives/fu_2005/msg00129.html
that may be of use.

	There is another issue in the dataset you describe - that
the depth axis includes the value ZERO! The plot/hlog option does
not throw a fit at this in a demo I just tried, but the data at
DEPTH=0 is ignored (and the value at y=10 in some cases which I
don't understand!!!.  If your sampling is dense enough for small
depths this is not a problem but, if this is the only near surface
value you may want to "fake it" by regridding the y=0 value to
say y=1!

Here is a demo to illustrate the issues. Hope it helps,
Mick

!----- DEMO OF LOG AXIS PLOT WHEN ZERO IS AN AXIS VALUE -----

! define x and z axes
def axis/x=1:29:1 xax ; def axis/z=1:10:1 zax
! ... and a y-axis to represent depths (with a y=0 value)
let ht=ysequence({0,10,22,55,100,220,550,1000,2200,5500})
def axis/y/name=yax/depth/from_data ht
def grid/x=xax/y=yax/z=zax grd

! define a dummy function v(x,y,z)
let v=i[g=grd]+10*j[g=grd]+100*k[g=grd]

plot/i=1/k=1/vlog/vlimits=1:10000/transpose v !!! lacks y=10 point

! note that with the use of /depth in the axis definition and the
! /transpose option in the plot you get a downward pointing
! (inverse) log axis as seems appropriate to your case. Note that
! if you drop the /vlimits=1:10000 the presence of y=0 causes an
! error.  The quirk is that the perfectly valid data point at y=10
! is dropped unless you set the j range

plot/i=1/k=1/j=2:10/vlog/vlimits=1:10000/transpose v !!! OK now

! now suppose you want to include the surface datum (y=0) too.
! if your data is such that y=0 is for all practical purposes
! the same as y=1 then we can just regrid. For example
let ht2=ysequence({1,10,22,55,100,220,550,1000,2200,5500})
def axis/y/name=yax2/depth/from_data ht2
define grid/like=grd/y=yax2 grd2
let v2=v[g=grd2,gy=@asn]

plot/i=1/k=1/vlog/vlimits=1:10000/transpose v2 !!! whole profile


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement