[Thread Prev][Thread Next][Index]

Re: log plots for a depth axis




Hi Brent,

I spend most of my time using Ferret to look at output from atmospheric models 
so I've had this problem of handling log(p) plots with Ferret. To be quite open, 
GrADS handles log(p) axes and plots far easy than Ferret (projections too I have 
to say), but in my case I have to interpolate between grids quite a bit and 
Ferret is far easier at this so I tend to use Ferret, although you might want to 
try GrADS.

I have a ferret script which will handle the log(p) plotting for you. It is not 
finished, it has a few problems to with labelling but it works reasonably well. 
You are more than welcome to it and if you improve on it I would be more than 
happy to have a new version back!

    Glenn
    
> Date: Wed, 30 May 2001 08:38:54 -0700
> From: Steve Hankin <hankin@pmel.noaa.gov>
> Subject: Re: log plots for a depth axis
> To: Brent A McDaniel <gte328r@vorlon.eas.gatech.edu>
> Cc: ferret_users@ferret.wrc.noaa.gov
> X-Accept-Language: en
> 
> Hi Brent,
> 
> Have you had a look at
>     yes? go log_plot_demo
> 
> (can be located via the Unix-level command  ">Fgo log" or "log" in the Users
> Guide index)
> 
> The log plotting is a bit "fussy". Here is an example:
> 
>      define axis/z zlog = exp(k[k=1:10])  ! some axis
>      let fcn = k[gz=zlog]                 ! some function
>      set view upper
>      plot fcn
>      set view lower
>      ppl axtype 1,2
>      plot/k=1:10/vlimits=0:5 fcn
>      ppl axtype 1,1                       ! restore normal plotting
> 
> The resulting plot  is attached (GIF).
> 
> I do not know of a way to invert the vertical log axis (high pressure at the
> bottom). We hope to have that feature in V5.3.
> 
>     - steve
> 
> ===================================
> 
> Brent A McDaniel wrote:
> 
> > Hi Ferreters,
> >
> > I'm trying to make plots for atmospheric data where the vertical
> > coordinate is pressure.  The vertical axis is from 1000mb up to 10mb.  The
> > levels are not equally spaced.  What I want is a plot with pressure on the
> > y-axis, but plotted logarithmically.  Hopefully you understand what I mean
> > as this is the a pretty way to do these types of plots.
> > I'll try my hand at crude ascii art.
> >
> > 10
> > .
> > .
> > .
> > .
> >
> > 100 |
> >     |
> >     |
> >     |
> > 200 | <-- y-axis is spaced log
> >     |
> >     |
> > 300 |
> >     |
> >     |
> > 500 |
> >     |
> > 700 |
> >     |
> > 850 |
> > 1000|
> >     ---------------------------------------------
> >                         x-axis is normal
> >
> > After reading the FAQ and the mailing list archives, I started by defining
> > a new z-axis:
> > yes? define axis/from/name=test/z log(z[gz=level])
> > and plotting things by:
> > yes? contour temp[gz=test@asn]
> >
> > This produces a log plot but the y-axis is inverted (which makes sense as
> > the logs of the highest pressure levels will be the smallest.  Also, the
> > y-axis doesn't have the original pressure levels on it but the new values
> > (1-3 from log10 to log1000).  The inversion was fixed by adding the /depth
> > qualifier to the define axis statement. (now I'm using:
> > define axis/from/name=test/z/depth log(z[gz=level]) but I still have the
> > problem of the y-labels not being the original 1000-10 values.
> >
> > Does anyone have a decent workaround for this? I've got a meeting next
> > week and plots that need to be done. *yikes!*
> >
> > Thanks as always.
> >
> > - Brent
> >
> > --
> > Brent A. McDaniel
> >
> > Dept of Earth and Atmospheric Sciences
> > Georgia Institute of Technology
> > Atlanta, Ga.  USA
> 
> --
> Steve Hankin
> NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
> ph. (206) 526-6080 -- FAX (206) 526-6744
> 



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement