Vector plots using ECMWF analysis: Black screen

From: Christopher Steele <christopher.steele_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 13 2010 - 05:55:13 MDT

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
Received on Mon Sep 13 04:55:20 2010

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