This commit is contained in:
srcarter3 2021-09-01 19:06:40 +00:00
parent 6dac12e6d1
commit a2747838bd
9 changed files with 60 additions and 82 deletions

View file

@ -223,13 +223,10 @@ pick which images were wanting to print out. Were specifying
(for the new CIRA products) and the **three channels** for the RBG
composites.
.. container:: alert-info
| Tip:
| More information could be gathered by looking at all the available
location names (sectors), identifiers (entities), and parameters
(channels). To see those run the following lines of code after the
dataType has been set to satellite on the request object:
**Tip**: More information could be gathered by looking at all the
available location names (sectors), identifiers (entities), and
parameters (channels). To see those run the following lines of code
after the dataType has been set to satellite on the request object:
::
@ -263,11 +260,8 @@ Here we define a folder for where the satellite images will be written
to. The default directory is a new folder called output that lives
whereever this notebook lives.
.. container:: alert-info
| Tip:
| If you specify the fully qualified path, it will no longer depend
on where this notebook is located. For example (for a Mac):
**Tip**: If you specify the fully qualified path, it will no longer
depend on where this notebook is located. For example (for a Mac):
::

View file

@ -562,11 +562,9 @@ Set a parameter, from the output above and take a look at what “levels”
are available for the data set youre looking at using
`DataAccessLayer.getAvailableLevels(request) <http://unidata.github.io/python-awips/api/DataAccessLayer.html#awips.dataaccess.DataAccessLayer.getAvailableLevels>`__.
.. container:: alert-warning
Warning: Not all datasets support levels. If you are trying this with
another dataset and run into an exception (error), its most likely
because levels are not supported for that data type.
**Warning**: Not all datasets support levels. If you are trying this
with another dataset and run into an exception (error), its most
likely because levels are not supported for that data type.
.. code:: ipython3
@ -961,9 +959,7 @@ data were working with, well either use
or
`DataAccessLayer.getGeometryData() <http://unidata.github.io/python-awips/api/DataAccessLayer.html#awips.dataaccess.DataAccessLayer.getGeometryData>`__
.. container:: alert-info
Note: We have more, detailed notebooks about how analyze and
**Note**: We have more, detailed notebooks about how analyze and
visualize the data once you have what you want.
.. code:: ipython3

View file

@ -101,10 +101,8 @@ in meters), respectively.
Models produce many different time variants during their runs, so lets
limit the data to the most recent time and forecast run.
.. container:: alert-info
Note: You can play around with different times and forecast runs to
see the differences.
**Note**: You can play around with different times and forecast runs
to see the differences.
.. code:: ipython3
@ -186,9 +184,7 @@ to create a colorized plot. We use our **make_map** function to create a
subplot and then we create a color scale (cs) and colorbar (cbar) with a
label for our plot.
.. container:: alert-info
Note: You may see a warning appear with a red background, this is
**Note**: You may see a warning appear with a red background, this is
okay, and will go away with subsequent runs of the cell.
.. code:: ipython3

View file

@ -124,11 +124,11 @@ Shapely geometries and can be easily plotted by many Python packages.
which can be used to spatially select map resources for any column of
type geometry.
.. container:: alert-info
..
::
<b>Tip:</b> Note the geometry definition of <code>the_geom</code> for each data type, which can be <b>Point</b>, <b>MultiPolygon</b>, or <b>MultiLineString</b>.
**Tip**: Note the geometry definition of ``the_geom`` for each data
type, which can be **Point**, **MultiPolygon**, or
**MultiLineString**.
Here well be using Boulder (BOU) as our example for plotting the County
Warning Area (CWA). Well query our EDEX server to get all counties in
@ -283,11 +283,8 @@ request interstate geometries which fall inside the buffered boundary.
Request the city table based using the **envelope** attribute and filter
by population and progressive disclosure level.
.. container:: alert-warning
::
<b>Warning:</b> the <code>prog_disc</code> field is not entirely understood and values appear to change significantly depending on WFO site.
**Warning**: The ``prog_disc`` field is not entirely understood and
values appear to change significantly depending on WFO site.
.. code:: ipython3
@ -507,8 +504,9 @@ to download and render for large (CONUS) maps.
request.setLocationNames('BOU')
request.addIdentifier('cwa', 'BOU')
See the Maps Database Reference Page for available database tables,
column names, and types.
See the `Maps Database Reference
Page <http://unidata.github.io/awips2/python/maps-database/#mapdatacw>`__
for available database tables, column names, and types.
`Top <https://unidata.github.io/python-awips/examples/generated/Map_Resources_and_Topography.html>`__

