Unidata Developer's BlogUnidata Developer's Bloghttps://www.unidata.ucar.edu/blogs/developer/en/feed/entries/atom2024-03-18T20:14:52-06:00Apache Rollerhttps://www.unidata.ucar.edu/blogs/developer/entry/new_gempak_surface_station_fileNew GEMPAK Surface Station File for 7.1.0$entry.creator.screenName2014-04-29T11:52:17-06:002014-04-30T12:18:16-06:00<p>
The upcoming release of GEMPAK 7.1.0 will include a new
global surface METAR table (sfstns.tbl), created by a new
Python decoder available at<br/>
<a target="_blank" href="https://github.com/mjames-upc/gempak-stations">http://github.com/mjames-upc/gempak-stations</a><br/>
The table is created from the
NCAR / RAL master file: <br/>
<a target="_blank"
href="http://weather.rap.ucar.edu/surface/stations.txt">http://weather.rap.ucar.edu/surface/stations.txt</a><br/>
The new GEMPAK table
is available now at <br/>
<a target="_blank" href="https://raw.githubusercontent.com/mjames-upc/gempak-stations/master/sfstns.tbl">http://raw.githubusercontent.
com/mjames-upc/gempak-stations/master/sfstns.tbl</a>
</p>
<p>
$GEMTBL/stns/geog.tbl will also be updated to be consistent
with the NCAR / RAL file. The new GEMPAK geog.tbl is
available at: <br/>
<a target="_blank"
href="https://raw.githubusercontent.com/Unidata/gempak/master/gempak/tables/stns/geog.tbl">http://raw.githubusercontent.
com/Unidata/gempak/master/gempak/tables/stns/geog.tbl</a>
</p>https://www.unidata.ucar.edu/blogs/developer/entry/quicly_create_makefile_entries_forQuickly create Makefile entries for all objects in a project using Sed$entry.creator.screenName2014-01-14T13:42:23-07:002014-01-15T19:30:09-07:00<pre>ls *.f | sed 's/\.f/\.o) \\/' | sed 's/^/\t\$(ALIB)(/'</pre><p>For this example, a project with over 200 Fortran source files is used (ncep BUFR library for GEMPAK):</p><pre>ls *.f<br /><p><br />adn30.f getbmiss.f istdesc.f nvnwin.f reads3.f ufbmns.f
atrcpt.f getlens.f iupb.f nwords.f readsb.f ufbovr.f
bfrini.f getntbe.f iupbs01.f nxtwin.f rewnbf.f ufbpos.f
blocks.f gets1loc.f iupbs3.f openbf.f rjust.f ufbqcd.f
bort2.f gettagpr.f iupm.f openbt.f rsvfvm.f ufbqcp.f
bort.f gettbh.f iupvs01.f openmb.f rtrcpt.f ufbrep.f
bvers.f getvalnb.f jstchr.f openmg.f seqsdx.f ufbrms.f
cadn30.f getwin.f jstnum.f pad.f setblock.f ufbrp.f
capit.f i4dy.f lcmgdf.f padmsg.f setbmiss.f ufbrw.f
chekstab.f ibfms.f lmsg.f parstr.f sntbbe.f ufbseq.f
chrtrna.f icbfms.f lstjpb.f parusr.f sntbde.f ufbsp.f
chrtrn.f ichkstr.f makestab.f parutg.f status.f ufbstp.f
cktaba.f icmpdx.f maxout.f pkb.f stbfdx.f ufbtab.f
closbf.f icopysb.f mesgbc.f pkbs1.f stdmsg.f ufbtam.f<br /></p><p>... </p></pre><p>You can quickly create standard formatting for Makefile objects with the command </p><pre><span style="font-size: 11pt; letter-spacing: 0.2px;">ls *.f | sed 's/\.f/\.o) \\/' | sed 's/^/\t\$(ALIB)(/' </span></pre><pre> <span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(adn30.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(atrcpt.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(bfrini.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(blocks.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(bort2.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(bort.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(bvers.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(cadn30.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(capit.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(chekstab.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(chrtrna.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(chrtrn.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(cktaba.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(closbf.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(closmg.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(cmpmsg.o) \<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>$(ALIB)(cmsgini.o) \<br /><p>... </p></pre>https://www.unidata.ucar.edu/blogs/developer/entry/creating_and_using_a_regionCreating and Using a Region-Of-Interest Mask$entry.creator.screenName2013-06-08T12:10:40-06:002021-04-22T16:13:25-06:00<p>A <em>vgf file</em> is created using the interactive product generation tools within NMAP2. A closed line is drawn enclosing the region of interest, and a text label is grouped with the line assigning a value of 1 to the contour.</p><p>A <a href='conusoutline_cmask.vgf' target='_blank'>vgf file</a> is created using the interactive product generation tools within NMAP2. A closed line is drawn enclosing the region of interest, and a text label is grouped with the line assigning a value of 1 to the contour.</p>
<p>
<img width='600' src='https://www.unidata.ucar.edu/blog_content/images/2013/conus_vgfoutline.gif' />
</p>
<p>Once the region of interest is defined, a <a href='https://www.unidata.ucar.edu/blog_content/images/2013/2007071900_cmask.grd' target='_blank'>grid file</a> can be created using the <strong>GRPHGD</strong> standalone program (It can also be created using the graph-to-grid option in NMAP2).</p>
<h4>Create grid from VGF file with GRPHGD</h4>
<pre><code>GEMPAK-GRPHGD>
GDOUTF = 2007071900_cmask.grd
GUESS =
PROJ = MER
GRDAREA =
KXKY = 10;10
MAXGRD = 200
CPYFIL = #A218
ANLYSS =
CNTRFL = cmask.info
GDATTIM = 070719/0000f000
GFUNC = cmask
GLEVEL = 0
GVCORD = none
KEYCOL =
KEYLINE =
OLKDAY =
GGLIMS =
HISTGRD = NO
BOUNDS =
TYPE = C
GAMMA = 0.3
SEARCH = 20
NPASS = 2
QCNTL =
GUESFUN =
CATMAP =
DISCRETE =
DLINES = yes;no|-0.5
GGVGF = conusoutline_cmask.vgf
EDGEOPTS =
GEMPAK-GRPHGD>r
</code></pre>
<h4>Check with GDINFO</h4>
<pre><code>GEMPAK-GDINFO>
GDFILE = 2007071900_cmask.grd
LSTALL = YES
OUTPUT = T
GDATTIM = all
GLEVEL = 0
GVCORD = none
GFUNC = cmask
GEMPAK-GDINFO>r
GRID FILE: cmask.gem
GRID NAVIGATION:
PROJECTION: LCC
ANGLES: 25.0 -95.0 25.0
GRID SIZE: 614 428
LL CORNER: 12.19 -133.46
UR CORNER: 57.33 -49.42
Number of grids in file: 1
NUM TIME1 TIME2 LEVL1 LEVL2 VCORD PARM
1 070719/0000F000 0 NONE CMASK
GEMPAK-GDINFO>
</code></pre>
<p>The parameter <strong>CMASK</strong> is created where values greater than 1 are enclosed by the contour. <strong>DLINES</strong> defines the epsilon of (here -0.5 is used since the contour was drawn counterclockwise) to add to vlaues on either side of the single contour to be define greater / less than the contour value of 1.0.</p>
<p>The grid point values of <strong>SGT(cmask,1)</strong> (greater than 1.0) as shown here:</p>
<p><img width='600' src='https://www.unidata.ucar.edu/blog_content/images/2013/conus_outline_points.gif' /></p>
<h4>Plot with GDPLOT2</h4>
<p>The resultant grid can ge used with the <strong>MASK()</strong> function and logical operators to define mask or clipping regions of interest. As an example, the 24 hour precipitation in the top panel is masked by the region of interest in the lower panel so that only data within the region of interest will be considered.</p>
<pre><code>GDFILE = nam12 + 2007071900_cmask.grd
GDATTIM = f030
GLEVEL = 0
GVCORD = none
PANEL = t ! b
SKIP = 0
SCALE = 0
GDPFUN = p24i ! mask(p24i,sgt(cmask^070719/0000f000+2,1))
TYPE = f
CONTUR = 3/3
CINT = 0
LINE = 2/1/2
FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9
FLINE = 0;21-30;14-20;5
HILO =
HLSYM =
CLRBAR = 1
WIND = BM1
REFVEC =
TITLE = 1
TEXT = 0.7/2/SW
CLEAR = YES
GAREA = us
IJSKIP =
PROJ = STR/90;-100;0
</code></pre>
<p><img width='600' src='https://www.unidata.ucar.edu/blog_content/images/2013/cmask.gif' /></p>
<h4>Using GDCSV to find local maximas</h4>
<p>The <strong>HIGH()</strong> function can be used to obtain local maximas from the grid region of interest. The <strong>GWFS()</strong> gaussian weighted smoothing function can be used to reduce higher frequency features in the grid and focus on broader areas of interest. By using the <strong>GDCSV</strong> program, the locations of <strong>HIGH()</strong> output are output to a file for use in determining local mesoscale model domain centers. By masking the region, the model domains are ensured to be within the desired region.</p>
<pre><code>GEMPAK-GDCSV>l
GDATTIM = f030
GDFILE = nam12 + 2007071900_cmask.grd
GLEVEL = 0
GAREA = grid
PROJ = def
GVCORD = none
GFUNC = high(mask(gwfs(p24i,40),sgt(cmask^070719/0000f000+2,1)),30)
SCALE = 0
OUTPUT = f/p24i_highs.dat
GEMPAK-GDCSV>r
</code></pre>
<p><strong>OUTPUT</strong> is to the text file <code>p24i_highs.dat</code>. You can use the <code>sort</code> command to return the top two local maxima:</p>
<pre><code>sort -t, -k 5bnr p24i_highs.dat | head -2
508, 244, 42.3889, -72.2385, 2.53370
338, 236, 42.9560, -96.3721, 0.58850
</code></pre>
<p>These two values are now scriptable (use <code>|head -1</code> for the first and <code>| head -2 | tail -1</code> for the second) both for plotting regional areas of interest and for WRF domains. A WRF lesson is outside the reach of this document, but as an example of what is run at Unidata, here is are the primary and secondary regions</p>
<h4>Plotting again with GDPLOT2 and GPANOT</h4>
<p>The locations of the 2 greatest local maximas (<strong>42.3889,-72.2385</strong> and <strong>42.9560,-96.3721</strong>) are shown along with the precipitation forecast field. The primary and secondary domains can be drawn using <strong>GPANOT</strong> to overlay the boxes.</p>
<p>First plot masked precipitation, same as above, but change <code>PANEL = 0</code> and <code>CLEAR = n</code></p>
<pre><code>GDFILE = nam12 + 2007071900_cmask.grd
GDATTIM = f030
GLEVEL = 0
GVCORD = none
PANEL = 0
SKIP = 0
SCALE = 0
GDPFUN = mask(p24i,sgt(cmask^070719/0000f000+2,1))
TYPE = f
CONTUR = 3/3
CINT = 0
LINE = 2/1/2
FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9
FLINE = 0;21-30;14-20;5
HILO =
HLSYM =
CLRBAR = 1
WIND = BM1
REFVEC =
TITLE = 1
TEXT = 0.7/2/SW
CLEAR = YES
GAREA = us
IJSKIP =
PROJ = STR/90;-100;0
CLEAR = n
r
</code></pre>
<p><img width='600' src='https://www.unidata.ucar.edu/blog_content/images/2013/box.gif' /></p>
https://www.unidata.ucar.edu/blogs/developer/entry/displaying_ensemble_gridsDisplaying Ensemble Grids$entry.creator.screenName2013-06-07T19:39:08-06:002021-04-22T16:08:27-06:00<p>GEMPAK provides a special set of functions, all of which are named beginning with <strong>ENS_</strong>, to do specific calculations over multiple members of an ensemble. The constitution of the ensemble is specified as a <strong>GDFILE</strong> entry by listing file names and aliases, separated by commas and enclosed in curly brackets <strong>{}</strong>. For specific functions available see the <strong><a href='https://docs.unidata.ucar.edu/gempak' target='_blank'>GPARM</a></strong> online documentation.</p><style>
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
margin-top: 0 !important; }
body > *:last-child {
margin-bottom: 0 !important; }
a {
color: #4183C4; }
a.absent {
color: #cc0000; }
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;
text-decoration: none; }
h1 tt, h1 code {
font-size: inherit; }
h2 tt, h2 code {
font-size: inherit; }
h3 tt, h3 code {
font-size: inherit; }
h4 tt, h4 code {
font-size: inherit; }
h5 tt, h5 code {
font-size: inherit; }
h6 tt, h6 code {
font-size: inherit; }
h1 {
font-size: 28px;
color: black; }
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
h3 {
font-size: 18px; }
h4 {
font-size: 16px; }
h5 {
font-size: 14px; }
h6 {
color: #777777;
font-size: 14px; }
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0; }
hr {
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0;
}
body > h2:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0; }
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0; }
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0; }
li p.first {
display: inline-block; }
li {
margin: 0; }
ul, ol {
padding-left: 30px; }
ul :first-child, ol :first-child {
margin-top: 0; }
dl {
padding: 0; }
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
dl dt:first-child {
padding: 0; }
dl dt > :first-child {
margin-top: 0; }
dl dt > :last-child {
margin-bottom: 0; }
dl dd {
margin: 0 0 15px;
padding: 0 15px; }
dl dd > :first-child {
margin-top: 0; }
dl dd > :last-child {
margin-bottom: 0; }
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
table {
padding: 0;border-collapse: collapse; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
/*table tr th {
font-weight: normal;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
*/
table tr td {
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
img {
max-width: 100%; }
span.frame {
display: block;
overflow: hidden; }
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
span.frame span img {
display: block;
float: left; }
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
span.align-center {
display: block;
overflow: hidden;
clear: both; }
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
span.align-center span img {
margin: 0 auto;
text-align: center; }
span.align-right {
display: block;
overflow: hidden;
clear: both; }
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
span.align-right span img {
margin: 0;
text-align: right; }
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
span.float-left span {
margin: 13px 0 0; }
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
code, tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px; }
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent; }
.highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 12px;
line-height: 17px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre code, pre tt {
background-color: transparent;
border: none; }
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
}
</style>
<title>Displaying Ensemble Grids</title>
<h2><span style='color: rgb(136, 136, 136); font-family: verdana,arial,helvetica,sans-serif; font-size: 14pt; font-weight: normal; letter-spacing: 0.2px;'>What types of Ensemble data are there?</span></h2>
<ul>
<li>control (initial analysis and/or forecast)</li>
<li>member (perturbations of the control run)</li>
<li>average (computed from members)</li>
<li>spread (computed from members)</li>
<li>probabilistic (computed from members)</li>
</ul>
<h4>Special ensemble functions</h4>
<p>GEMPAK provides a special set of functions, all of which are named beginning with <strong>ENS_</strong>, to do specific calculations over multiple members of an ensemble. The constitution of the ensemble is specified as a <strong>GDFILE</strong> entry by listing file names and aliases, separated by commas and enclosed in curly brackets <strong>{}</strong>. For specific functions available see the <strong><a href='https://docs.unidata.ucar.edu/gempak' target='_blank'>GPARM</a></strong> online documentation.</p>
<h4>Example</h4>
<p>The GFS model provides deterministic output at the 72 hour forecast time for 6 hour accumulated precipitation (P06M) and boundary layer CAPE as shown in GDPLOT2 using:</p>
<pre><code>GDFILE = gfs004
GDATTIM = f072
GLEVEL = 0 ! 180:0
GVCORD = none ! pvbl
SCALE = 0
GDPFUN = p06m ! cape
TYPE = f ! c
CONTUR = 3/3
CINT = 300
LINE = 2/1/2
FINT = .25;2.5;6.35;12.7;19.05;25.4;31.75;38.1;44.45;50.8;63.5;76.2;101.6;127;152.4;177.8
FLINE = 0;21-30;14-20;5
GAREA = us
PROJ = STR/90;-100;0
</code></pre>
<p><img width='500' src='https://www.unidata.ucar.edu/blog_content/images/2013/ens_01.gif' /></p>
<p>The figure above shows several large areas of precipitation with low CAPE values. We also see several areas with large cape values and little precipitation.</p>
<p>By utilizing the ensemble members, we can quantify the probability of precipitation exceeding .25mm (red contour lines), and CAPE values exceeding 500 J Kg^-2 (yellow shading) using 20 members of the global ensemble forecast system (gefs) in GDPLOT2 using:</p>
<pre><code>GDFILE = {gefs}
GDATTIM = f072
GLEVEL = 0 ! 180:0
GVCORD = none ! pvbl
SCALE = 0
GDPFUN = ens_prob(gt(p06m,.25)) ! ens_prob(gt(cape,500))
TYPE = c ! f
CONTUR = 3/3
CINT = 0.2
LINE = 2/1/2
FINT = ! .5;1.2
FLINE = ! 0;5/7
</code></pre>
<p><img width='500' src='https://www.unidata.ucar.edu/blog_content/images/2013/ens_02.gif' /></p>
<p>Observing the plot above, we can visually detect several regions where precipitation probability and CAPE values might suggest likely areas of thunderstorm activity where the two contour regions intersect. We can quantify the combined probability by using the logical operator <strong>AND()</strong> to compute the combined probability of both conditions as shown below:</p>
<pre><code>GDFILE = {gefs}
GDATTIM = f072
GLEVEL = 0
GVCORD = none
SCALE = 0
GDPFUN = ens_prob(and(gt(p06m,.25),gt(cape@180:0%pvbl,500)))
TYPE = f
CONTUR = 3/3
CINT =
LINE =
FINT = .1/.1
FLINE = 0;23-13/7
</code></pre>
<p><img width='500' src='https://www.unidata.ucar.edu/blog_content/images/2013/ens_03.gif' /></p>