github markdown code formatting

This commit is contained in:
mjames-upc 2015-06-29 15:51:41 -06:00
parent 284d7c1da1
commit 93741708e9
10 changed files with 47 additions and 51 deletions

View file

@ -1,4 +1,4 @@
```
```python
#!python
from ufpy.dataaccess import DataAccessLayer
from shapely.geometry import Polygon,Point
@ -57,24 +57,24 @@ for state in state_intersect_polygon:
print "Polygon intersects the state of",state.getString('name')
```
```
```python
Requesting all states from DAF
DAF query to get all states took 21.915029 seconds
```
```
```python
Filter state objects to one that contains polygon took 0.382097 seconds
[<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x2bebdd0>]
Polygon is in the state of Oklahoma
```
```
```python
Filter state objects to one that contains point took 0.2028 seconds
[<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x2beb9d0>]
Point is in the state of Iowa
```
```
```python
Filter state objects to the ones that intersect polygon took 0.4032 seconds
[<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x2beb610>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x2bebdd0>]
Polygon intersects the state of Texas

View file

@ -1,5 +1,4 @@
```
```python
#!python
from ufpy.dataaccess import DataAccessLayer
import numpy as np
@ -38,11 +37,11 @@ print data.getRawData()
```
```
```python
['OUN']
```
```
```python
May 03 15 18:00:00 GMT (May 03 15 18:00:00 , May 03 15 21:00:00 )
May 03 15 21:00:00 GMT (May 03 15 21:00:00 , May 04 15 00:00:00 )
May 04 15 00:00:00 GMT (May 04 15 00:00:00 , May 04 15 08:00:00 )
@ -70,15 +69,15 @@ May 12 15 00:00:00 GMT (May 12 15 00:00:00 , May 12 15 12:00:00 )
May 12 15 12:00:00 GMT (May 12 15 12:00:00 , May 12 15 13:00:00 )
```
```
```python
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x26f9690>]
```
```
```python
Units are in %
```
```
```python
[[-101.30716705 -101.27905273 -101.25093842 ..., -95.05664062
-95.02846527 -95.00028992]
[-101.3058548 -101.27774811 -101.24964142 ..., -95.056633 -95.02845764
@ -94,11 +93,11 @@ Units are in %
-95.02719879 -95.00027466]]
```
```
```python
Parameter we requested is PoP
```
```
```python
[[ 8. 8. 7. ..., 7. 7. 7.]
[ 8. 7. 7. ..., 7. 7. 7.]
[ 7. 7. 7. ..., 7. 7. 7.]

View file

@ -1,6 +1,6 @@
== Using the DAF to get all of the available grids ==
#### Using the DAF to get all of the available grids
```
```python
#!python
from ufpy.dataaccess import DataAccessLayer
@ -20,9 +20,7 @@ for grid in available_grids:
And the output of the print grid statement would look something like this:
```
#!div style="font-size: 90%;font-style:italic"
```
```python
RUC236
SREF216
ENSEMBLE
@ -48,4 +46,3 @@ AK-RTMA3
GFS212
...
```
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
```
```python
#!/awips2/python/bin/python
from ufpy.dataaccess import DataAccessLayer
import numpy as np
@ -22,23 +22,23 @@ print 'Parameter we requested is',data.getParameter()
print data.getRawData()
```
```
```python
May 04 15 18:45:19 GMT
```
```
```python
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x157d550>]
```
```
```python
Units are in None
```
```
```python
Parameter we requested is Imager 6.7-6.5 micron IR (WV)
```
```
```python
[[ 186. 185. 186. ..., 180. 181. 181.]
[ 186. 185. 186. ..., 180. 181. 181.]
[ 186. 186. 185. ..., 180. 181. 181.]

View file

@ -1,4 +1,4 @@
```
```python
#!python
#!/awips2/python/bin/python
from ufpy.dataaccess import DataAccessLayer
@ -45,15 +45,15 @@ for shape in c:
print 'fips column is',shape.getString('fips')
```
```
```python
['Alabama', 'Alaska', 'American Samoa', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District of Columbia', 'Florida', 'Georgia', 'Guam', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Puerto Rico', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virgin Islands', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']
```
```
```python
[<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4410>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4510>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4550>]
```
```
```python
Location name is Texas
Parameters requested are ['state', 'fips']
state column is TX

View file

@ -4,7 +4,7 @@ Apr 2, 2015 - Virgil Middendorf
The code below creates a Python Dictionary called ModelRunDict, where the keys are the available Model Run date/times (example key: Apr 02 15 06:00:00). Associated with each key, is a list array of Forecast Steps (in seconds after initialization) available for each Model Run.
```
```python
#!python
# Getting the Model Run Date/Times and put them into a sorted dictionary, with latest run first.
ModelRunDict = dict()

View file

@ -57,22 +57,22 @@ coords = data.getLatLonCoords()
print coords[0].shape,coords[1].shape
```
```
```python
(175, 175) (175, 175)
```
```
```python
OUN Envelope is POLYGON ((-100.0485000609999702 33.3954124450000336, -95.6716995239999619 33.3954124450000336, -95.6716995239999619 37.0016136170000323, -100.0485000609999702 37.0016136170000323, -100.0485000609999702 33.3954124450000336))
```
```
```python
(32, 33) (32, 33)
```
```
```python
OUN Envelope with buffer is POLYGON ((-100.5485000609999702 32.8954672430463262, -95.1716995239999619 32.8954672430463262, -95.1716995239999619 37.5016136170000323, -100.5485000609999702 37.5016136170000323, -100.5485000609999702 32.8954672430463262))
```
```
```python
(39, 41) (39, 41)
```

View file

@ -1,5 +1,4 @@
```
```python
#!python
import numpy as np
from ufpy.dataaccess import DataAccessLayer
@ -47,17 +46,18 @@ print data.getRawData()
```
Our response object is a list of !PyGridData objects
```
```python
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x1d39910>]
```
Output of our print statement getting the units
```
```python
Units are in K
```
print lon
```
```python
[[-118.09392548 -117.93661499 -117.77923584 ..., -90.46847534
-90.30672455 -90.14498901]
[-118.06690216 -117.90976715 -117.75257111 ..., -90.47387695
@ -74,12 +74,12 @@ print lon
```
Our print statement from getParameter()
```
```python
Parameter we requested is T
```
And finally our call to getRawData() gets a numpy array of the temperature values
```
```python
[[ 283.88305664 284.50805664 285.25805664 ..., 280.88305664
280.75805664 280.63305664]
[ 284.38305664 285.00805664 285.75805664 ..., 281.00805664