;************************************************ ; native_3.ncl ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin f = addfile("ST4.2002030112.06h.grb","r") prc = f->A_PCP_GDS5_SFC_acc6h lat2d = f->g5_lat_0 ; (g5_x_0, g5_y_1) lon2d = f->g5_lon_1 ; (g5_x_0, g5_y_1) ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps","native") ; open wk station ; create colormap using named colors colors = (/"white","black","white","green","palegreen","yellowgreen",\ "greenyellow", "yellow","goldenrod","orange","orangered","red","deeppinK",\ "violet","darkviolet","blueviolet","blue"/) gsn_define_colormap(wks, colors) ; plot resources res = True ; plot mods desired res@tiMainString = "native sterographic from GRIB" res@gsnAddCyclic = False ; regional data res@tfDoNDCOverlay = True ; no map transformation ;************************************************ ; stereographic projections are limited using the corners method rather than ; the latlon method seen for cylindrical equadistant projections this grib \ ; file contains attributes that provide the necessary info. ;************************************************ res@mpProjection = "Stereographic" res@mpLimitMode = "Corners" res@mpLeftCornerLatF = lat2d@corners(0) ; info on GRIB file res@mpLeftCornerLonF = lon2d@corners(0) res@mpRightCornerLatF = lat2d@corners(2) res@mpRightCornerLonF = lon2d@corners(2) res@mpCenterLonF = lat2d@Lov res@mpCenterLatF = 90. ; ProjCenter: north res@mpPerimOn = False res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state boundaries res@mpFillOn = False ; no map fill res@cnFillOn = True ; color plot desired res@cnLinesOn = False ; turn off cn lines res@cnFillMode = "RasterFill" ; raster res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels res@cnLevels = (/0,5,10,15,20,25,30,35,50,75,100,125,150,175/) plot = gsn_csm_contour_map(wks,prc,res) ; create the plot end