;---------------------------------------------------------------------- ; Read and plots GRIB1 data using PyNIO/PyNGL. ; ; Curvilinear grid, 113 x 151 ;---------------------------------------------------------------------- ;---Read data dir = "../Data/" filename = "ruc.grb" a = addfile(dir + filename,"r") u = a->U_GRD_236_MWSL v = a->V_GRD_236_MWSL lat = a->gridlat_236 lon = a->gridlon_236 printVarSummary(u) printVarSummary(lat) wks = gsn_open_wks("png","grib1_plot_uv_ncl") ; Set some plot options res = True ; Vector options res@vcGlyphStyle = "CurlyVector" res@vcLineArrowThicknessF = 2.0 ; default is 1 res@vcRefLengthF = 0.03 res@vcMinDistanceF = 0.01 res@vcRefMagnitudeF = 40 ; Control look of the vector reference annotation res@vcRefAnnoArrowUseVecColor = False res@vcRefAnnoOrthogonalPosF = -0.27 ; Color the vectors with the default color map res@vcMonoLineArrowColor = False ; Map options res@mpLimitMode = "LatLon" res@mpMinLatF = min(lat)-1 res@mpMaxLatF = max(lat)+1 res@mpMinLonF = min(lon)-1 res@mpMaxLonF = max(lon)+1 res@mpDataBaseVersion = "MediumRes" ; Main Title res@tiMainString = filename ; Labelbar res@lbOrientation = "Horizontal" res@lbLabelFontHeightF = 0.01 ; Additional resources needed for putting contours on map res@vfXArray = lon res@vfYArray = lat res@gsnAddCyclic = False plot = gsn_csm_vector_map(wks,u,v,res)