[Thread Prev][Thread Next][Index]

Re: [ferret_users] plotting vertical cross-sections of WRF data with fill



Hi Carlos,

I'm forwarding this back to the list as it may be of interest.  See
below for the solution.

> > I think I can't use FILL/CONTOUR because it's not a 2-dimensional plot?
> > I get an error if i change shade for fill... I am ploting height
> > (y-axis) Vs xlong in a concrete point of latitude.
> > Is there another way to smooth the image?

> Hi Hein,

> thank you very much for your help. This is the code I use to do my
> graphic, but when I change SHADE for FILL, I have the following error
> message:
>
> ERROR: inconsistent sizes of data regions: box edges (on Z axis)
>           allowed only with SHADE
>
> use dic2009pbl4.nc
> set region /i=0:120/j=60
> let height=(PH+PHB)/9.81
> go black
> REPEAT/l=7:79 (shade /vlim=670:1400/lev="(0,1,0.05)" qcloud*1000, xlong,
> height; plot /nolab /over /line /vs xlong,hgt/1000;
> frame/file=dibujo`l`.gif)

Your variables qcloud and height have different dimensions.  Check
them with

yes?  show grid qcloud
yes?  show grid height

You'll see that qcloud is defined at mass points (e.g. 30 vertical
coordinates) where height has 31: it is defined at the boundaries of
the model grid cells.  I didn't know Ferret could deal with that:
apparently it's clever enough to interpet your "height" variable
correctly with shade.  For fill this doesn't work because it needs to
know the exact center coordinates of your height variable.

Ansley or others may know of a nicer solution (it may be possible to
teach ferret about the cell centers and boundaries), but here's how I
solve it: I use an unstaggered "height" variable which is defined on
the same grid as qcloud.  Try the following variable definitions and
use "geopotential_f" as your height variable:

! full geopotential in m
let /title="full geopotential at layer boundaries" /unit="m" geopot_model = (phb+ph)/9.81

! define my own staggered z axis to do de-staggering using ferret 
! this needs to have values 0.5, 1.5, ..., N-0.5 to work correctly.
let staggered_z=z[gz=bottom_top_stag]-0.5
define axis /z my_staggered_z = staggered_z

! now define a staggered and unstaggered geopotential variable
let geopot_stag = geopot_model[gz=my_staggered_z@asn]
let /title="full geopotential at center of layers" /unit="m" geopotential_f = geopot_stag[gz=bottom_top]

! example plots:
set region /l=7/j=75
shade /vlim=0:4000 qcloud*1000,xlong,geopotential_f
fill /vlim=0:4000 qcloud*1000,xlong,geopotential_f


Kind regards,
     Hein Zelle


-- 

Dr. Hein Zelle
Advisor Meteorology & Oceanography

Tel:    +31 (0)527-242299
Fax:    +31 (0)527-242016
Email:  hein.zelle@xxxxxxxxxxxxx
Web:    www.bmtargoss.com

BMT ARGOSS
P.O. Box 61, 8325 ZH Vollenhove
Voorsterweg 28, 8316 PT Marknesse
The Netherlands

----Confidentiality Notice & Disclaimer---- 

The contents of this e-mail and any attachments are intended for the
use of the mail addressee(s) shown. If you are not that person, you
are not allowed to read it, to take any action based upon it or to
copy it, forward, distribute or disclose the contents of it and you
should please delete it from your system. BMT ARGOSS does not accept
liability for any errors or omissions in the context of this e-mail or
its attachments which arise as a result of internet transmission, nor
accept liability for statements which are those of the author and
clearly not made on behalf of BMT ARGOSS.


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement