Re: overlay two more variables

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 May 2009 09:25:10 -0600 (MDT)

Jin,

You didn't indicate what kind of problem you're having.

FYI: in order to do overlays on a map properly, you need to make sure
the variables you're plotting---gfs_g500, jetstm, gfs_u500,
gfs_v500---all have lat/lon coordinate arrays attached to them.

You can verify this with:

   printVarSummary(gfs_g500)
   printVarSummaruy(jetstm)
   etc.

You should see something like this:

Variable: gfs_g500 (file variable)
Type: float
Total Size: 304128 bytes
             76032 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 33] x [lon | 36]
Coordinates:
             lat: [20..60]
             lon: [-140..-52.5]

Of course, the dimension sizes, type, and actual lat/lon ranges will
be different.

--Mary

On Mon, 11 May 2009, Jin Young Kim wrote:

> Could someone help me diagnose a problem I'm having when overlaying
> wind vector and scalar contours plot? Here's a part of script what I'm
> trying
> to do.
>
> minlat = 0
> maxlat = 60
> minlon = 200
> maxlon = 320
>
> gfs_g500 = smth9(gfs_g500,0.5,-0.25,False)
> jetstm = sqrt(gfs_u200*gfs_u200+gfs_v200*gfs_v200)
>
> ; note that the gsn_csm_*map_ce templates automatically set
> ; res_at_mpLimitMode="LatLon" for you. If you are plotting a different
> projection,
> ; you may have to set this resource.
>
> mres = True
> mres_at_mpLimitMode = "LatLon"
> mres_at_mpMinLatF = minlat ; range to zoom in on
> mres_at_mpMaxLatF = maxlat
> mres_at_mpMinLonF = minlon
> mres_at_mpProjection = "LambertEqualArea"
> mres_at_mpCenterLonF = (mres_at_mpMaxLonF + mres_at_mpMinLonF)/2.
> mres_at_gsnDraw = False
> mres_at_gsnFrame = False
>
> map = gsn_csm_map(wks,mres)
>
> res = True
>
> res_at_gsnFrame = False
> ; res_at_gsnMaximize = True
>
> res_at_cnFillOn = False
> res_at_cnLinesOn = True ; turn off contour lines
> res_at_cnLineLabelsOn = True ; turn off contour line
> labels
> res_at_cnLevelSelectionMode = "ManualLevels"
> res_at_cnLevelSpacingF = 40 ; set contour spacing
> res_at_cnLineThicknessF = 2. ;line thickness
>
> g500 = gsn_csm_contour(wks,gfs_g500,res)
> overlay(map, g500)
>
> cnres= True
> cnres_at_cnFillOn = True
> cnres_at_gsnSpreadColors = True
> cnres_at_cnLinesOn = True
> cnres_at_cnLineLabelsOn = True
> cnres_at_cnLevelSelectionMode = "ManualLevels" ; set manual
> contour levels
> cnres_at_cnMinLevelValF = 25. ; set min contour level
>
> jet200 = gsn_csm_contour(wks,jetstm,cnres)
> overlay(map, jet200)
>
> vcres = True
>
> vcres_at_vcRefMagnitudeF = 10. ; make vectors larger
> vcres_at_vcRefLengthF = 0.025 ; ref vec length
> vcres_at_vcGlyphStyle = "WindBarb"
> vcres_at_vcMinDistanceF = 0.015 ; thin out windbarbs
> vcres_at_vcRefAnnoOn = False ; turn off ref wind
> barb
> vcres_at_vcWindBarbTickLengthF = 0.5 ; length of the
> barb tick
>
> wb500 = gsn_csm_vector(wks,gfs_u500,gfs_v500,vcres)
>
> overlay(map, wb500)
> draw(map)
> frame(wks)
> _______________________________________________
> 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 Tue May 12 2009 - 09:25:10 MDT

This archive was generated by hypermail 2.2.0 : Wed May 13 2009 - 08:40:16 MDT