Re: Station data: overlay

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 01 2010 - 08:18:11 MST

Hi Jimmy,

It looks like gsn_csm_contour_map_overlay is prototyped to expect 2D
data. I'll have to fix this.

Meanwhile, you can try this as a work-around:

Copy $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl to your own
directory.

Modify this copy of gsn_csm.ncl and change:

function gsn_csm_contour_map_overlay(wks:graphic,data1[*][*]:numeric,\
                                      data2[*]
[*]:numeric,res1:logical, \
                                      res2:logical)

to:

function gsn_csm_contour_map_overlay(wks:graphic,data1:numeric,\
                                      data2:numeric,res1:logical, \
                                      res2:logical)

Then, load your own copy of "gsn_csm.ncl" instead of the one in
$NCARG_ROOT/lib/ncarg/...

Having said all this, however, I think it might be easier to call
gsn_csm_contour and
gsn_csm_contour_map yourself, and do the overlay. You have more control
over the positioning of the extra plot elements this way.

For some examples, see example #1 on the applications page:

http://www.ncl.ucar.edu/Applications/overlay.shtml

--Mary

On Feb 26, 2010, at 10:37 AM, Correia, James wrote:

> Hi-
> I am using station data and want to plot 2 variables: one will be
> shaded and
> the other will be contoured.
>
> I can plot both variables separately using gsn_csm_contour_map ,
> but when I
> try to plot them together using gsn_csm_contour_map_overlay it
> gives me an
> error saying that my data is 1d when it should be 2d.
>
> The resources for both are set the same way:
> res1@sfXArray = lon(:)
> res1@sfYArray = lat(:)
> res1@trGridType = "TriangularMesh"
> res1@tfDoNDCOverlay = False
>
> Is there a resource I need to turn off, in the same manner as when you
> overlay 2 gridded datasets, only the first variable has the map
> resource
> information and the second does not?
>
> Thanks for any help.
> jimmyc
>
>
> James Correia Jr., PhD
> Climate Physics Group
> Post. Doc.
> Pacific Northwest National Lab
>
> "Wisdom. Strength. Courage. Generosity. Each of us are born with
> one of
> these. It is up to us to find the other three inside of us."
> -Into the West
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 1 08:18:35 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 01 2010 - 08:49:37 MST