Skip to content

Commit

Permalink
Tweak noaa forecast params
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Mar 25, 2021
1 parent e0634e9 commit 4713e83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/fetch_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import surfpy

if __name__=='__main__':
ri_wave_location = surfpy.Location(41.4, -71.45, altitude=30.0, name='Rhode Island Coast')
ri_wave_location = surfpy.Location(41.35, -71.4, altitude=30.0, name='Rhode Island Coast')
ri_wave_location.depth = 30.0
ri_wave_location.angle = 145.0
ri_wave_location.slope = 0.02
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup

setup(name='surfpy',
version='0.95.0',
version='0.95.1',
description='Wave and weather tools written in pure python',
url='https://github.com/mpiannucci/surfpy',
author='Matthew Iannucci',
Expand Down
4 changes: 2 additions & 2 deletions surfpy/noaamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ def parse_grib_data(self, location, raw_data, data={}):
# Parse all of the variables into the map
for message in messages:
var = message.shortName

if message.has_key('level'):
if message.level > 1:
var += '_' + str(message.level)

tolerence = 0.1
tolerence = self.location_resolution
rawvalue, lats, lons = message.data(lat1=location.latitude-tolerence,lat2=location.latitude+tolerence,
lon1=location.absolute_longitude-tolerence,lon2=location.absolute_longitude+tolerence)
value = rawvalue.mean().item()
Expand Down

0 comments on commit 4713e83

Please sign in to comment.