;---------------------------------------------------------------------- ; This plots all three data files using the WRF projections defined ; on each file. ;---------------------------------------------------------------------- load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin ;---Open all three files files = "kdh_geo_em.d0" + (/1,2,3/) + ".nc" a1 = addfile(files(0),"r") a2 = addfile(files(1),"r") a3 = addfile(files(2),"r") ;---Read variables off file into local arrays. ter1 = a1->HGT_M(0,:,:) ter2 = a2->HGT_M(0,:,:) ter3 = a3->HGT_M(0,:,:) printMinMax(ter1,0) printMinMax(ter2,0) printMinMax(ter3,0) ;---------------------------------------------------------------------- ; Start the graphics ;---------------------------------------------------------------------- type = "png" wks = gsn_open_wks(type,"panel_plot_geo_domains_gsn_native") plot = new(3,graphic) ;---Set common resources for all three plots res = True ; Create some plot resources res@gsnDraw = False ; Will draw plots later in panel res@gsnFrame = False res@cnFillOn = True ; Create a color fill plot res@cnFillPalette = "rainbow" ; Associate color map with contours res@cnLinesOn = False res@cnLineLabelsOn = False res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 0. res@cnMaxLevelValF = 3500. res@cnLevelSpacingF = 250. res@lbLabelBarOn = False ; Will draw later in panel res@gsnAddCyclic = False res@mpOutlineBoundarySets = "AllBoundaries" ; gives us more boundaries (for debuggig purposes) res@tfDoNDCOverlay = True ;---Plot data over a projection defined on each file res1 = res res2 = res res3 = res res1 = wrf_map_resources(a1,res1) res2 = wrf_map_resources(a2,res2) res3 = wrf_map_resources(a3,res3) res1@tiMainString = files(0) res1@mpGeophysicalLineColor = "Black" ; Overwrite basic map settings res1@mpGridLineColor = "Gray" res1@mpLimbLineColor = "Gray" res1@mpNationalLineColor = "Black" res1@mpPerimLineColor = "Black" res1@mpUSStateLineColor = "Black" res2@tiMainString = files(1) res2@mpGeophysicalLineColor = "Black" ; Overwrite basic map settings res2@mpGridLineColor = "Gray" res2@mpLimbLineColor = "Gray" res2@mpNationalLineColor = "Black" res2@mpPerimLineColor = "Black" res2@mpUSStateLineColor = "Black" res3@tiMainString = files(2) res3@mpGeophysicalLineColor = "Black" ; Overwrite basic map settings res3@mpGridLineColor = "Gray" res3@mpLimbLineColor = "Gray" res3@mpNationalLineColor = "Black" res3@mpPerimLineColor = "Black" res3@mpUSStateLineColor = "Black" plot(0) = gsn_csm_contour_map(wks,ter1,res1) plot(1) = gsn_csm_contour_map(wks,ter2,res2) plot(2) = gsn_csm_contour_map(wks,ter3,res3) ;---Set panel resources pnlres = True pnlres@gsnMaximize = True pnlres@gsnPanelYWhiteSpacePercent = 5 ; Add white space b/w plots. pnlres@gsnPanelLabelBar = True ; Turn on common labelbar pnlres@lbBoxMinorExtentF = 0.15 pnlres@txString = "Using native WRF projections from each file" pnlres@gsnPanelRowSpec = True gsn_panel(wks,plot,(/2,1/),pnlres) end