;************************************************* ; ice_2.ncl ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ;************************************************ begin ;************************************************ ; read in netCDF file ;************************************************ a = addfile("ice001608.nc","r") ;************************************************ ; read in components ;************************************************ u = a->uiceh(0,:,:) v = a->uiceh(0,:,:) ;************************************************ ; this data only has an missing_value, so we are ; copying this to _FillValue for plotting purposes ;************************************************ assignFillValue(v,u) ; in contributed assignFillValue(u,v) ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"ice") ; open a ps file gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; choose colormap i = NhlNewColor(wks,0.7,0.7,0.7) ; add gray to colormap res = True ; plot mods desired res@gsnPolarNH = True ; specify the hemisphere res@mpMinLatF = 75 ; minimum lat to plot res@vcRefMagnitudeF = 5.0 ; vec magnitude res@vcRefLengthF = 0.04 ; size of ref vector res@vcMonoLineArrowColor = False ; vectors color by magnitude res@vcMinDistanceF = 0.02 ; thins arrows near pole res@vcGlyphStyle = "CurlyVector" ; curley vectors on res@gsnSpreadColors = True ; use full colormap res@gsnSpreadColorStart = 20 ; color to start res@gsnSpreadColorEnd = 193 ; color to end ; because this is ice data, which has a gap in the tropics, we need to ; explicitly pass the range of the data to plot. Since we are coloring ; the vectors, this range should also match the MinLatF above, since the ; range for the colors is chosen over the full data passed, and not the ; map limits. plot = gsn_csm_vector_map_polar(wks,u({75.:90.},:),v({75.:90.},:),res) end