<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi Karin<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks very much - it works!<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Cheers,<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div>
<br><div class="gmail_quote">On 24 April 2018 at 12:11, Karin Meier-Fleischer <span dir="ltr"><<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi Tabish,<br>
    <br>
    gsn_panel draw the panel and advance the frame per default. You have
    to add<br>
    <br>
      resP@gsnFrame = False<br>
    <br>
    to the panel resources.<br>
    <br>
    -Karin<br>
    <br>
    <div class="m_3148565016032426220moz-cite-prefix">Am 24.04.18 um 00:50 schrieb Tabish
      Ansari:<br>
    </div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi<br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I'm trying to add some text below the common
          labelbar of my panelplot as suggested in: <a href="https://www.ncl.ucar.edu/Applications/Scripts/panel_4.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/panel_4.<wbr>ncl</a><br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">However, it is being printed on a new empty
          frame.<br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Here's my script:<br>
          <br>
          <font size="1"><i>load
              "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>
              load
              "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/wrf/WRFUserARW.ncl"<wbr>  ;
              Add special wrf functions<br>
              <br>
              begin<br>
              <br>
              a = addfile("/home/tabish/WPS_<wbr>Nishadh/<a href="http://geo_em.d01_3km.nc" target="_blank">geo_em.d01_3km.nc</a>","r"<wbr>)  
              ; Open a file<br>
              b = addfile("/home/tabish/WPS/<a href="http://geo_em.d03.nc" target="_blank">geo_<wbr>em.d03.nc</a>","r")  
              ; Open a file<br>
              c = addfile("/home/tabish/WPS_<wbr>Nishadh/<a href="http://geo_em.d04_1km.nc" target="_blank">geo_em.d04_1km.nc</a>","r"<wbr>)  
              ; Open a file<br>
              z1 =
              asciiread("/data1/tabish/<wbr>nclscripts/metstations_D01",-<wbr>1,"string")<br>
              z2 =
asciiread("/data1/tabish/<wbr>nclscripts/surfacedata_12-31_<wbr>Octmean_improved.txt",-1,"<wbr>string")<br>
              LATmet    = stringtofloat(str_get_cols(z1, 36,42))<br>
              LONmet    = stringtofloat(str_get_cols(z1, 45,52))<br>
              print (LATmet +" "+LONmet)<br>
              <br>
              LATpol    = stringtofloat(str_get_cols(z2, 45,50))<br>
              LONpol    = stringtofloat(str_get_cols(z2, 27,33))<br>
              print("LAT/LON for polstations")<br>
              print (LATpol +" "+LONpol)<br>
              <br>
                type = "x11"<br>
                wks =
              gsn_open_wks(type,"ter_d01_<wbr>met-pol_stations")       ;
              Create a plot workstation<br>
                setvalues NhlGetWorkspaceObjectId()<br>
                  "wsMaximumSize" : 300000000<br>
                end setvalues<br>
                gsn_define_colormap(wks,"<wbr>OceanLakeLandSnow")<br>
              <br>
                opts = True                          <wbr>      ; Set some
              Basic Plot options<br>
                opts@MainTitle = "GEOGRID FIELDS"<br>
                opts@NoHeaderFooter = True<br>
                ter_d01 = a->HGT_M(0,:,:)               <wbr>       ; Read
              the variable to memory<br>
                ter_d03 = b->HGT_M(0,:,:)               <wbr>       ; Read
              the variable to memory<br>
                ter_d04 = c->HGT_M(0,:,:)               <wbr>       ; Read
              the variable to memory<br>
                ter_d01@description = ""<br>
                ter_d01@units = ""<br>
                ter_d03@description = ""<br>
                ter_d03@units = ""<br>
                ter_d04@description = ""<br>
                ter_d04@units = ""<br>
                res = opts                          <wbr>       ; Use basic
              options for this field<br>
                res@cnFillOn = True                        ; Create a
              color fill plot<br>
                res@cnFillMode       = "RasterFill"        ; Raster Mode<br>
                res@lbLabelBarOn        = False           ; turn off
              individual cb's<br>
                res@gsnDraw             = False           ; don't draw<br>
                res@gsnFrame            = False           ; don't
              advance frame<br>
              <br>
              res@cnLevelSelectionMode = "ExplicitLevels"   ; set
              explicit contour levels<br>
              res@cnLevels    = (/
1,5,10,50,100,150,200,250,300,<wbr>400,500,700,1000,1200,1500,<wbr>1800,2500,3000,4000/)<br>
              contour_d01 = wrf_contour(a,wks,ter_d01,res)<br>
              contour_d03 = wrf_contour(b,wks,ter_d03,res)<br>
              res@cnFillMode       = "AreaFill"        ; Raster Mode
              switched off the d04<br>
              contour_d04 = wrf_contour(c,wks,ter_d04,res)<br>
              <br>
                pltres = True                          <wbr>    ; Set plot
              options<br>
                mpres = True                          <wbr>     ; Set map
              options<br>
              mpres@mpDataBaseVersion = "MediumRes"<br>
              mpres@mpDataSetName = "Earth..4"<br>
              mpres@mpGeophysicalLineColor = "Black"<br>
              mpres@mpGridLineColor = "Black"<br>
              mpres@mpLimbLineColor = "Black"<br>
              mpres@mpNationalLineColor = "Black"<br>
              mpres@mpPerimLineColor = "Black"<br>
              mpres@mpUSStateLineColor = "Black"<br>
              mpres@mpOutlineBoundarySets = "AllBoundaries"<br>
              mpres@mpNationalLineThicknessF = 1.5<br>
              mpres@<wbr>mpProvincialLineThicknessF = 1.5<br>
              mpres@<wbr>mpGeophysicalLineThicknessF = 1.5<br>
              <br>
              pltres@PanelPlot = True      ; Indicate these plots are to
              be paneled.<br>
              pltres@NoHeaderFooter = True<br>
              pltres@FramePlot = False  ; do not frame plot - will do
              this manually later<br>
              <br>
              plot = new(3,graphic)                <wbr>          ; create a
              plot array<br>
              plot(0) =
              wrf_map_overlays(a,wks,(/<wbr>contour_d01/),pltres,mpres)  ;
              Plot the data over a map background<br>
              plot(1) =
              wrf_map_overlays(b,wks,(/<wbr>contour_d03/),pltres,False)  ;
              Plot the data over a map background<br>
              plot(2) =
              wrf_map_overlays(c,wks,(/<wbr>contour_d04/),pltres,False)  ;
              Plot the data over a map background<br>
              <br>
              ;---Attach some dummy text strings<br>
                txres               = True<br>
                txres@txFontHeightF = 0.017<br>
                txres@txJust        = "TopCenter"<br>
              <br>
                gres2                 = True<br>
                gres2@gsFillColor     = "deepskyblue"<br>
                gres2@gsFillOpacityF  = 0.7<br>
                lat2 = (/35.04059,  45.21748, 44.41343, 34.32753,
              35.04059/)<br>
                lon2 = (/109.437, 109.3554, 124.9451,  123.0779,
              109.437/)<br>
                tabish1 = gsn_add_polygon(wks,plot(0),<wbr>lon2,lat2,gres2)<br>
              <br>
              <br>
                gres3                 = True<br>
                gres3@gsFillColor     = "pink"<br>
                gres3@gsFillOpacityF  = 0.7<br>
                lat3 = (/36.05806,  42.79478, 42.4514, 35.7411,
              36.05806/)<br>
                lon3 = (/113.3356, 113.6442, 120.2533,  119.3942,
              113.3356/)<br>
                tabish2 = gsn_add_polygon(wks,plot(0),<wbr>lon3,lat3,gres3)<br>
              <br>
                pmres1 = True<br>
                pmres1@gsMarkerColor = "Blue"<br>
                pmres1@gsMarkerIndex = 16<br>
                pmres1@gsMarkerSizeF = 0.002<br>
              <br>
                pmres2 = True<br>
                pmres2@gsMarkerColor = "Red"<br>
                pmres2@gsMarkerIndex = 16<br>
                pmres2@gsMarkerSizeF = 0.002<br>
              ;STARTING TO MARK MET AND POL STATIONS<br>
              tabish3 =
              gsn_add_polymarker(wks,plot(0)<wbr>,LONmet,LATmet,pmres1)<br>
              tabish4 =
              gsn_add_polymarker(wks,plot(0)<wbr>,LONpol,LATpol,pmres2)<br>
              <br>
              pmres1@gsMarkerSizeF = 0.003<br>
              pmres2@gsMarkerSizeF = 0.003<br>
              tabish5 =
              gsn_add_polymarker(wks,plot(1)<wbr>,LONmet,LATmet,pmres1)<br>
              tabish6 =
              gsn_add_polymarker(wks,plot(1)<wbr>,LONpol,LATpol,pmres2)<br>
              <br>
              pmres1@gsMarkerSizeF = 0.006<br>
              pmres2@gsMarkerSizeF = 0.006<br>
              tabish7 =
              gsn_add_polymarker(wks,plot(2)<wbr>,LONmet,LATmet,pmres1)<br>
              tabish8 =
              gsn_add_polymarker(wks,plot(2)<wbr>,LONpol,LATpol,pmres2)<br>
              pmres2@gsMarkerColor = "Black"<br>
              tabish9 =
              gsn_add_polymarker(wks,plot(2)<wbr>,116.37,39.97,pmres2)<br>
              <br>
              china_shp_name    =
              "/data1/tabish/Shapefiles/<wbr>China/CHN_adm1.shp"<br>
              lnres                  = True<br>
              lnres@gsLineColor      = "black"<br>
              lnres@gsLineThicknessF = 1<br>
              ;china_id1 =
              gsn_add_shapefile_polylines(<wbr>wks,plot(0),china_shp_name,<wbr>lnres)<br>
              china_id3 =
              gsn_add_shapefile_polylines(<wbr>wks,plot(1),china_shp_name,<wbr>lnres)<br>
              china_id4 =
              gsn_add_shapefile_polylines(<wbr>wks,plot(2),china_shp_name,<wbr>lnres)<br>
              <br>
              ;*****************************<wbr>*******************<br>
              ; create panel<br>
              ;*****************************<wbr>*******************<br>
                resP                     = True                ; modify
              the panel plot<br>
                resP@gsnPanelMainString  = "Model domain: topography,
              meteorological and pollutant stations"<br>
                resP@gsnPanelLabelBar    = True               ; This
              gives an error!!!<br>
                resP@lbLabelFontHeightF  = 0.007               ; make
              labels smaller<br>
                resP@gsnPanelRowSpec     = True                   ; tell
              panel what order to plot<br>
                resP@gsnPanelCenter      = False<br>
                resP@gsnPanelBottom = 0.07<br>
              ;  resP@FramePlot = False  ; do not frame plot - will do
              this manually later<br>
                gsn_panel(wks,(/plot/),(/2,1/)<wbr>,resP)               ; now
              draw as one plot<br>
              <br>
              <br>
              ; Draw a text string at the bottom<br>
                txres               = True<br>
                txres@txFontHeightF = 0.015<br>
                txres@FramePlot = False  ; do not frame plot - will do
              this manually later<br>
                gsn_text_ndc(wks,"Topography height (m)",0.5,0.02,txres)<br>
                frame(wks)<br>
              end</i></font><br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Please help me resolve this issue.<br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks very much,<br>
          <br>
        </div>
        <div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br>
          <br clear="all">
        </div>
        <div>
          <div class="m_3148565016032426220gmail_signature">
            <div dir="ltr">
              <div>
                <div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U
                      Ansari<br>
                    </span></font></div>
                <font size="1"><span style="font-family:tahoma,sans-serif">PhD student,
                    Lancaster Environment Center<br>
                  </span></font></div>
              <font size="1"><span style="font-family:tahoma,sans-serif">Lancaster
                  Univeristy<br>
                  <span>Bailrigg</span>, <span>Lancaster</span>, <br>
                  <span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_3148565016032426220mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
ncl-talk mailing list
<a class="m_3148565016032426220moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="m_3148565016032426220moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
  </div>

<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>