View file

@ -394,15 +394,12 @@ pick which images were wanting to print out. Were specifying
<strong>ECONUS</strong> (for East CONUS), <strong>CLDSNOW</strong>, <strong>DBRDUST</strong>, and <strong>GEOCOLR</strong>
(for the new CIRA products) and the <strong>three channels</strong> for the RBG
composites.</p>
<div class="alert-info docutils container">
<div class="line-block">
<div class="line">Tip:</div>
<div class="line">More information could be gathered by looking at all the available
location names (sectors), identifiers (entities), and parameters
(channels). To see those run the following lines of code after the
dataType has been set to satellite on the request object:</div>
</div>
</div>
<blockquote>
<div><p><strong>Tip</strong>: More information could be gathered by looking at all the
available location names (sectors), identifiers (entities), and
parameters (channels). To see those run the following lines of code
after the dataType has been set to satellite on the request object:</p>
</div></blockquote>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">## Print Available Location Names</span>
<span class="nb">print</span><span class="p">((</span><span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getAvailableLocationNames</span><span class="p">(</span><span class="n">request</span><span class="p">))</span>
@ -432,13 +429,10 @@ dataType has been set to satellite on the request object:</div>
<p>Here we define a folder for where the satellite images will be written
to. The default directory is a new folder called output that lives
whereever this notebook lives.</p>
<div class="alert-info docutils container">
<div class="line-block">
<div class="line">Tip:</div>
<div class="line">If you specify the fully qualified path, it will no longer depend
on where this notebook is located. For example (for a Mac):</div>
</div>
</div>
<blockquote>
<div><p><strong>Tip</strong>: If you specify the fully qualified path, it will no longer
depend on where this notebook is located. For example (for a Mac):</p>
</div></blockquote>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">outputDir</span> <span class="o">=</span> <span class="s1">&#39;/Users/scarter/test_dir/output/&#39;</span>
</pre></div>
</div>

View file

@ -713,11 +713,11 @@ array:</p>
<p>Set a parameter, from the output above and take a look at what “levels”
are available for the data set youre looking at using
<a class="reference external" href="http://unidata.github.io/python-awips/api/DataAccessLayer.html#awips.dataaccess.DataAccessLayer.getAvailableLevels">DataAccessLayer.getAvailableLevels(request)</a>.</p>
<div class="alert-warning docutils container">
<p>Warning: Not all datasets support levels. If you are trying this with
another dataset and run into an exception (error), its most likely
because levels are not supported for that data type.</p>
</div>
<blockquote>
<div><p><strong>Warning</strong>: Not all datasets support levels. If you are trying this
with another dataset and run into an exception (error), its most
likely because levels are not supported for that data type.</p>
</div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># For grid data we&#39;ll use the temperature parameter (&quot;T&quot;)</span>
<span class="n">grid_request</span><span class="o">.</span><span class="n">setParameters</span><span class="p">(</span><span class="s2">&quot;T&quot;</span><span class="p">)</span>
<span class="n">grid_levels</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getAvailableLevels</span><span class="p">(</span><span class="n">grid_request</span><span class="p">)</span>
@ -1086,10 +1086,10 @@ data were working with, well either use
<a class="reference external" href="http://unidata.github.io/python-awips/api/DataAccessLayer.html#awips.dataaccess.DataAccessLayer.getGridData">DataAccessLayer.getGridData()</a>
or
<a class="reference external" href="http://unidata.github.io/python-awips/api/DataAccessLayer.html#awips.dataaccess.DataAccessLayer.getGeometryData">DataAccessLayer.getGeometryData()</a></p>
<div class="alert-info docutils container">
<p>Note: We have more, detailed notebooks about how analyze and
<blockquote>
<div><p><strong>Note</strong>: We have more, detailed notebooks about how analyze and
visualize the data once you have what you want.</p>
</div>
</div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1">## Grid Data</span>
<span class="n">grid_response</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getGridData</span><span class="p">(</span><span class="n">grid_request</span><span class="p">,</span> <span class="p">[</span><span class="n">grid_fcstRun</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]])</span>
<span class="k">for</span> <span class="n">grid</span> <span class="ow">in</span> <span class="n">grid_response</span><span class="p">:</span>

