Re: adding properties to a map

From: Kreienkamp Frank <Frank.Kreienkamp_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 29 2014 - 22:56:17 MDT

Hello Mary, Hello David,

thanks for you help.

@ David: yes your solution works fine. It's what I was looking for (res@cnLabelBarEndStyle = "ExcludeOuterBoxes")

@ Mary:
- your suggestion with example lb_3.ncl is interesting but please think about at UCAR if it would be possible to add a function which is adding the unit after the most right number at the label bar, optional brackets would be nice (eg. [m]), in Germany (where I come from) it is common and good/best practice to have the unit given beside the values

- your suggestion 'res@cnRasterSmoothingOn = True' is removing the raster boxes. That was not what I was looking for. I see in the picture that the raster boxes does not have 'lines' on each 'border'. Some times there are ridges at several sides. May be that this is due to the used resolution.

- I think I have now understand the function of adding text. Are the units ( amres1@amParallelPosF = -0.7 ; amres1@amOrthogonalPosF = -0.65) valid for all used resolutions of the graphic or are they dependent on the used resolution?
--- how to remove the surrounding border?

- how can I remove the title? I have found a way the rename it (u@long_name = ) but not to remove.

Thanks in advance
Frank

-----Ursprüngliche Nachricht-----
Von: Mary Haley [mailto:haley@ucar.edu]
Gesendet: Dienstag, 29. April 2014 16:58
An: Kreienkamp Frank
Cc: 'ncl-talk@ucar.edu'
Betreff: Re: [ncl-talk] adding properties to a map

Frank,

See my comments interspersed.

On Apr 29, 2014, at 1:29 AM, Kreienkamp Frank <Frank.Kreienkamp@dwd.de> wrote:

> Hello,
>
> based on my understanding of ncl features I have created the attached map. Currently I fail to add certain features.
>
> I have marked the needed features in the map with red arrows.
>
> This includes
> - a wish for 2 lines of a title including the possibility to change the font size and the position (left side assignment)

See example "text_9.ncl" at:

http://www.ncl.ucar.edu/Applications/text.shtml

This shows how to add strings outside a plot. You can add two strings on the left, but you will need to adjust the "amOrthogonalPosF" resource as described in this example.

> - a added unit beside the colour scale

I don't think there's a way to add a unit in the exact location you're indicating, but you can add a labelbar title, and then move it right or left using pmLabelBarOrthogonalPosF.
See example "lb_3.ncl" at:

http://www.ncl.ucar.edu/Applications/labelbar.shtml

> - the removal of not needed colour parts on both sides of the colour scale

When you create contours with NCL, the default is that you will always get one more color box than you have contour levels, because NCL is giving you color boxes that show values above and below the min/max contour levels.

If you don't want these extra boxes, then you need to select two fewer contour levels. If you also want the end labelbar boxes labeled, then you will need to set

   res@lbLabelAlignment = "ExternalEdges"
   res@lbLabelStrings = (/...array of label strings.../)
 
See example lb_14.ncl at:

http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex14

> - the possibility to add several lines at a position like the indicated by the top-down-arrow on the right bottom corner

Do you mean lines of text, or just lines?

You can see gsn_text_ndc and gsn_polyline_ndc for ways to add lines using NDC coordinates. NDC coordinates are coordinates in a unit square, and hence go from 0 to 1 inclusive. These are what you need to use when adding text, lines, markers, etc, that fall outside a plot's boundaries.

See the examples at:

http://www.ncl.ucar.edu/Applications/polyg.shtml

>
> A additional question is, how to create not erratic looking grid boxes of a raster based data set in a stereographic projection (the data are not in the same projection).

I'm not sure what you mean by "erratic", but perhaps you want:

   res@cnRasterSmoothingOn = True

For more raster examples, see:

http://www.ncl.ucar.edu/Applications/raster.shtml

--Mary

>
> Thanks for help in advance
> Frank
>
> <ncl-grafic.png><ncl-script.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 29 22:56:31 2014

This archive was generated by hypermail 2.1.8 : Sun May 04 2014 - 12:38:56 MDT