Re: Question about overlaying WRF plot on non-WRF plot [Was: (no subject)]

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 21 2012 - 15:00:16 MST

Hi Merrill,

Thanks for providing your scripts and data offline.

The issue is that the text associated with wrf_vector is drawn using gsn_text_ndc, and hence it is *not* attached to the "vector" plot.

When you overlay "vector" on "map", then, the titles are long gone.

You are doing the right thing using gsn_text_ndc to add the text yourself.

You can also use gsn_create_text and gsn_add_annotation to attach the text to the top left of the plot. This way, if you need to resize the plot, the text will stay with it.

Finally, I converted your code to use gsn_csm_vector instead of wrf_vector, although this is not absolutely necessary. I did notice that this slightly changes the number of wind barbs that you get.

See the attached modified version of your script, and one of the resultant PNG images.

--Mary

On Nov 16, 2012, at 1:24 PM, Merrill Bean wrote:

> Hi Mary,
> I got labels on the plot using the text functions, see the image, the previous images
> were made with the attached code. In raster_317_318.ncl I set:
> res@tiMainString=lb
> where lb is a string variable with the label.
> The wrf_PressureLevel1.ncl uses
> res@MainTitle = sprinti("REAL-TIME WRF interp level %i",level)
> to label the plots.
>
> I have both set in the overlay plot (combcimwrf.ncl) and the labels only print because
> of the text function calls. and I get lots of warnings about invalid resources
>
> Variable: lb
> Type: string
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> (0) 2012-03-20_00:00:00 Level ( 13 ) 600.5 hPA
> warning:tmEqualizeXYSizes is not a valid resource in map at this time
> warning:cnFillOn is not a valid resource in pdust_vector at this time
> warning:mpProjection is not a valid resource in pdust_vector at this time
> warning:gsnLeftStringOrthogonalPosF is not a valid resource in pdust_vector at this time
> warning:gsnStringFontHeightF is not a valid resource in pdust_vector at this time
> warning:gsnRightStringOrthogonalPosF is not a valid resource in pdust_vector at this time
> warning:cnFillMode is not a valid resource in pdust_vector at this time
> warning:mpLimitMode is not a valid resource in pdust_vector at this time
> warning:mpMinLonF is not a valid resource in pdust_vector at this time
> warning:mpMaxLonF is not a valid resource in pdust_vector at this time
> warning:mpMinLatF is not a valid resource in pdust_vector at this time
> warning:mpMaxLatF is not a valid resource in pdust_vector at this time
> warning:cnInfoLabelOn is not a valid resource in pdust_vector at this time
> warning:cnLineLabelsOn is not a valid resource in pdust_vector at this time
> warning:cnLevelSelectionMode is not a valid resource in pdust_vector at this time
> warning:cnMinLevelValF is not a valid resource in pdust_vector at this time
> warning:cnMaxLevelValF is not a valid resource in pdust_vector at this time
> warning:mpLambertMeridianF is not a valid resource in pdust_vector at this time
> warning:mpLambertParallel1F is not a valid resource in pdust_vector at this time
> warning:mpLambertParallel2F is not a valid resource in pdust_vector at this time
> warning:mpGridAndLimbOn is not a valid resource in pdust_vector at this time
> warning:mpFillOn is not a valid resource in pdust_vector at this time
> warning:mpGridLineDashPattern is not a valid resource in pdust_vector at this time
> warning:mpPerimOn is not a valid resource in pdust_vector at this time
> warning:cnLinesOn is not a valid resource in pdust_vector at this time
> warning:mpDataBaseVersion is not a valid resource in pdust_vector at this time
> warning:mpGeophysicalLineColor is not a valid resource in pdust_vector at this time
> warning:mpUSStateLineColor is not a valid resource in pdust_vector at this time
> warning:mpDataSetName is not a valid resource in pdust_vector at this time
> warning:mpInlandWaterFillColor is not a valid resource in pdust_vector at this time
>
> It is plotting what I need so its not urgent. If you can point me to the right example , I'll
> keep working on it.
> Thanks,
> Merrill
>
>
>
> Exactly which labels are you talking about, and how are you putting them on the plot? It would help to see some code.
>
> Thanks,
>
> --Mary
>
> On Nov 15, 2012, at 8:41 AM, Merrill Bean wrote:
>
>> Hi Mary,
>> Thanks, that was it. Sorry about the no subject line.
>> I'm not getting labels on the plots, when I overlay plots, I'm guessing the labels
>> need to be on the top layer? I actually put the label on both layers, but its not
>> displayed. I'll keep trying, maybe some of the text functions?
>> Thanks,
>> Merrill
>>
>> ______________________
> <pdust.000271.png><combchimwrf.ncl><wrf_PressureLevel1.ncl><raster_317-318.ncl>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

pdustovrlay.000001.png
Received on Wed Nov 21 15:00:32 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST