Re: streamlines do not show up from gsn_csm_pres_hgt_streamline

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 02 2011 - 11:56:40 MDT

Xiaoming,

There's a bug in gsn_csm_pres_hgt_streamline in which if the pressure
units are "Pa", the streamlines won't show up.

Internally, the code is converting the contour pressure values to
units "mb",
but it wasn't doing the same for the streamline u,v values.

To fix this problem, you can convert the pressure coordinate values
yourself before
you do any plotting:

    pres_coor = pres_coor*0.01
    pres_coor@units = "mb"

--Mary

On Nov 2, 2011, at 9:42 AM, xiaoming Hu wrote:

> Dear Mary
>
> Thank you so much for your quick reply.
> I think streamlines are in the same data space as the contours.
> I added coordinate array for my va and wa. But still doesn't work
> See the coordinate information for the three vars:
> Variable: T (subsection)
> Type: float
> Total Size: 53580 bytes
> 13395 values
> Number of Dimensions: 2
> Dimensions and sizes: [bottom_top | 47] x [south_north | 285]
> Coordinates:
> bottom_top: [97471.08..10436.99]
> south_north: [34.8718..36.1482]
> Number Of Attributes: 6
> coordinates : XLONG XLAT
> stagger :
> units : K
> description : perturbation potential temperature (theta-t0)
> MemoryOrder : XYZ
> FieldType : 104
>
>
> Variable: va (subsection)
> Type: float
> Total Size: 53580 bytes
> 13395 values
> Number of Dimensions: 2
> Dimensions and sizes: [bottom_top | 47] x [south_north | 285]
> Coordinates:
> bottom_top: [97471.08..10436.99]
> south_north: [34.8718..36.1482]
> Number Of Attributes: 6
> coordinates : XLONG XLAT
> stagger :
> units : m s-1
> description : y-wind component
> MemoryOrder : XYZ
> FieldType : 104
>
>
> Variable: wa (subsection)
> Type: float
> Total Size: 53580 bytes
> 13395 values
> Number of Dimensions: 2
> Dimensions and sizes: [bottom_top | 47] x [south_north | 285]
> Coordinates:
> bottom_top: [97471.08..10436.99]
> south_north: [34.8718..36.1482]
> Number Of Attributes: 6
> coordinates : XLONG XLAT
> stagger :
> units : m s-1
> description : z-wind component
> MemoryOrder : XYZ
> FieldType : 104
>
> My script, plot and my wrfout file are at
> http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/wrffnl5dWSM6_noUCM.2003072400/wrfout_d05_2003-07-24_00:00:00
> http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/wrffnl5dWSM6_noUCM.2003072400/wrfout_d05_T_crossSNstremline_0.png
> http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/wrffnl5dWSM6_noUCM.2003072400/plot_stream.ncl
>
> Any idea how to fix it?
>
> Thanks a lot
> Xiaoming
>
>
> CC: ncl-talk@ucar.edu
> From: haley@ucar.edu
> To: yuanfangcan@hotmail.com
> Subject: Re: streamlines do not show up from
> gsn_csm_pres_hgt_streamline
> Date: Wed, 2 Nov 2011 09:03:39 -0600
>
> Dear Xiaoming,
>
> Are the streamlines in the same data space as the contours? If not,
> then the overlay will not work.
>
> Since you are not providing any coordinate information via the
> sfXArray/sfYArray/vfXArray/vfYArray,
> then you must have coordinate array information attached to the
> variables that you're plotting.
>
> Please look at your variables with "printVarSummary" to see if
> there's any coordinate information:
>
> printVarSummary(wa)
> printVarSummary(va)
>
> I noticed that attached a coordinate array to one of the dimensions
> of T:
>
> T&bottom_top = pres_coor
>
> I believe you need to do something similar for "va" and "wa".
>
> Also note that it looks like you only added a coordinate array for
> the Y axis.
> The x axis doesn't have anything, and that's why the X axis values are
> going from 0 to nx-1.
>
> --Mary
>
> On Nov 2, 2011, at 8:36 AM, xiaoming Hu wrote:
>
> Hello
>
> I would like to draw streamlines for a south-north cross-section for
> WRF output using gsn_csm_pres_hgt_streamline.
> The contours show up but the streamlines do not show.
> Please see the attached script and figure.
>
> Any idea what happened?
>
> Thanks a lot
>
> Xiaoming
>
> <plot_stream.ncl><wrfout_d05_T_crossSNstremline_0.png>
> _______________________________________________
> 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 Wed Nov 2 11:56:52 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 08:43:41 MDT