Re: Vector plots using ECMWF analysis: Black screen

From: Andrew Dawson <andrew.dawson_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 13 2010 - 06:13:19 MDT

Hi Chris,

In your example script you are using 'res' for the resources when you mean
to use 'opts'. I guess that might be a typo in the e-mail rather than the
actual script?

If so you might want to change the value of opts@vcRefLengthF. This resource
controls how long the reference arrow (which represents 5 m/s) in your case
is. A plot window/page is 1 unit in width and height so 5 is extremely large
for this value. If I understand it correctly, what you have implies that
each vector that represents 5 m/s in your plot should be 5 NDC units (ie.
five times the width of the plot window) in length. Perhaps this is the
problem?

Cheers,
Andrew

On 13 September 2010 12:55, Christopher Steele <christopher.steele@uea.ac.uk
> 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
Received on Mon Sep 13 05:13:34 2010

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