Re: Column Integrated Total Cloud Mixing Ratio/colorbar

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 28 2013 - 17:42:18 MST

On Feb 28, 2013, at 4:32 PM, Tracy Emerson wrote:

> Hi all,
> #1. I am trying to figure out if there is a function in NCL that calculates the column integrated total cloud mixing ratio (mm) , from cloud water/ice mixing ratios (g/kg). I didn't find anything in my searches so I expect not.
> I am trying to reproduce a figure that was made using RIP (which I've never used) which calculates this field (intcld).

Hi Tracy,

The only "mixing ratio" type of functions we have are "mixhum_ptrh" and "mixhum_ptd":

If you (or anybody else) have the Fortran code for the functions you're talking about, we can help you call them from NCL and/or we can eventually add them to NCL.

> #2. The colorbar on the plot I made put the 1st color that was specified as the last color. i.e. the blue color should be 1st not last on the contour plot. I've attached my current code and figure.

It looks to me like the colorbar is correct. You specified your colors to be:

  resQr@cnFillColors = ispan(17,215,11)

and then you set the first two colors to transparent, which effectively makes the first two colors of your labelbar white:

  resQr@cnFillColors(0:1) = -1

The third color in the labelbar, then, is that light bluish color, which corresponds to color index 39.

The reason you see that dark blue at the end is because you specified 18 contours levels and 18 color fills.
By default, you need to provide one more color than you have levels, because the levels represent values
*between* colors. When NCL runs out of colors, it goes back to the beginning of your list, so somehow it
picked up color index 17 (and not the -1 color like I would have expected).

Anyway, what exactly do you want to see on your labelbar? If you really want those first two colors to be transparent,
but you don't want to see any color boxes for them, then you should not include these two levels in your list
of cnLevels. See example "lb_10.ncl" at:

This might be what you want? You can also look at example lb_12.ncl on that same page.


> Thanks, Tracy
> <6Aug_wrf_d1.png><plot_wrf_cross_sec_d1.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu Feb 28 17:42:30 2013

This archive was generated by hypermail 2.1.8 : Fri Mar 01 2013 - 10:41:03 MST