[Thread Prev][Thread Next][Index]
Re: [ferret_users] shade: a cross section with the surface topographyfilled at the bottom?
Hi Mick and Jaison,
I tried all methods but couldn't implement the most rigourous ones
since the grid of my variables doesn't match properly any of the
solutions you suggested. The grid is x y z t with x and y = km and z
= a sigma coordinate. Since I want to plot a cross section of the
wind versus latitude and pressure, everything gets more complex. I
can not regrid everything on new axis or I loose my "topography".
Therefore I use this solution: fill the graph with a uniform colour
before plotting my variable. It works fine, is dead easy to do, but
leads to a tiny problem that I don't understand: at the northest
latitude, I get a "column" of grey. I attach the graph so that you
can see.
Here is how I plot this graph. It's extracted from a bigger script
dealing with the time dimension or other thing, some steps here after
might look a bit weird for that reason.
x or i = distance along a parallel, expressed in km
y or j = dimension perpendicular to x, expressed in km
z or k = vertical dimension, sigma coordinate (k=40 is the surface)
varS[x,y,z] = zonal wind
pp[y,z] = pressure averaged over 10W-10E (i=40:96@ave)
ll[y] = latitude averaged over 10W-10E (i=40:96@ave)
1. Get the background in grey:
let vv = if varS ne 0 then varS/varS else varS+1 ! vv = 1 everywhere
let vp = if k eq 40 then pp/pp*1000 else pp ! vertical
dimension for the background variable, I need to extend it until 1000
hPa to get my "topography"
shade/nolabel/nokey/palette=grey/vlimit=1000:0:-100/k=7:40 vv
[i=40:96@ave],ll,vp
2. Plot over this the zonal wind:
shade/key/pal=.../level=.../nolabel/vlimit=1000:0:-100/k=7:40/over/
set varS[i=40:96@ave],ll,pp
go layout ; ppl ylab "PRESSURE (hPa)" ; ppl fill/over
I don't understand why the variable 'vv' extends much further
northwards than the variable 'varS'. I don't do anything to this
dimension, so both should be the same. What's going on here then?
Emilie

On 29 Sep 2006, at 20:16, Jaison Kurian wrote:
Hi Emilie,
Here are 3 methods to solve your problem.
Also have a look at
http://www.ferret.noaa.gov/Ferret/Mail_Archives/fu_98/msg00242.html
http://ferret.wrc.noaa.gov/Ferret/Mail_Archives/fu_2000/msg00083.html
And see : ferret/examples/two_dee_plot_of_1d.jnl
Plese have a trial with the example below,
Hope this helps,
Jaison
!---------------------------------------------------------------------
\ cancel mode verify
!
! 3 methods to overlay bottom topography on vertical section plots
!
!-------------------------------------------------------------------
!
!--1. THE BEST ONE : from ferret/examples/two_dee_plot_of_1d.jnl
! Please note that the topography is not in the data
resolution
set data etopo20
set data levitus_climatology
set region/x=180:360/y=20n/z=0:5000
let bottom = (-1)*rose[d=etopo20]
let bottom_2d = bottom - z[g=temp]
fill temp[x=@fln:100]
fill/over/lev=(-10000)(0)/palette=black/nolab bottom_2d
pause
!--2. Simple one, bit ugly, works good only with SHADE command.
! Here the topography is in the resolution of the data.
! Trick : define a variable which is valid where temperature
! is missing, then overlay this variable.
let topo = IF temp THEN (`temp,r=bad`) ELSE 1
shade temp
shade/ov/nolab/nokey/pal=black topo
pause
!--3. Better method than 2, both SHADE and FILL works fine.
! Here the topography is in the resolution of the data.
! Trick : Fill the plot area with a color (define a variable
! with the same grid as temperature but with the
! value 1 EVERYWHERE, use this variable to fill).
! Then fill or shade temperature over this.
! This method will also work in one (default) view port, with
! "/overlay" as in 2 above. But sometime it may lead to
! problems with color key and "/set" & "ppl fill".
define view/xlim=0:1/ylim=0:1 v1
define view/xlim=0:1/ylim=0:1 v2
set reg/x=180:360/y=20n/z=0:5000
let topo = IF temp THEN 1 ELSE 1
set view v1
shade/pal=black/nolab/nokey/noaxes topo
set view v2
fill temp
!---------------------------------------------------------------------
On Fri, 29 Sep 2006, Emilie Vanvyve wrote:
Dear Ferret users,
I looked at the online help, found some clues to help me, but I
haven't succeeded so far and thought of submitting my question to
you.
I plot a cross section of the zonal wind with a simple "shade/x=0/
l=1/
vlimit=1000:0:-100 uairdy,lat,pressure". The resulting graph is
joined to this email.
How can I get the imitation of the surface topography (the white
area) shaded in grey or black or whatever colour?
In the sigma_coordinate_demo.jnl script, some similar graphs are made
and obviously succeeded where I fail. But the problem is taken
backwards: first the topography is defined (variable "bathymetry"),
then the variable is computed, then the variable is plotted, then the
bathymetry is overlayed.
How can I compute the surface topography from my data? I can get the
value of the pressure at the surface, but I haven't succeeded to make
it 3D "under the surface" and even less to plot it nicely.
Would anybody know how to do?
Many thanks in advance,
Emilie
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement