[ncl-talk] NCL Font Size

Dennis Shea shea at ucar.edu
Wed Sep 11 13:37:50 MDT 2019


Perhaps, you could copy and modify:

*%> cp* $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
*Lara.WRFUserARW.ncl *

Then:
load "./*Lara.WRFUserARW.nc <http://Lara.WRFUserARW.nc>" *

*++++++++++++++++++++++++++++++++++++++++*

Some other information.

I think WRF people wrote many of the functions contained within
*WRFUserARW.ncl*. I think they are more knowledgeable than ncl-talk. A link
to the WRF user forum is appended.

=========================================================
%> less $NCARG_ROOT/lib/ncarg/nclscripts/wrf/*WRFUserARW.ncl*

I think the 'mini' titles you want are 'Valid' and then two variable names.
Search for:  Valid

=================================================
undef("set_title_resources")
function set_title_resources (data[*][*]:numeric, res:logical)
[SNIP]
=================================================
undef("_SetMainTitle")
procedure _SetMainTitle(nc_file:file,wks[1]:graphic,cn[1]:graphic,opts)

; This procedure checks the input data for certain attributes, and
; based on those, sets MainTitle, InitTime and ValidTime
;
;  Attributes recognized by this procedure:
;     MainTitle                 (main title - top left)
;                               (with Init time top right)
;     TimeLabel                 (valid time  - right  under init time)
;     NoHeaderFooter            (switch all headers and footers off -
mainly for panels)
;
; If the "NoHeaderFooter" attribute exists and is set True, then
; don't create any titles.
[SNIP]
   *txt2* = *create*
<https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Create>
"ValidTime" textItemClass wks
      "txString"      : ValidTime
      "txFontHeightF" : font_height                      ; <=========
    end create
    anno = NhlAddAnnotation(cn,*txt2*)
    setvalues anno
      "amZone"           : 3
      "amSide"           : "Top"
      "amJust"           : opts at TimePos
      "amParallelPosF"   : opts at TimePosF
      "amOrthogonalPosF" : MTOPosF
      "amResizeNotify"   : False
    end setvalues
  end if
----
*set_title_resources*
----
WRF questions:

Please submit all questions to the WRF online user support forum:
http://forum.mmm.ucar.edu

You will need to create a user ID and password to post, but this
should only take a minute.

On Wed, Sep 11, 2019 at 11:48 AM Adam Phillips via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi Lara,
> I found this NCL website page that discusses WRF plotting function titles:
> http://www.ncl.ucar.edu/Applications/wrftitles.shtml
>
> Unfortunately it states that all font sizes are set via the FontHeightF
> resource. Testing things here I see the same problem you are seeing, in
> that the descriptive / units title (FIeldTitle) font size does not change
> when FontHeightF is changed. However, I was able to get the font size
> changed by (strangely) setting the tiMainFontHeightF resource. Give that a
> try and let ncl-talk know if that does not work for you.
> Adam
> res at tiMainFontHeightF = 0.005
>
> On Tue, Sep 10, 2019 at 2:38 AM Lara Quitián Hernández <
> laraquitianhernandez at gmail.com> wrote:
>
>> Good morning,
>>
>> Firstly, thank you very much for your quick response. I have tried
>> setting the FontHeightF resource in the opts and it effectively changes the
>> font size of the title and InitTime values, but the variables (upper left
>> area) do not change and unfortunately, I'm more interested in increasing
>> that font size. If you find a way to do it, please, share it with me.
>>
>> Thanks in advance.
>>
>> Kind regards,
>> Lara
>>
>>
>>
>> El lun., 9 sept. 2019 a las 18:56, Adam Phillips (<asphilli at ucar.edu>)
>> escribió:
>>
>>> Hi Lara,
>>> Looking at the wrf_contour code located here:
>>> $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>>>
>>> and attempting to trace where the font heights for the subtitles get
>>> set, it looks like there is an undocumented resource that wrf_contour
>>> accepts:
>>> FontHeightF
>>> (See line 3908 in the above file for NCL v6.6.2)
>>>
>>> Try setting that in your opts resource list and see if that changes the
>>> font size for the two subtitles. (I verified it changes it for the upper
>>> right subtitle.)
>>> Adam
>>>
>>> On Mon, Sep 9, 2019 at 7:04 AM Lara Quitián Hernández via ncl-talk <
>>> ncl-talk at ucar.edu> wrote:
>>>
>>>> Good afternoon,
>>>>
>>>> I would like to increase the font size of the variables and the
>>>> InitTime label.
>>>> I enclose a figure indicating both things and the script.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Kind regards,
>>>> Lara
>>>> [image: 850hPa_ETH19_contourverde_616_2014-10-19_12:00:00.png]
>>>>
>>>> --
>>>>
>>>> *Lara Quitián Hernández, PhD Student*
>>>> Department of Earth Physics and Astrophysics
>>>> Faculty of Physical Sciences
>>>> Ciudad Universitaria, Plaza Ciencias, 1
>>>> 28040 Madrid. Spain
>>>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>>
>>> --
>>> Adam Phillips
>>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>>
>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>
>>
>>
>> --
>>
>> *Lara Quitián Hernández, PhD Student*
>> Department of Earth Physics and Astrophysics
>> Faculty of Physical Sciences
>> Ciudad Universitaria, Plaza Ciencias, 1
>> 28040 Madrid. Spain
>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>
>>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
> _______________________________________________
> 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/20190911/a406827c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 850hPa_ETH19_contourverde_616_2014-10-19_12:00:00.png
Type: image/png
Size: 620258 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190911/a406827c/attachment-0001.png>


More information about the ncl-talk mailing list