AWIPS Tips: Customized Contours

AWIPS Tips

Welcome back to AWIPS Tips!

This week we are going to look at how to customize contours for products in CAVE by changing the styleRules. Customizations include adjusting the color, line type, smoothing, interval, and range by creating a user override of the d2dContourStyleRules.xml file. Below we will walk through the different options and show an example of a customized contour for model surface temperatures. By default, if you load Models > GFS 20km > Sfc Temperature and Wind and you turn off all product layers except the contoured Surface Temperature, you can see it’s a pretty bland display, but we can customize it to look much more useful!
First we will need to open the Localization Perspective and create a user override of the CAVE > Style Rules > d2dContourStyleRules.xml file. A previous blog explained how to do this. Look through the file to find the variable you are looking for (sometimes they may be abbreviated). Here we’re looking for Temperature “T” at the surface. You should see the styleRule tag for this around line 378.

<styleRule>
  <paramLevelMatches>
    <parameter>T</parameter>
    <parameter>TxSM</parameter>
    <parameter>DpT</parameter>
    <parameter>TW</parameter>
    <parameter>TV</parameter>
    <singleLevel units="SURFACE">
    </singleLevel>
    <rangeLevel units="BL">
      <upper>180150</upper>
      <lower> 30000</lower>
    </rangeLevel>
  </paramLevelMatches>
  <contourStyle>
    <displayUnits>F</displayUnits>
    <contourLabeling labelSpacing="4">
      <increment>5</increment>

    </contourLabeling>
  </contourStyle>
</styleRule>

Initially, all that is specified is a contour labelSpacing of 4 and increment of 5, but we can add colors, lineStyles, specify max/mins, and/or set increment/fixed contours. Here is a list of lineStyles that are recognized:
  • SOLID
  • DASHED
  • DASHED_LARGE DOTTED
  • DASH_DOTTED
  • SHORT_DASHED
  • MEDIUM_DASHED
  • LONG_DASH
  • SHORT_DASH
  • LONG_DASHED
  • LONG_DASH_THREE_SHORT_DASHES
  • LONG_DASH_DOT
  • LONG_DASH_THREE_DOTS
  • MEDIUM_DASH_DOT
  • DOTS
There are two types of contours that can be specified: increment vs values (fixed). Increment contours have labeled values that change as you zoom in, where fixed contours specify what values to display and this doesn’t change as you zoom in. Both types of contours can take color, linyStyle, and thickness tags. In the example below, we use increment contours to customize surface temperature plots to display different colors for progressively higher values:

<contourStyle>
    <displayUnits>F</displayUnits>
    <contourLabeling labelSpacing="4">
      <increment color="cyan" lineStyle="DOTS" max="0">10</increment>
      <increment color="cyan" lineStyle="DASHED" min="0" max="31">10</increment>
      <increment color="blue" lineStyle="solid" thickness="2" min="32" max="32">1</increment>
      <increment color="green" lineStyle="solid" min="32" max="50">5</increment>
      <increment color="yellow" lineStyle="solid" min="50" max="60">5</increment>
      <increment color="orange" lineStyle="solid" min="60" max="70">5</increment>
      <increment color="red" lineStyle="solid" min="70" max="80">5</increment>
      <increment color="red" lineStyle="DASHED" thickness="2" min="80">5</increment>
    </contourLabeling>
</contourStyle>

Once you’ve made your changes and have saved your updates, switch back to the D2D perspective, clear the map in CAVE, and reload the product: Models > GFS 20km > Sfc Temperature and Wind (turn off the other layers), and you will see your customized styleRules for surface temperature!

The Warning Decision Training Division has a job sheet that walks through another example for customizing wind contours and an example on using the value tag for fixed labels.

Check back in two weeks for the next blog post where we go over the Text Workstation.

To view archived blogs, visit the AWIPS Tips blog tag, and get notified of the latest updates from the AWIPS team by signing up for the AWIPS mailing list. Questions or suggestions for the team on future topics? Let us know at support-awips@unidata.ucar.edu

This blog was posted in reference to v20.3.2-2 of NSF Unidata AWIPS

Comments:

Post a Comment:
  • HTML Syntax: Allowed
News@Unidata
News and information from the Unidata Program Center
News@Unidata
News and information from the Unidata Program Center

Welcome

FAQs

Developers’ blog

Recent Entries:
Take a poll!

What if we had an ongoing user poll in here?

Browse By Topic
Browse by Topic
« December 2024
SunMonTueWedThuFriSat
2
3
4
5
6
7
8
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today