[ncl-talk] ncl-talk Digest, Vol 176, Issue 18

Mary Haley haley at ucar.edu
Tue Jul 24 16:22:13 MDT 2018


​Luis,

Did you get this resolved?

I think the basic issue is that since you are using the wrf_xxxx functions
to do graphics and not gsn_csm_xxxx, you have to maximize the size of the
plot yourself.

If you add a call to:

drawNDCGrid(wks)

(one of the most awesome functions in NCL, thanks to Adam Phillips)

before

draw(plot)

then this helps you see how much you can change the position and increase
the size of the plot, using vpXF / vpYF / vpWidthF / vpHeightF resources.

Using this information, I added the following to your code, after plot was
created, but before "draw" was called:

setvalues plot
  "vpXF"      : 0.1
  "vpYF"      : 0.98
  "vpWidthF"  : 0.82
  "vpHeightF" : 0.82
end setvalues

Using a wrfout file I had, I got the attached results (I included the
script too).

​In order to make the drawing go faster, I set cnFillMode to "RasterFill".
This was for debug purposes, and you likely want to remove or comment that
line.​

--Mary

Note: I've set the width and height exactly to a square.  When you overlay
on a map, the ratio will be adjusted to fix the correct ratio of your map,
which means one of the sides of your plots may be reduced slightly.

--Mary



On Mon, Jul 16, 2018 at 5:13 AM, Luis Cesareo Cana Cascallar <
luis.cana at ulpgc.es> wrote:

> Thanks Mary, the plot looks much better but there is still some blank
> space at the bottom. See attached plot. Also, I send you the whole script
> to see how I set the resources see what I did wrong.
>
>
> Best,
>
> Luis
>
> > El 14 jul 2018, a las 19:00, ncl-talk-request at ucar.edu escribió:
> >
> > Send ncl-talk mailing list submissions to
> >        ncl-talk at ucar.edu
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > or, via email, send a message with subject or body 'help' to
> >        ncl-talk-request at ucar.edu
> >
> > You can reach the person managing the list at
> >        ncl-talk-owner at ucar.edu
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of ncl-talk digest..."
> >
> >
> > Today's Topics:
> >
> >   1. Re: About removing blank space at the bottom of figures
> >      (Mary Haley)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Fri, 13 Jul 2018 22:03:36 -0600
> > From: Mary Haley <haley at ucar.edu>
> > To: Luis Cesareo Cana Cascallar <luis.cana at ulpgc.es>
> > Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
> > Subject: Re: [ncl-talk] About removing blank space at the bottom of
> >        figures
> > Message-ID:
> >        <CACNN_CKoU-E4V=bcVH6rMZHc_WLTmTM77P9tQJj29jefgLAv4A@
> mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Without seeing your whole script, I can't be sure of the problem because
> I
> > don't know which resources are being used with which function call.
> >
> > However, please visit our WRF titles examples page:
> >
> > http://www.ncl.ucar.edu/Applications/wrftitles.shtml#ex3
> >
> > and look at example wrf_title_3.ncl which shows how to get rid of the
> extra
> > titles.  You'll notice there's no white space at the top or bottom of
> this
> > plot.
> >
> > --Mary
> >
> >
> > On Fri, Jul 13, 2018 at 8:09 AM, Luis Cesareo Cana Cascallar <
> > luis.cana at ulpgc.es> wrote:
> >
> >> Hi,
> >>
> >> I?m plotting several images and I?d like to remove the extra space at
> the
> >> bottom of the image (see attached example). I?m using gsnMaximize to
> use as
> >> much area as possible:
> >>
> >> ******************
> >> res = True
> >> ;res at MainTitle = "SBF with ECMWF data, WRF-3.9.1"        ;Give plot a
> >> main title
> >> res at tiMainOn = False                            ;
> >> res at Footer = False                                             ; Set
> >> Footers off
> >> pltres = True                                               ; Plotting
> >> resources
> >> pltres at PanelPlot = True                          ; add text and
> locations
> >> pltres at gsnMaximize = True                   ; full size
> >> mpres = True
> >> ******************
> >>
> >> But notice the blank space at the bottom.
> >> I?ve tried to split the image in several files and use ImageMagick to
> trim
> >> each one of them, but retaining a high quality image. However, the size
> of
> >> the resulting image is really big (7,2 Mb). Any suggestion? I?m using
> the
> >> following command:
> >>
> >> convert -alpha off -background white -density 300 -trim Fig04a.ps
> >> Fig04a.eps
> >>
> >> Best,
> >>
> >> Luis Cana
> >> ULPGC
> >>
> >> Antes de imprimir este correo electr?nico, piense bien si es necesario
> >> hacerlo: el medio ambiente es una cuesti?n de todos.
> >>
> >> Please consider the environment before printing this email.
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >>
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://mailman.ucar.edu/pipermail/ncl-talk/
> attachments/20180713/0d63dc25/attachment-0001.html>
> > -------------- next part --------------
> > A non-text attachment was scrubbed...
> > Name: SBF_10_WRF_simul01.000017.png
> > Type: image/png
> > Size: 167070 bytes
> > Desc: not available
> > URL: <http://mailman.ucar.edu/pipermail/ncl-talk/
> attachments/20180713/0d63dc25/attachment-0001.png>
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> > ------------------------------
> >
> > End of ncl-talk Digest, Vol 176, Issue 18
> > *****************************************
> >
> > Antes de imprimir este correo electrónico, piense bien si es necesario
> hacerlo: el medio ambiente es una cuestión de todos.
> >
> > Please consider the environment before printing this email.
>
>
> Antes de imprimir este correo electrónico, piense bien si es necesario
> hacerlo: el medio ambiente es una cuestión de todos.
>
> Please consider the environment before printing this email.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180724/f7e1c1fc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SBF_10_WRF_simul01.000001.png
Type: image/png
Size: 199099 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180724/f7e1c1fc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SBF_10_WRF_simul01.000002.png
Type: image/png
Size: 414603 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180724/f7e1c1fc/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SBF_con_vientos_10m_mod.ncl
Type: application/octet-stream
Size: 7624 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180724/f7e1c1fc/attachment-0001.obj>


More information about the ncl-talk mailing list