<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5302028375556928625</atom:id><lastBuildDate>Wed, 28 Aug 2024 21:24:50 +0000</lastBuildDate><category>grads</category><category>grib</category><category>grid2ctl</category><category>gridmap</category><category>rain gauge</category><category>wgrib</category><title>Dr. Jam&#39;s laboratory</title><description></description><link>http://drjamslab.blogspot.com/</link><managingEditor>noreply@blogger.com (Jam)</managingEditor><generator>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5302028375556928625.post-7718736938930452845</guid><pubDate>Sun, 18 Aug 2013 18:18:00 +0000</pubDate><atom:updated>2021-07-21T07:30:42.570-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">grads</category><category domain="http://www.blogger.com/atom/ns#">grib</category><category domain="http://www.blogger.com/atom/ns#">grid2ctl</category><category domain="http://www.blogger.com/atom/ns#">gridmap</category><category domain="http://www.blogger.com/atom/ns#">rain gauge</category><category domain="http://www.blogger.com/atom/ns#">wgrib</category><title>Display Gridded Gauged Rainfall data using Grads</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaWIkJvw5dXyBcEK0HVBVxlmSXQmM6QGaR3NHt1BZfFQrJNv5et8-lHO3N-sHzLd4Z4s1TGe4IIrl28AsxnVjGYoNTzqn4BRnr0jn-ta1heOQviByMcgKiohS7DR_wHQJMlaIGfeaBV1E/s1600/rain2013060114.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaWIkJvw5dXyBcEK0HVBVxlmSXQmM6QGaR3NHt1BZfFQrJNv5et8-lHO3N-sHzLd4Z4s1TGe4IIrl28AsxnVjGYoNTzqn4BRnr0jn-ta1heOQviByMcgKiohS7DR_wHQJMlaIGfeaBV1E/s400/rain2013060114.jpg&quot; height=&quot;308&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Download GRIdded Binary (Grib) data from source. In my case, I am interested in hourly gauged rainfall from &lt;a href=&quot;http://data.eol.ucar.edu/codiac/dss/id=21.088&quot; target=&quot;_blank&quot;&gt;NCAR EOL&lt;/a&gt;, which is available in gridded binary format.&lt;br /&gt;
&lt;br /&gt;
Step 2: In order to display grib data using grads, we need to create a control file (.ctl) and an gribmap index file (either .gmp or .idx). Control file can be created using &lt;a href=&quot;http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html&quot; target=&quot;_blank&quot;&gt;grib2ctl&lt;/a&gt; perl script.&lt;br /&gt;
&lt;br /&gt;
Create ctl file using grib2ctl perl script.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
grib2ctl.pl file_name.grb &amp;gt;file_name.ctl.&amp;nbsp;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Make sure the grib2ctl.pl is executable and is in searchable location (I had copied it to /usr/local/bin).&lt;br /&gt;
&lt;br /&gt;
Once the file_name.ctl file is created, create index file using gribmap (inbuilt with grads software).&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
gribmap -i file_name.ctl -0 (if the gridded file is for one time step).&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now that file_name.ctl and file_name.idx file are created, we can display the variable using grads. For hourly gridded gauged rainfall data, the name of the variable is apcpsfc. You can get this information using &lt;a href=&quot;http://www.cpc.ncep.noaa.gov/products/wesley/wgrib.html&quot; target=&quot;_blank&quot;&gt;wgrib&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
wgrib -V file_name.Grb&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The following lines of code plots gridded gauged rainfall data (hourly):&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Open a terminal and cd to the location where the .grb, .ctl and .idx files are saved.&lt;br /&gt;
Type &lt;a href=&quot;http://www.iges.org/grads/downloads.html&quot; target=&quot;_blank&quot;&gt;grads&lt;/a&gt; in command prompt. This will start a new grads session. Choose landscape or portrait mode.&lt;br /&gt;
open file_name.ctl (grads will open the control file)&lt;br /&gt;
query file (list details of the file such as variable name, domain etc)&lt;br /&gt;
set lon -125 -67 (sets lon range)&lt;br /&gt;
set lat 25 49 (sets lat range)&lt;br /&gt;
d apcpsfc (displays contour map of gridded gauged rainfall data)&lt;/blockquote&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If you do not like the default line contour display, you can display using shaded contour.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
clear (clear existing plots)&lt;br /&gt;
set gxout shaded (this will set contour type as shaded)&lt;br /&gt;
set csmooth on (if you want to have a smooth contour, set this option on)&lt;br /&gt;
d apcpsfc (displays shaded contour of gridded gauged rainfall data).&lt;/blockquote&gt;
Finally, if you want to save the display image, type the following. &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
printim image_filename.jpg (saves image in jpg format. other options are png and gif).&lt;/blockquote&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
</description><link>http://drjamslab.blogspot.com/2013/08/display-gridded-gauged-rainfall-data.html</link><author>noreply@blogger.com (Jam)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaWIkJvw5dXyBcEK0HVBVxlmSXQmM6QGaR3NHt1BZfFQrJNv5et8-lHO3N-sHzLd4Z4s1TGe4IIrl28AsxnVjGYoNTzqn4BRnr0jn-ta1heOQviByMcgKiohS7DR_wHQJMlaIGfeaBV1E/s72-c/rain2013060114.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>