View file

@ -283,10 +283,10 @@ in meters), respectively.</p>
<h3>3 Limit Results Based on Time<a class="headerlink" href="#limit-results-based-on-time" title="Permalink to this headline"></a></h3>
<p>Models produce many different time variants during their runs, so lets
limit the data to the most recent time and forecast run.</p>
<div class="alert-info docutils container">
<p>Note: You can play around with different times and forecast runs to
see the differences.</p>
</div>
<blockquote>
<div><p><strong>Note</strong>: You can play around with different times and forecast runs
to see the differences.</p>
</div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">cycles</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getAvailableTimes</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">times</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getAvailableTimes</span><span class="p">(</span><span class="n">request</span><span class="p">)</span>
<span class="n">fcstRun</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">getForecastRun</span><span class="p">(</span><span class="n">cycles</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">times</span><span class="p">)</span>
@ -353,10 +353,10 @@ understandable.</p>
to create a colorized plot. We use our <strong>make_map</strong> function to create a
subplot and then we create a color scale (cs) and colorbar (cbar) with a
label for our plot.</p>
<div class="alert-info docutils container">
<p>Note: You may see a warning appear with a red background, this is
<blockquote>
<div><p><strong>Note</strong>: You may see a warning appear with a red background, this is
okay, and will go away with subsequent runs of the cell.</p>
</div>
</div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">cmap</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">get_cmap</span><span class="p">(</span><span class="s1">&#39;rainbow&#39;</span><span class="p">)</span>
<span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">make_map</span><span class="p">(</span><span class="n">bbox</span><span class="o">=</span><span class="n">bbox</span><span class="p">)</span>
<span class="n">cs</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">pcolormesh</span><span class="p">(</span><span class="n">lons</span><span class="p">,</span> <span class="n">lats</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">cmap</span><span class="o">=</span><span class="n">cmap</span><span class="p">)</span>

View file

