Re: problem with 2D vertical coordinates plot

From: David Ian Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed, 16 May 2007 11:30:02 -0600

Hi Franco,

I don't think you need to use TriangularMesh to plot your vector field
with 2D vertical coordinates.

If you have 2 coordinate arrays with one giving the X axis coordinates
and the other the Y axis
coordinates, you can set the special lat2d and lon2d attributes for
your U and V variables before
calling gsn_csm_vector. You can ignore the fact that in this case your
coordinates do not represent
lats and lons.

So you would say, for example

U_at_lat2d = y2d_coords
U_at_lon2d = x2d_coords
V_at_lat2d = y2d_coords
V_at_lon2d = x2d_coords

gsn_csm_vector(wks,U,V,res)

Note that since it is likely that your X and Y coordinates have
different units and the ranges of each
axis are dissimilar, you will probably want to set the Vector resource
vcMapDirection False.
See
http://www.ncl.ucar.edu/Document/Graphics/Resources/
vc.shtml#vcMapDirection

If you have problems with this, let us know.
  -dave

On May 15, 2007, at 3:14 AM, franco.catalano_at_uniroma1.it wrote:

> Since gsn_csm_vector currently does not work with 2D vertical
> coordinates,
>
> could you please tell me an alternative way to plot vertical slices of
> a vector field
>
> from a stretched domain with topography?
>
> Thanks,
>
> Franco
>
>  
> David Ian Brown <dbrown_at_ucar.edu>
> 09/05/2007 10:18 CST
>
> Per   Mary Haley <haley_at_ucar.edu>
> CC  franco.catalano_at_uniroma1.it
> CCR  
> Oggetto  Re: Rif: Re: Rif: Re: [ncl-talk] problem with 2D vertical
> coordinates plot
>  
>
>
> Yes, I suppose there should be an error message when trGridType is set
> to TriangularMesh
> for vector plots.  But as Mary says,  later on this year it will work
> to set TriangularMesh for
> these plots. I will fix this when I have a chance.
> -dave
>
>
> On May 9, 2007, at 7:42 AM, Mary Haley wrote:
>
> >
> > Franco,
> >
> > I think the problem is that you are setting trGridType to
> > TriangularMesh, which is not an option for vector plots. This is only
> > available for contour plots, and will probably be added to vector
> > plots later this year.
> >
> > It seems NCL should have given you an error message about this,
> > however.  I'm CC-ing Dave Brown in case this is something that
> > needs to be remedied.
> >
> > --Mary
> >
> >
> >
> > On Wed, 9 May 2007 franco.catalano_at_uniroma1.it wrote:
> >
> >> The dimensions of my 2-dimensional arrays vx and vy are the same and
> >> equal to the those of my vector field.
> >> I have no troubles with scalar fields plotted with gsn_csm_contour,
> >> so I
> >> suppose the problem is with gsm_csm_vector.
> >> Here is my ncl script attached.
> >> Thanks,
> >> Franco
> >> Mary Haley <haley_at_ucar.edu>
> >> 07/05/2007 08:19 CST
> >> Per   franco.catalano_at_uniroma1.it
> >> CC CCR Oggetto  Re: Rif: Re: [ncl-talk] problem with 2D vertical
> >> coordinates
> >> plot
> >> Franco,
> >> I'm not sure what the question is. If you want to generate a vector
> >> plot,
> >> you need two 2-dimensional arrays of the same size, which you then
> >> pass
> >> to gsn_csm_vector. There are several vector examples on the page:
> >>    http://www.ncl.ucar.edu/Applications/vector.shtml
> >> --Mary
> >> On May 7, 2007, at 7:39 AM, franco.catalano_at_uniroma1.it wrote:
> >> I have seen those links before sending the message. I think it is
> not
> >> a
> >> problem with wrf dataset.
> >> I just want to plot a vector field with 2D vertical coordinates.
> Could
> >> you please send me an
> >> example script? I am using gsn_csm_vector.
> >> Thank you for your kindness,
> >> Franco
> >> Mary Haley <haley_at_ucar.edu>
> >> 04/05/2007 10:01 CST
> >> Per  franco.catalano_at_uniroma1.it
> >> CC ncl-talk_at_ucar.edu
> >> CCR
> >> Oggetto Re: [ncl-talk] problem with 2D vertical coordinates plot
> >> Hi Franco,
> >> Please see the WRF graphical page, which contains several examples.
> >> The
> >> main page is:
> >>     http://www.ncl.ucar.edu/Applications/wrf.shtml
> >> which contains links to several other pages, one or two of which
> >> contain
> >> vector plots.
> >> You may also want to consider contacting WRF support itself, at
> >> wrfhelp_at_ucar.edu. They have a large post-processing graphics package
> >> created specifically for WRF. You can see their page at:
> >>     http://www.mmm.ucar.edu/wrf/users/graphics/WRF_NCL/NCL.htm
> >> --Mary
> >> On May 3, 2007, at 10:02 AM, franco.catalano_at_uniroma1.it wrote:
> >> I can not manage to plot a vector field (i.e. vertical
> >> slice of wind) in 2D vertical coordinates (height Z
> >> and (virtual) 2D horizontal distance X). I have succesfully
> >> plotted a scalar field like temperature referring to the
> >> examples on http://www.ncl.ucar.edu/Applications/2Dvertcoord.shtml.
> >> I am working with WRF netCDF files.
> >> Thanks,
> >> Franco
> >> ____________________________________________________
> >> Eng. Franco Catalano
> >> Ph.D. Student
> >> D.I.T.S.
> >> Department of Hydraulics, Transportation and Roads.
> >> Via Eudossiana 18, 00184 Rome
> >> University of Rome "La Sapienza".
> >> tel: +390644585218
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk_at_ucar.edu
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 16 2007 - 11:30:02 MDT

This archive was generated by hypermail 2.2.0 : Thu May 17 2007 - 11:10:44 MDT