<div dir="ltr"><div><div><div>Hello,<br><br></div>I am new to NCL and I am trying to plot divergent winds (vectors), divergence (contours) and velocity potential (contours) in a single plot using velocities u and v only. <br><br>When i am trying to plot divergent velocities using the following script:<br><br><br>begin<br>;*************************************************<br>; open file and read in data: data are on a gaussian grid<br>;*************************************************<br>  f    = addfile ("<a href="http://uv300.nc">uv300.nc</a>", "r")<br>  u    = f->u                 ; (time,lat,lon)<br>  v    = f->v<br>  d    = f->d<br>;*************************************************<br>; calculate divergence on a gaussian grid<br>;*************************************************<br>  div = uv2dvG_Wrap(u,v)                ; u,v ==> divergence  <br>  div@long_name  = "Divergence"<br>  div@units      = "s-1"<br>;*************************************************<br>; calculate velocity potential<br>;*************************************************<br>  chi = ilapsG_Wrap ( div , 0)<br>  chi = (/chi/1e8/)                     ; arbitrary scale<br>  chi@long_name = "velocity potential"<br>  chi@units     = "m/s" <br>;*************************************************<br>; calculate divergent wind component <br>; --<br>; note: the calculation uses a procedure, so memory <br>; must be preallocated.<br>;*************************************************    <br>  ud    = new ( dimsizes(u), float, u@_FillValue )<br>  vd    = new ( dimsizes(v), float, v@_FillValue )<br><br>  dv2uvg(div,ud,vd) ; div  ==> divergent  wind components<br><br>  copy_VarCoords(u, ud ) <br>  copy_VarCoords(u, vd ) <br>  ud@long_name  = "Zonal Divergent Wind"<br>  ud@units      = u@units<br>  vd@long_name  = "Meridional Divergent Wind"<br>  vd@units      = v@units<br>;*************************************************<br>; plot results<br>;*************************************************    <br>  wks  = gsn_open_wks("png","dv")             ; send graphics to PNG file<br>  cmap = read_colormap_file("BlAqGrYeOrReVi200")<br>  nc   = dimsizes(cmap(:,0))<br><br>    res                          = True<br>    res@gsnDraw                                 = False<br>    res@gsnFrame                             = False<br>    cnres1                                        = res<br>    cnres2                                        = res<br>    vcres                                            = res<br><br>  cnres1@cnFillOn           = True               ; color on<br>  cnres1@cnLinesOn          = False              ; turn off contour lines<br>    cnres1@cnFillPalette      = cmap(:nc-4,:)  <br>    cnres1@tiMainString       = "Divergent Winds, Divergence and Velocity Potential"<br>    cnres1@lbOrientation           = "vertical"<br><br>    vcres@vcRefMagnitudeF     = 10.                 ; make vectors larger<br>  vcres@vcRefLengthF        = 0.05              ; ref vector length<br>  vcres@vcGlyphStyle        = "CurlyVector"      ; turn on curly vectors<br>  vcres@vcMinDistanceF      = 0.012              ; thin the vectors<br>  vcres@vcRefAnnoOrthogonalPosF  = -1.185         ; Move ref anno into plot<br>    vcres@vcRefAnnoBackgroundColor = "Background"<br>    vcres@vcRefAnnoString2On    = False<br>    ;vcres@vcRefAnnoSide                =    "Right" <br><br>  ;cnres2@gsnCenterString    = "Chi scaled by 1e8"<br>    cnres2@cnFillOn                        = False<br>    cnres2@cnLinesOn                    = True<br>    <br>    plot1 = gsn_csm_vector_map(wks,0.001*ud(0,0,:,:),0.001*vd(0,0,:,:),vcres)<br>    ;plot2    = gsn_csm_contour_map_overlay(wks,div(0,0,:,:),chi(0,0,:,:),cnres1,cnres2)<br><br>    ;overlay(plot2,plot1)<br>    <br>    draw(plot1)<br>    frame(wks)<br><br>end<br><br><br>Using this script, i am getting global plot and following error.<br><br>(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br>(0)    A valid latitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>(0)    check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.<br>(0)    A valid longitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br>  <br></div><div><br>But when I am plotting all three together using the above script I am getting no error and a global plot with velocity vectors showing only on certain region. I am attaching both output png files.<br><br></div><div>Please help me to plot all three together in global file. I am expecting humble reply from your side. <br></div><br>Thanking you<br><br></div> Vyankatesh Mundhada<br></div>