@ -312,11 +312,11 @@ Shapely geometries and can be easily plotted by many Python packages.</p>
which can be used to spatially select map resources for any column of
type geometry.</p></li>
</ul>
<div class="alert-info docutils container">
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">b</span><span class="o">&gt;</span><span class="n">Tip</span><span class="p">:</span><span class="o">&lt;/</span><span class="n">b</span><span class="o">&gt;</span> <span class="n">Note</span> <span class="n">the</span> <span class="n">geometry</span> <span class="n">definition</span> <span class="n">of</span> <span class="o">&lt;</span><span class="n">code</span><span class="o">&gt;</span><span class="n">the_geom</span><span class="o">&lt;/</span><span class="n">code</span><span class="o">&gt;</span> <span class="k">for</span> <span class="n">each</span> <span class="n">data</span> <span class="nb">type</span><span class="p">,</span> <span class="n">which</span> <span class="n">can</span> <span class="n">be</span> <span class="o">&lt;</span><span class="n">b</span><span class="o">&gt;</span><span class="n">Point</span><span class="o">&lt;/</span><span class="n">b</span><span class="o">&gt;</span><span class="p">,</span> <span class="o">&lt;</span><span class="n">b</span><span class="o">&gt;</span><span class="n">MultiPolygon</span><span class="o">&lt;/</span><span class="n">b</span><span class="o">&gt;</span><span class="p">,</span> <span class="ow">or</span> <span class="o">&lt;</span><span class="n">b</span><span class="o">&gt;</span><span class="n">MultiLineString</span><span class="o">&lt;/</span><span class="n">b</span><span class="o">&gt;.</span>
</pre></div>
</div>
</div>
<blockquote>
<div><p><strong>Tip</strong>: Note the geometry definition of <code class="docutils literal notranslate"><span class="pre">the_geom</span></code> for each data
type, which can be <strong>Point</strong>, <strong>MultiPolygon</strong>, or
<strong>MultiLineString</strong>.</p>
</div></blockquote>
<p>Here well be using Boulder (BOU) as our example for plotting the County
Warning Area (CWA). Well query our EDEX server to get all counties in
the CWA for BOU, and then plot those counties along withe the state
@ -432,11 +432,10 @@ request interstate geometries which fall inside the buffered boundary.</p>
<h3>7 Draw Nearby Cities<a class="headerlink" href="#draw-nearby-cities" title="Permalink to this headline"></a></h3>
<p>Request the city table based using the <strong>envelope</strong> attribute and filter
by population and progressive disclosure level.</p>
<div class="alert-warning docutils container">
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">b</span><span class="o">&gt;</span><span class="ne">Warning</span><span class="p">:</span><span class="o">&lt;/</span><span class="n">b</span><span class="o">&gt;</span> <span class="n">the</span> <span class="o">&lt;</span><span class="n">code</span><span class="o">&gt;</span><span class="n">prog_disc</span><span class="o">&lt;/</span><span class="n">code</span><span class="o">&gt;</span> <span class="n">field</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">entirely</span> <span class="n">understood</span> <span class="ow">and</span> <span class="n">values</span> <span class="n">appear</span> <span class="n">to</span> <span class="n">change</span> <span class="n">significantly</span> <span class="n">depending</span> <span class="n">on</span> <span class="n">WFO</span> <span class="n">site</span><span class="o">.</span>
</pre></div>
</div>
</div>
<blockquote>
<div><p><strong>Warning</strong>: The <code class="docutils literal notranslate"><span class="pre">prog_disc</span></code> field is not entirely understood and
values appear to change significantly depending on WFO site.</p>
</div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Define the request for the city query</span>
<span class="n">request</span> <span class="o">=</span> <span class="n">DataAccessLayer</span><span class="o">.</span><span class="n">newDataRequest</span><span class="p">(</span><span class="s1">&#39;maps&#39;</span><span class="p">,</span> <span class="n">envelope</span><span class="o">=</span><span class="n">envelope</span><span class="p">)</span>
<span class="n">request</span><span class="o">.</span><span class="n">addIdentifier</span><span class="p">(</span><span class="s1">&#39;table&#39;</span><span class="p">,</span> <span class="s1">&#39;mapdata.city&#39;</span><span class="p">)</span>
@ -603,8 +602,9 @@ watch area (CWA)</p>
</div>
</li>
</ul>
<p>See the Maps Database Reference Page for available database tables,
column names, and types.</p>
<p>See the <a class="reference external" href="http://unidata.github.io/awips2/python/maps-database/#mapdatacw">Maps Database Reference
Page</a>
for available database tables, column names, and types.</p>
<p><a class="reference external" href="https://unidata.github.io/python-awips/examples/generated/Map_Resources_and_Topography.html">Top</a></p>
<hr class="docutils" />
</div>

File diff suppressed because one or more lines are too long