Skip to content

Commit

Permalink
0.2v
Browse files Browse the repository at this point in the history
  • Loading branch information
palexandremello committed May 5, 2018
1 parent 78eb725 commit 8465c27
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# goes-py 0.1.3v
# goes-py 0.2v

It's a free Python package to acess and get the dataset from GOES satellite next generation on Amazon Web Service(AWS)

Expand Down
2 changes: 1 addition & 1 deletion goespy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
__author__ = "Paulo Alexandre S. Mello"
__email__ = "[email protected]"
__date__ = "2018-03-22"
__version__ = '0.1'
__version__ = '0.2'

utils.bannerDisplay(__version__)
19 changes: 18 additions & 1 deletion goespy/checkData.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def createPathGoesData(bucket, year, month, day, product, hour, channel=None):
'''
satGoesPath = bucket.partition('noaa-')[2]

home = str(Path.home())
home = checkVersion()
if channel == None:

if not os.path.exists("{0}/{1}/{2}/{3}/{4}/{5}/{6}/".format(
Expand Down Expand Up @@ -82,3 +82,20 @@ def checkSize(path, singleFile, singleSize):
return True
else:
return False


def checkVersion():
## Function necessary to check if your python version is < 2.7 or > 2.7
### if your python is more than 2.7 the function will default uses the pathlib function to get your home directory
### but if you use the python version 2.7, so the function will uses the os.path to get your home directory
import sys
from pathlib import Path
from os.path import expanduser
home = ''
if (sys.hexversion <= 0x02060000):
home = str(Path.home())

else:
home = expanduser("~")

return home
21 changes: 21 additions & 0 deletions goespy/goesteste.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from goespy.Downloader import ABI_Downloader
from goespy.checkData import createPathGoesData
import datetime as dt
utcDateTime = dt.datetime.utcnow()

year = utcDateTime.strftime("%Y")

month = utcDateTime.strftime("%m")

day = utcDateTime.strftime("%d")

hour = utcDateTime.strftime("%H")

channel = ["C13"]
hour = '00'
product = 'ABI-L2-CMIPF'

Bucket = 'noaa-goes16'
Abi = ABI_Downloader('noaa-goes16',year,month,day,hour,product,channel)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup
setup(
name='goespy',
version='0.1.2',
version='0.2',
url='https://github.com/palexandremello/goes-py',
license='BSD 2-Clause License',
author='Paulo Alexandre Mello',
Expand Down

0 comments on commit 8465c27

Please sign in to comment.