Re: Vector plots using ECMWF analysis: Black screen

From: Christopher Steele <christopher.steele_at_nyahnyahspammersnyahnyah>
Date: Tue Sep 14 2010 - 07:23:59 MDT

Thanks,

Using the additional opts resource allows me to add additional resources to
the basic resource list, so I don't have to repeat myself when producing
multiple plots of different types. I did however forget to change
opts@vcRefLengthF back to a more sensible value - I was altering it to see
if it made any difference to the way that the plot looked, and apparently it
didn't. Plotting the N/M-th point however appears to have worked, though the
map does not appear in the background. Having said this, whenever I try to
overlay the two plots, the land masses appear white. while the wind speeds
over the sea remain visible.

I'm not really sure why this is happening

cheers

Chris

On Mon, Sep 13, 2010 at 1:13 PM, Dennis Shea <shea@ucar.edu> wrote:

> See examples at:
>
> http://www.ncl.ucar.edu/Applications/
>
> Click "Vectors"
>
> use the vector resource
>
> res@vcMinDistanceF = 0.017
> plot = gsn_csm_vector_map(wks,u,v,res)
>
>
> or, You could plot every N/M-th point
>
> plot = gsn_csm_vector_map(wks,u(::N,::M),v(::N,::M),res)
>
>
>
> On 9/13/10 5:55 AM, Christopher Steele wrote:
> > Hi
> >
> > I'm attempting to produce a vector plot of a section of data from ECMWF
> > analysis. My script is organised into two sections, the first produces a
> > contour plot of wind speed and the second is the vector plot. The
> > contour plot works fine but unfortunately the vector plot produces
> > almost an entirely black plot. I'm not entirely sure why this is the
> > case. Here is the script:
> >
> >
> > ;script to read and plot ECMWF global analysis
> > ; November 2008
> >
> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> >
> > begin
> >
> > a = addfile("../../../esscratch/ECMWF_wrf_AN_20060602_1200.nc","r")
> >
> > ;read in data
> > u = a->U_GDS0_HYBL(90,:,:)
> > v = a->V_GDS0_HYBL(90,:,:)
> > lat2d = a->g0_lat_2
> > lon2d = a->g0_lon_3
> > wind = (u^2 + v^2)^0.5
> > wind@description = "wind speed"
> > wind@units = "m/s"
> > wind!0 = "lat2d"
> > wind!1 = "lon2d"
> > wind&lat2d = u&g0_lat_2
> > wind&lon2d = u&g0_lon_3
> > printVarSummary(u)
> > printVarSummary(v)
> >
> >
> > wks = gsn_open_wks("x11","ECMWFanalysis")
> > res = True
> > res@mpMinLatF = 30
> > res@mpMaxLatF = 70
> > res@mpMinLonF = -20
> > res@mpMaxLonF = 20
> > res@mpDataBaseVersion = "Highres"
> >
> > ;contour options
> > opts = res
> > opts@cnFillOn = True
> > opts@cnLinesOn = False
> > opts@gsnSpreadColors = True
> > opts@mpLimitMode = "LatLon"
> > opts@cnLevelSelectionMode = "ManualLevels"
> > opts@cnMinLevelValF = -5
> > opts@cnMaxLevelValF = 20
> > opts@cnLevelSpacingF = 0.5
> > opts@lbLabelAutoStride = True
> > plot = gsn_csm_contour_map(wks,wind,opts)
> > delete(opts);vector options
> > opts = res
> > opts@vcRefMagnitudeF = 5.0 ; add a reference
> vector
> > opts@vcRefLengthF = 5 ; what the ref length is
> > ;opts@vcGlyphStyle = "CurlyVector" ; turn on curley
> vectors
> > opts@gsnAddCyclic = False
> >
> >
> > plot = gsn_csm_vector_map(wks,u,v,res)
> >
> > end
> >
> >
> > any help would be very much appreciated
> >
> > cheers
> >
> > Chris
> >
> >
> >
> > _______________________________________________
> > 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
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 14 06:24:20 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:24 MDT