[Thread Prev][Thread Next][Index]

Re: [ferret_users] shade: a cross section with the surface topographyfilled at the bottom?



Hi Emilie & Mick,
            Stick to the example i have given earlier. 

1. Define the mask as 

      yes? LET vv = IF varS THEN 1 ELSE 1

2. Use two viewports with same area, one to fill the color and another
       to make the shaded plot. 


Please note that you have used "vp" for the color fill (3rd argument)
and "pp" for the shade plot, both are different. If you define the mask
as shown above, ideally you can use the same arguments for both the
"shade" commands (like shade/............. vv[i=40:96@ave],ll,pp and
shade/........... varS[i=40:96@ave],ll,pp)

If this does not solve your problem, try to adjust /HLIMITS so that the
"extra column" can be removed.

Hope This Helps

Jaison

On Mon, 2 Oct 2006, Emilie Vanvyve wrote:

> 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
> 
> 

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement