Re: overlay error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 31 Oct 2008 08:25:41 -0600 (MDT)

Hi Guanghua,

The error:

  fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member.

indicates that you are trying to overlay a map plot on top of another
plot.

Map plots cannot be overlaid onto other plots. Usually, you want to
overlay things the other way around: like a contour or vector plot on
a map plot.

I'm guessing you might be doing something like this:

     plot1 = gsn_csm_contour_map(wks,data1,res1)
     plot2 = gsn_csm_contour_map(wks,data2,res2)
     overlay(plot1,plot2)

Instead, make the plot you want to overlay a non-map plot:

     plot1 = gsn_csm_contour_map(wks,data1,res1)
     plot2 = gsn_csm_contour(wks,data2,res2)
     overlay(plot1,plot2)

The "data2" variable will need to contain lat/lon coordinate arrays so
that "overlay" knows where to overlay it on the base map ("plot1").
Also, you may need to fix the "res2" resource list in case
it contained any map resources.

--Mary

On Fri, 31 Oct 2008, Guanghua Chen wrote:

> Hi all,
> I can separately produce two plots. However, when I wrote overlay(plot1, plot2) to run script, NCL mentioned the following error and no plot can be produced.
> fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member.
> Anyone knows what's wrong.
>
>
> 2008-10-31
>
>
>
> Guanghua Chen
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 31 2008 - 08:25:41 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 31 2008 - 15:58:35 MDT