load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin f = addfile ("wrfout_d01_2003-07-15_00:00:00.nc", "r") p = f->P(0,:,:,:) ; Read pressure, preserve metadata p = p*0.01 ; Convert to hPA p@units = "hPa" ; Update units attribute wks = gsn_open_wks("ps" ,"panel1e") ; Open PS file "panel1e.ps" gsn_define_colormap(wks,"BlAqGrYeOrReVi200") res = True ; Plot options desired res@gsnDraw = False ; Don't draw plots res@gsnFrame = False ; Don't advance frames res@cnFillOn = True ; Turn on color res@cnLineLabelsOn = False ; Turn off line labels res@cnInfoLabelOn = False ; Turn off info label res@lbLabelBarOn = False ; Turn off individual labelbars. res@cnLevelSelectionMode = "ManualLevels" ; Set contour levels res@cnMinLevelValF = -10 ; the same for each plot. res@cnMaxLevelValF = 20 res@cnLevelSpacingF = 2 ; ; Loop across four levels and create a contour plot for each one. ; Change the main title each time. ; plots = new(4,graphic) do i=0,3 plots(i) = gsn_csm_contour(wks,p(i,:,:),res) end do ;---Create a panel of plots with 2 rows and 2 columns. pres = True ; Set panel resources. pres@gsnPanelLabelBar = True ; Turn on panel labelbar. pres@pmLabelBarWidthF = 0.6 ; Change labelbar width. pres@txString = "Bottom-top indexes 0-3" ; Set main title. gsn_panel(wks,plots,(/2,2/),pres) end