wififormatting to markdown

This commit is contained in:
mjames-upc 2015-06-29 15:43:20 -06:00
parent 14a1ace2da
commit 3b16d3a077
10 changed files with 93 additions and 93 deletions

View file

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

View file

@ -1,5 +1,5 @@
{{{ ```
#!python #!python
from ufpy.dataaccess import DataAccessLayer from ufpy.dataaccess import DataAccessLayer
import numpy as np import numpy as np
@ -36,13 +36,13 @@ print 'Parameter we requested is',data.getParameter()
print data.getRawData() print data.getRawData()
}}} ```
{{{ ```
['OUN'] ['OUN']
}}} ```
{{{ ```
May 03 15 18:00:00 GMT (May 03 15 18:00:00 , May 03 15 21:00:00 ) 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 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 ) May 04 15 00:00:00 GMT (May 04 15 00:00:00 , May 04 15 08:00:00 )
@ -68,17 +68,17 @@ May 11 15 00:00:00 GMT (May 11 15 00:00:00 , May 11 15 12:00:00 )
May 11 15 12:00:00 GMT (May 11 15 12:00:00 , May 12 15 00:00:00 ) May 11 15 12:00:00 GMT (May 11 15 12:00:00 , May 12 15 00:00:00 )
May 12 15 00:00:00 GMT (May 12 15 00:00:00 , May 12 15 12:00:00 ) 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 ) May 12 15 12:00:00 GMT (May 12 15 12:00:00 , May 12 15 13:00:00 )
}}} ```
{{{ ```
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x26f9690>] [<ufpy.dataaccess.PyGridData.PyGridData object at 0x26f9690>]
}}} ```
{{{ ```
Units are in % Units are in %
}}} ```
{{{ ```
[[-101.30716705 -101.27905273 -101.25093842 ..., -95.05664062 [[-101.30716705 -101.27905273 -101.25093842 ..., -95.05664062
-95.02846527 -95.00028992] -95.02846527 -95.00028992]
[-101.3058548 -101.27774811 -101.24964142 ..., -95.056633 -95.02845764 [-101.3058548 -101.27774811 -101.24964142 ..., -95.056633 -95.02845764
@ -92,13 +92,13 @@ Units are in %
-95.02720642 -95.00027466] -95.02720642 -95.00027466]
[-101.02697754 -101.00010681 -100.97324371 ..., -95.05412292 [-101.02697754 -101.00010681 -100.97324371 ..., -95.05412292
-95.02719879 -95.00027466]] -95.02719879 -95.00027466]]
}}} ```
{{{ ```
Parameter we requested is PoP Parameter we requested is PoP
}}} ```
{{{ ```
[[ 8. 8. 7. ..., 7. 7. 7.] [[ 8. 8. 7. ..., 7. 7. 7.]
[ 8. 7. 7. ..., 7. 7. 7.] [ 8. 7. 7. ..., 7. 7. 7.]
[ 7. 7. 7. ..., 7. 7. 7.] [ 7. 7. 7. ..., 7. 7. 7.]
@ -106,4 +106,4 @@ Parameter we requested is PoP
[ 3. 3. 3. ..., 2. 2. 2.] [ 3. 3. 3. ..., 2. 2. 2.]
[ 3. 3. 3. ..., 2. 2. 2.] [ 3. 3. 3. ..., 2. 2. 2.]
[ 3. 3. 3. ..., 2. 2. 2.]] [ 3. 3. 3. ..., 2. 2. 2.]]
}}} ```

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 from ufpy.dataaccess import DataAccessLayer
@ -16,13 +16,13 @@ request.setDatatype("grid")
available_grids = DataAccessLayer.getAvailableLocationNames(request) available_grids = DataAccessLayer.getAvailableLocationNames(request)
for grid in available_grids: for grid in available_grids:
print grid print grid
}}} ```
And the output of the print grid statement would look something like this: And the output of the print grid statement would look something like this:
{{{ ```
#!div style="font-size: 90%;font-style:italic" #!div style="font-size: 90%;font-style:italic"
{{{ ```
RUC236 RUC236
SREF216 SREF216
ENSEMBLE ENSEMBLE
@ -47,5 +47,5 @@ QPE-XNAV-ALR
AK-RTMA3 AK-RTMA3
GFS212 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

@ -21,25 +21,25 @@ lon,lat = data.getLatLonCoords()
print 'Parameter we requested is',data.getParameter() print 'Parameter we requested is',data.getParameter()
print data.getRawData() print data.getRawData()
}}} ```
{{{ ```
May 04 15 18:45:19 GMT May 04 15 18:45:19 GMT
}}} ```
{{{ ```
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x157d550>] [<ufpy.dataaccess.PyGridData.PyGridData object at 0x157d550>]
}}} ```
{{{ ```
Units are in None Units are in None
}}} ```
{{{ ```
Parameter we requested is Imager 6.7-6.5 micron IR (WV) Parameter we requested is Imager 6.7-6.5 micron IR (WV)
}}} ```
{{{ ```
[[ 186. 185. 186. ..., 180. 181. 181.] [[ 186. 185. 186. ..., 180. 181. 181.]
[ 186. 185. 186. ..., 180. 181. 181.] [ 186. 185. 186. ..., 180. 181. 181.]
[ 186. 186. 185. ..., 180. 181. 181.] [ 186. 186. 185. ..., 180. 181. 181.]
@ -47,4 +47,4 @@ Parameter we requested is Imager 6.7-6.5 micron IR (WV)
[ 0. 0. 0. ..., 145. 145. 145.] [ 0. 0. 0. ..., 145. 145. 145.]
[ 0. 0. 0. ..., 145. 145. 145.] [ 0. 0. 0. ..., 145. 145. 145.]
[ 0. 0. 0. ..., 145. 145. 144.]] [ 0. 0. 0. ..., 145. 145. 144.]]
}}} ```

View file

@ -1,4 +1,4 @@
{{{ ```
#!python #!python
#!/awips2/python/bin/python #!/awips2/python/bin/python
from ufpy.dataaccess import DataAccessLayer from ufpy.dataaccess import DataAccessLayer
@ -43,17 +43,17 @@ for shape in c:
print 'Parameters requested are',shape.getParameters() print 'Parameters requested are',shape.getParameters()
print 'state column is',shape.getString('state') print 'state column is',shape.getString('state')
print 'fips column is',shape.getString('fips') print 'fips column is',shape.getString('fips')
}}} ```
{{{ ```
['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'] ['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']
}}} ```
{{{ ```
[<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4410>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4510>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4550>] [<ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4410>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4510>, <ufpy.dataaccess.PyGeometryData.PyGeometryData object at 0x1ec4550>]
}}} ```
{{{ ```
Location name is Texas Location name is Texas
Parameters requested are ['state', 'fips'] Parameters requested are ['state', 'fips']
state column is TX state column is TX
@ -66,4 +66,4 @@ Location name is Oklahoma
Parameters requested are ['state', 'fips'] Parameters requested are ['state', 'fips']
state column is OK state column is OK
fips column is 40 fips column is 40
}}} ```

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. 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. # Getting the Model Run Date/Times and put them into a sorted dictionary, with latest run first.
ModelRunDict = dict() ModelRunDict = dict()
@ -29,5 +29,5 @@ for ModelRun in ModelRunDict.keys():
for step in ModelRunDict[ModelRun]: for step in ModelRunDict[ModelRun]:
print "Forecast Step: {} Hours".format(int(step)/3600) print "Forecast Step: {} Hours".format(int(step)/3600)
}}} ```

View file

@ -2,7 +2,7 @@
==== You could do this same type of request using any other geometry. For example, you could query the states table and only pull out model data over a particular state. You can also create your own Shapely geometry from scratch and use it to define your envelope. ==== ==== You could do this same type of request using any other geometry. For example, you could query the states table and only pull out model data over a particular state. You can also create your own Shapely geometry from scratch and use it to define your envelope. ====
{{{ ```
#!python #!python
#!/awips2/python/bin/python #!/awips2/python/bin/python
from ufpy.dataaccess import DataAccessLayer from ufpy.dataaccess import DataAccessLayer
@ -55,24 +55,24 @@ response = DataAccessLayer.getGridData(request, times=[t[-1]])
data = response[0] data = response[0]
coords = data.getLatLonCoords() coords = data.getLatLonCoords()
print coords[0].shape,coords[1].shape print coords[0].shape,coords[1].shape
}}} ```
{{{ ```
(175, 175) (175, 175) (175, 175) (175, 175)
}}} ```
{{{ ```
OUN Envelope is POLYGON ((-100.0485000609999702 33.3954124450000336, -95.6716995239999619 33.3954124450000336, -95.6716995239999619 37.0016136170000323, -100.0485000609999702 37.0016136170000323, -100.0485000609999702 33.3954124450000336)) OUN Envelope is POLYGON ((-100.0485000609999702 33.3954124450000336, -95.6716995239999619 33.3954124450000336, -95.6716995239999619 37.0016136170000323, -100.0485000609999702 37.0016136170000323, -100.0485000609999702 33.3954124450000336))
}}} ```
{{{ ```
(32, 33) (32, 33) (32, 33) (32, 33)
}}} ```
{{{ ```
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)) 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))
}}} ```
{{{ ```
(39, 41) (39, 41) (39, 41) (39, 41)
}}} ```

View file

@ -1,5 +1,5 @@
{{{ ```
#!python #!python
import numpy as np import numpy as np
from ufpy.dataaccess import DataAccessLayer from ufpy.dataaccess import DataAccessLayer
@ -44,20 +44,20 @@ print lon
print 'Parameter we requested is', data.getParameter() print 'Parameter we requested is', data.getParameter()
#And finally lets get the data itself. This returns an array of the raw data #And finally lets get the data itself. This returns an array of the raw data
print data.getRawData() print data.getRawData()
}}} ```
Our response object is a list of !PyGridData objects Our response object is a list of !PyGridData objects
{{{ ```
[<ufpy.dataaccess.PyGridData.PyGridData object at 0x1d39910>] [<ufpy.dataaccess.PyGridData.PyGridData object at 0x1d39910>]
}}} ```
Output of our print statement getting the units Output of our print statement getting the units
{{{ ```
Units are in K Units are in K
}}} ```
print lon print lon
{{{ ```
[[-118.09392548 -117.93661499 -117.77923584 ..., -90.46847534 [[-118.09392548 -117.93661499 -117.77923584 ..., -90.46847534
-90.30672455 -90.14498901] -90.30672455 -90.14498901]
[-118.06690216 -117.90976715 -117.75257111 ..., -90.47387695 [-118.06690216 -117.90976715 -117.75257111 ..., -90.47387695
@ -71,15 +71,15 @@ print lon
-91.10997772 -90.97589111] -91.10997772 -90.97589111]
[-114.17823792 -114.04681396 -113.91535187 ..., -91.24778748 [-114.17823792 -114.04681396 -113.91535187 ..., -91.24778748
-91.11382294 -90.97986603]] -91.11382294 -90.97986603]]
}}} ```
Our print statement from getParameter() Our print statement from getParameter()
{{{ ```
Parameter we requested is T Parameter we requested is T
}}} ```
And finally our call to getRawData() gets a numpy array of the temperature values And finally our call to getRawData() gets a numpy array of the temperature values
{{{ ```
[[ 283.88305664 284.50805664 285.25805664 ..., 280.88305664 [[ 283.88305664 284.50805664 285.25805664 ..., 280.88305664
280.75805664 280.63305664] 280.75805664 280.63305664]
[ 284.38305664 285.00805664 285.75805664 ..., 281.00805664 [ 284.38305664 285.00805664 285.75805664 ..., 281.00805664
@ -93,5 +93,5 @@ And finally our call to getRawData() gets a numpy array of the temperature value
287.00805664 287.13305664] 287.00805664 287.13305664]
[ 285.13305664 285.50805664 285.75805664 ..., 287.25805664 [ 285.13305664 285.50805664 285.75805664 ..., 287.25805664
287.25805664 287.25805664]] 287.25805664 287.25805664]]
}}} ```