<div dir="ltr"><div>Hi Mary,</div><div><br></div><div>See attached data and script we are using.</div><div>Regards,</div><div><br></div><div>Appo<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-22 22:32 GMT+01:00 Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi James and Appo,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Both of you have created some nice scripts that would be useful for the panel examples page. Would one or both of you be willing to contribute your script (and data file so I can run it) so we can add it to our page?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We do ask for a clean script, which means one that has unsed commented code removed, somewhat consistent indentation, no references to personal directories, etc. I'm happy to help clean it up as well, if there are things that you need help improving.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you are able to contribute the script and data, feel free to do this offline if you don't want to share the data publicly. We don't make the data file available, but I do like to have it so I can make sure the script runs with the latest version of NCL and that we create a nice PNG image from it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">One small tip that might help with the subtitles not quite lining up. If you use "degK" instead of just "K" for gsnRightString, then your titles will line up better because both titles will now have a character ('p' in the left title and 'g' in the right title) that goes below the text base line. If you don't want to repeat this title for every single plot, then I suggest setting this title just once at the top. See script panel_41.ncl for an example on how to do this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/panel.shtml#ex41" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/panel.shtml#ex41</a><br></div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:small">Regards,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, May 22, 2018 at 3:11 AM, Appo derbetini <span dir="ltr"><<a href="mailto:appopson4@gmail.com" target="_blank">appopson4@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi James</div><div>I am on the right now as you can see on the attached plot. <br></div><div><br></div><div>I am also sending script i used.</div><div><br></div><div>Thank you</div><div><br></div><div><br></div><div><br> <br> fname = "<a href="http://tas_2006.nc" target="_blank">tas_2006.nc</a>"<br> f = addfile(fname,"r")<br> t = f->tas(:, {-15:15}, {5:35}) <br> <br> lon = t&lon<br> lat = t&lat<br> <br> <br> <br> pltDir = "./" ; where output will be written<br> pltName= "panel29" <wbr> <br> pltType= "png" ; ps, eps, png, pdf, x11 .....<br><br>;*****************************<wbr>******************************<wbr>*****************<br>; Miscellaneous <br>;*****************************<wbr>******************************<wbr>*****************<br> nrow = 3<br> ncol = 4 <br><br><br> <br>;*****************************<wbr>******************************<wbr>*****************<br>; Graphic resources<br>;*****************************<wbr>******************************<wbr>*****************<br> pltPath = pltDir+pltName<br> wks = gsn_open_wks(pltType ,pltPath) <br><br> res = True ; plot mods desired<br> res@gsnDraw = False<br> res@gsnFrame = False<br><br> res@cnFillOn = True ; turn on color fill<br> res@cnLinesOn = False ; turn of contour lines<br> res@cnLineLabelsOn = False ; turn of contour line labels<br> ;res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels<br><br> res@lbLabelBarOn = False<br> <br> <br><br> res@mpProjection <wbr> = "CylindricalEquidistant" ; projection<br> res@mpLimitMode <wbr> = "Corners" ; method to zoom<br> res@mpLeftCornerLatF <wbr> = min(lat)<br> res@mpLeftCornerLonF <wbr> = min(lon)<br> res@mpRightCornerLatF <wbr> = max(lat) <br> res@mpRightCornerLonF <wbr> = max(lon)<br> res@tfDoNDCOverlay <wbr> = True ; do no<br> res@gsnAddCyclic <wbr> = False ; regional data, don't add pt<br> <br><br> res@tmYLLabelsOn = False ; turn off lat labels<br> res@tmXBLabelsOn = False ; turn off lon labels<br><br> res@mpDataBaseVersion = "MediumRes"<br> res@mpFillOn = True <br> res@mpOutlineOn = True<br> ;res@mpFillColors = (/-1,0,-1,-1/) ; mask out all non-land areas<br> res@mpFillOn <wbr> = False ; turn off gray fill<br><br> res@mpFillDrawOrder = "PostDraw"<br> res@mpProjection = "CylindricalEquidistant"<br> <br> <br> ;Ressource column 1<br> res1 = True<br> res1 = res<br> res1@cnFillPalette = "WhiteYellowOrangeRed"<br> res1@lbOrientation = "Horizontal" ; orientation<br> ;res1@pmLabelBarWidthF = 0.8<br> ;res1@pmLabelBarHeightF = 0.03<br> <br> res1@lbLabelBarOn = False<br> res1@lbBoxEndCapStyle = "TriangleBothEnds"<br> <br> <br> ;Ressource columns 2 & 3<br> res2 = True<br> res2 = res<br> res2@cnFillPalette = "MPL_YlGn"<br> res2@lbOrientation = "Horizontal" ; orientation<br> res2@pmLabelBarWidthF = 1.1<br> ;res2@pmLabelBarOrthogonalPosF<wbr> = -0.02<br> res2@pmLabelBarParallelPosF = -0.02<br><br> res2@lbBoxEndCapStyle = "TriangleBothEnds"<br> <br><br> ;Ressource column 4 <br> res3 = True<br> res3 = res<br> res3@cnFillPalette = "MPL_RdPu"<br> res3@lbOrientation = "Horizontal" ; orientation<br> ;res3@pmLabelBarWidthF = 0.8<br> <br> res3@lbBoxEndCapStyle = "TriangleBothEnds"<br> <br><br>;*****************************<wbr>******************************<wbr>*****************<br>; Generate panel entries<br>;*****************************<wbr>******************************<wbr>*****************<br> ; only one time per file<br> plot = new(nrow*ncol , "graphic")<br> <br> ;res@cnFillPalette = "WhiteYellowOrangeRed"<br> ;res1@tmYLLabelsOn = True ; turn off lat labels<br> plot(0) = gsn_csm_contour_map(wks, t(0, :, :), res1)<br> <br> res2@tmYLLabelsOn = False ; turn off lat labels<br> plot(1) = gsn_csm_contour_map(wks, t(1, :, :), res2)<br> plot(2) = gsn_csm_contour_map(wks, t(2, :, :), res2)<br> plot(3) = gsn_csm_contour_map(wks, t(3, :, :), res3)<br> <br> <br> ;res1@tmYLLabelsOn = True <br> plot(4) = gsn_csm_contour_map(wks, t(4, :, :), res1)<br> res2@tmYLLabelsOn = False ; turn off lat labels<br> plot(5) = gsn_csm_contour_map(wks, t(5, :, :), res2)<br> plot(6) = gsn_csm_contour_map(wks, t(6, :, :), res2)<br> plot(7) = gsn_csm_contour_map(wks, t(7, :, :), res3)<br> <br> <br> res1@lbLabelBarOn = True<br> ;res2@tmYLLabelsOn = True <br> ;res1@tmXBLabelsOn = True ; turn off lon labels<br> ;res2@tmXBLabelsOn = True ; turn off lon labels<br><br> plot(8) = gsn_csm_contour_map(wks, t(8, :, :), res1)<br> res2@tmYLLabelsOn = False ; turn off lat labels<br> plot(9) = gsn_csm_contour_map(wks, t(9, :, :), res2)<br> <br> res2@lbLabelBarOn = True<br> plot(10) = gsn_csm_contour_map(wks, t(10, :, :),res2)<br> <br> res3@lbLabelBarOn = True<br> plot(11) = gsn_csm_contour_map(wks, t(11, :, :), res3)<br> <br> <br> <br><br> <br>;*****************************<wbr>******************************<wbr>*****************<br>; Draw the panel and label bars<br>;*****************************<wbr>******************************<wbr>*****************<br> resP = True<br> ;resP@gsnPanelMainString = "Land Only: Tmax: 2 Colorbars"<br> resP@gsnMaximize = True<br> resP@gsnFrame = False<br> ;resP@gsnPanelRight = 0.98<br> ;resP@gsnPanelBottom = 0.045 <br> <br> resP@gsnPanelFigureStrings= (/"1","1","1","1","2","2","2",<wbr>"2","3","3","3","3"/) ; add strings to panel<br> resP@amJust = "BottomLeft"<br><br> gsn_panel(wks,plot,(/nrow,ncol<wbr>/),resP) ; plots<br> <br> <br><br> frame(wks)<br><br></div><div><br></div><div><br></div></div>
<br></div></div><span class="">______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>