;************************************************ ; era40_1.ncl ; ; Concepts illustrated: ; - Reading GRIB data ; - Plotting ERA40 data ; - Spanning the full color map for contour fill ; - Drawing color-filled contours over a cylindrical equidistant map ; - Selecting a different color map ; ;************************************************* load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; create pointer to file and read in data ;************************************************ in = addfile("alex.grib.grib","r") ;************************************************ ; create default plot ;************************************************ wks = gsn_open_wks("x11","27_00") ; open a ps file ; gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap gsn_define_colormap(wks,"BlueYellowRed") res = True res2 = True ;TICKMARK RESOURCES (ON/OFF - FONT SIZE) res@pmTickMarkDisplayMode = "Always" res@tmXTOn = False res@tmXBOn = True res@tmYLOn = False res@tmYROn = False res@tmXTLabelFontHeightF = 0.025 res@tmXBLabelFontHeightF = 0.025 res@tmYLLabelFontHeightF = 0.025 res@tmYRLabelFontHeightF = 0.025 res2@tmXTOn = False res2@tmXBOn = False res2@tmYLOn = False res2@tmYROn = False ; MAP RESOURCES. res@mpGridAndLimbOn = True res@mpGridLineDashPattern = 2 res@mpGeophysicalLineColor = "Black" res@mpGeophysicalLineThicknessF = 1.5 res@mpNationalLineColor = "Black" res@mpNationalLineThicknessF = 1.5 res@mpUSStateLineColor = "Black" res@mpUSStateLineThicknessF = 1.5 res@mpPerimLineColor = "Black" ;LABEL BAR RESOURCES res@lbLabelAutoStride = True res@lbOrientation = "Vertical" res@lbLabelFontHeightF = 0.025 ;CONTOUR RESOURCES res@cnFillOn = True res@cnLinesOn = False res@cnLineLabelsOn = False res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 30. res@cnMaxLevelValF = -50. res@cnLevelSpacingF = 5. res2@cnFillOn = False res2@cnLinesOn = True res2@cnLineLabelsOn = True res2@cnLevelSelectionMode = "ManualLevels" res2@cnMinLevelValF = 940. res2@cnMaxLevelValF = 1044. res2@cnLevelSpacingF = 4. res2@cnLineThicknessF = 1. res2@cnInfoLabelOn = True res2@cnInfoLabelOn = False res2@cnHighLabelsOn = True res2@cnLowLabelsOn = True res2@cnLowLabelBackgroundColor=-1 res2@cnHighLabelFontHeightF = 0.02 res2@cnLowLabelFontHeightF =0.04 ;GSN RESOURCES res@gsnSpreadColors = True res@gsnLeftString = " " res@gsnRightString = " " res@gsnDraw = False res@gsnFrame = False res@gsnMaximize = True res2@gsnDraw = False res2@gsnFrame = False ; res2@gsnMaximize = True res2@gsnLeftString = " " ;TITLE RESOURCES res@tiMainOn = False res@tiMainPosition = "Center" res@tiMainFontHeightF = 0.025 ;PROJECTION RESOURCES res@tfDoNDCOverlay = False res@gsnAddCyclic = False res@mpProjection = "Stereographic" res@mpLimitMode = "Corners" res@mpLeftCornerLatF = 65.2 res@mpLeftCornerLonF = 132.8014 res@mpRightCornerLatF = 63.8 res@mpRightCornerLonF = -45.0 res@mpCenterLatF = 90 res@mpCenterLonF = -180 res2@tfDoNDCOverlay = False res2@gsnAddCyclic = False res2@mpProjection = "Stereographic" res2@mpLimitMode = "Corners" res2@mpLeftCornerLatF = 65.2 res2@mpLeftCornerLonF = 132.8014 res2@mpRightCornerLatF = 63.8 res2@mpRightCornerLonF = -45.0 res2@mpCenterLatF = 90 res2@mpCenterLonF = -180 pres = in->MSL_GDS0_SFC(72,:,:) var2 = pres var2 = (/ pres/100 /) var = in->2T_GDS0_SFC(72,:,:) var = var-273 plot = gsn_csm_contour_map(wks,var,res) plot2 = gsn_csm_contour(wks,var2,res2) overlay(plot,plot2) draw(plot) frame(wks) end