Skip to content

Commit 5f7dc3d

Browse files
committed
updated links in README and tests
1 parent f557c6d commit 5f7dc3d

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# ClearSkyPy
2-
[![Build Status](https://travis-ci.org/BXYMartin/Python-ClearSkyPy.svg?branch=master)](https://travis-ci.org/BXYMartin/Python-ClearSkyPy)
3-
[![Latest Version](https://img.shields.io/github/v/release/bxymartin/python-clearskypy)](https://test.pypi.org/project/ClearSkyPy/)
1+
# IrradPy
2+
[![Build Status](https://travis-ci.org/BXYMartin/Python-irradpy.svg?branch=master)](https://travis-ci.org/BXYMartin/Python-irradpy)
3+
[![Latest Version](https://img.shields.io/github/v/release/bxymartin/python-irradpy)](https://test.pypi.org/project/irradpy/)
44

55
Python script to download data from gesdisc.eosdis.nasa.gov for Clear Sky Model, extract variables from the MERRA-2 reanalysis database and model of clear-sky irradiance.
66

@@ -30,26 +30,26 @@ Python script to download data from gesdisc.eosdis.nasa.gov for Clear Sky Model,
3030
#### Use inside Python Script
3131
``` python
3232
# Linux and Unix Users
33-
import clearskypy
33+
import irradpy
3434
# Run Downloader
35-
clearskypy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"})
35+
irradpy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"})
3636
# Run Model
37-
clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir).REST2v5()
38-
clearskypy.model.ClearSkyMAC2(latitudes, longitudes, elevations, time, dataset_dir).MAC2()
37+
irradpy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir).REST2v5()
38+
irradpy.model.ClearSkyMAC2(latitudes, longitudes, elevations, time, dataset_dir).MAC2()
3939

4040

4141
# Windows Users Only:
42-
import clearskypy
42+
import irradpy
4343
import multiprocessing
4444
# Important Note: If you're using windows, make sure to wrap the function.
4545
if __name__ == "__main__":
4646
multiprocessing.freeze_support()
47-
clearskypy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"})
47+
irradpy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"})
4848

4949
# More Examples
5050

5151
# Download All Data From 2018-01-01 To 2018-01-02
52-
clearskypy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"},
52+
irradpy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"},
5353
initial_year=2018, final_year=2018,
5454
initial_month=1, final_month=1,
5555
initial_day=1, final_day=2,
@@ -62,8 +62,8 @@ clearskypy.downloader.run(auth={"uid":"USERNAME", "password": "PASSWORD"},
6262
# Run clear sky model from 2018-01-01 To 2018-01-02
6363
time_delta = 10 # minute
6464
timedef = [('2018-01-01T00:00:00', '2018-01-02T0:00:00')]
65-
time = clearskypy.model.timeseries_builder(timedef, time_delta, np.size(latitudes))
66-
clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir).REST2v5()
65+
time = irradpy.model.timeseries_builder(timedef, time_delta, np.size(latitudes))
66+
irradpy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir).REST2v5()
6767
```
6868

6969
``` python
@@ -117,7 +117,7 @@ clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, datase
117117
connection_num : Optional[int]
118118
Number of Connections for each file to be downloaded simutanously.
119119

120-
#clearskypy.model.timeseries_builder:
120+
#irradpy.model.timeseries_builder:
121121
timedef: list [(start time , end time)], optional — specify the start
122122
time(s) and end time(s) of the location(s) of interest.
123123
time_delta: integer, optional — specify the temporal resolution of the
@@ -126,7 +126,7 @@ clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, datase
126126
if timedef less than num_station, timeseries_builder will expand it
127127
for every station.
128128

129-
#clearskypy.model.clearSkyRadiation_MAC2.py && clearskypy.model.clearSkyRadiation_REST2v5.py:
129+
#irradpy.model.clearSkyRadiation_MAC2.py && irradpy.model.clearSkyRadiation_REST2v5.py:
130130

131131
latitudes: numpy.ndarray, float, compulsory — Define the latitude(s) of the
132132
location(s) of interest, size must match longitudes.
@@ -144,7 +144,7 @@ clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, datase
144144

145145
#### Run Package From Shell
146146
``` bash
147-
python -m clearskypy.downloader.socket --uid USERNAME --password PASSWORD
147+
python -m irradpy.downloader.socket --uid USERNAME --password PASSWORD
148148

149149
usage: socket.py [-h] [--collection_names VAR_NAMES]
150150
[--download_dir DOWNLOAD_DIR] [--initial_year INITIAL_YEAR]
@@ -208,7 +208,7 @@ python setup.py test
208208
#### Package
209209
```
210210
.
211-
├── clearskypy
211+
├── irradpy
212212
│   ├── __init__.py
213213
│   ├── downloader
214214
│   │   ├── __init__.py
@@ -248,5 +248,5 @@ python setup.py install
248248
```
249249
With python package:
250250
``` bash
251-
pip install -i https://test.pypi.org/simple/ ClearSkyPy
251+
pip install -i https://test.pypi.org/simple/ irradpy
252252
```

example/example_clearsky.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import clearskypy
2+
import irradpy
33
import os
44
# dependency on matplotlib >=3.1
55
import matplotlib
@@ -16,31 +16,31 @@
1616
# set some example latitudes, longitudes and elevations
1717
# latitudes range from -90 (south pole) to +90 (north pole) in degrees
1818
latitudes = np.array([[1.300341, 39.97937]])
19-
19+
2020
# longitudes range from -180 (west) through 0 at prime meridian to +180 (east)
2121
longitudes = np.array([[103.771663, 116.34653]])
22-
22+
2323
# elevations are in metres, this influences some solar elevation angles and scale height corrections
2424
elevations = np.array([[43, 53]])
2525

2626
# timedef is a list of pandas time series definition for each location defined.
2727
# Note that an individual time series can be specified per site
2828
timedef = [pd.date_range(start='2018-01-01T20:00:00', end='2018-01-02T15:00:00', freq='10T'),
2929
pd.date_range(start='2018-01-02T20:00:00', end='2018-01-03T15:00:00', freq='10T')]
30-
30+
3131
# use timeseries_builder to build time series for different station
32-
time = clearskypy.model.timeseries_builder(timedef, np.size(latitudes))
32+
time = irradpy.model.timeseries_builder(timedef, np.size(latitudes))
3333

3434
# specify where the downloaded dataset is. It is best to use the os.path.join function
3535
dataset_dir = os.path.join(os.getcwd(), 'MERRA2_data', '2018-1-1~2018-1-3 rad-slv-aer-asm [-90,-180]~[90,180]', '')
3636

3737
# build the clear-sky REST2v5 model object
38-
test_rest2 = clearskypy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir, pandas=True)
38+
test_rest2 = irradpy.model.ClearSkyREST2v5(latitudes, longitudes, elevations, time, dataset_dir, pandas=True)
3939
# run the REST2v5 clear-sky model output is a list of pandas.Dataframe for each station. col: GHI, DNI, DIF, row: time
4040
rest2_output = test_rest2.REST2v5()
4141

4242
# create the MAC2 model class object
43-
test_mac = clearskypy.model.ClearSkyMAC2(latitudes, longitudes, elevations, time, dataset_dir, pandas=True)
43+
test_mac = irradpy.model.ClearSkyMAC2(latitudes, longitudes, elevations, time, dataset_dir, pandas=True)
4444
# run the MAC2 model output is a list of pandas.Dataframe for each station col: GHI, DNI, DIF, row: time
4545
mac2_output = test_mac.MAC2()
4646

example/example_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from multiprocessing import freeze_support
2-
import clearskypy
2+
import irradpy
33
import os
44
from getpass import getpass
55

@@ -73,7 +73,7 @@ def setUp(self):
7373
}
7474

7575
def download(self):
76-
clearskypy.downloader.run(
76+
irradpy.downloader.run(
7777
auth={"uid": self.username, "password": self.password},
7878
initial_year=self.initial_year,
7979
final_year=self.final_year,

example/example_extractor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import clearskypy
2+
import irradpy
33
import os
44
# dependency on matplotlib >=3.1
55
import matplotlib
@@ -30,7 +30,7 @@
3030
pd.date_range(start='2018-01-02T20:00:00', end='2018-01-03T15:00:00', freq='10T')]
3131

3232
# use timeseries_builder to build time series for different station
33-
time = clearskypy.model.timeseries_builder(timedef, np.size(latitudes))
33+
time = irradpy.model.timeseries_builder(timedef, np.size(latitudes))
3434

3535
# specify where the downloaded dataset is. It is best to use the os.path.join function
3636
dataset_dir = os.path.join(os.getcwd(), 'MERRA2_data', '2018-1-1~2018-1-3 rad-slv-aer-asm [-90,-180]~[90,180]', '')
@@ -39,7 +39,7 @@
3939
variables = ['SWGDN', 'SWGDNCLR']
4040

4141
# extract the variable from the dataset
42-
MERRA2data = clearskypy.extractor.extractor(latitudes, longitudes, elevations, time, variables, dataset_dir, pandas=True)
42+
MERRA2data = irradpy.extractor.extractor(latitudes, longitudes, elevations, time, variables, dataset_dir, pandas=True)
4343

4444

4545
# Save the data to file, each site = new file

test/test_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from multiprocessing import freeze_support
2-
import clearskypy
2+
import irradpy
33
import unittest
44
import os
55

@@ -69,7 +69,7 @@ def setUp(self):
6969
}
7070

7171
def test_download(self):
72-
clearskypy.downloader.run(
72+
irradpy.downloader.run(
7373
auth={"uid": self.username, "password": self.password},
7474
initial_year=self.initial_year,
7575
final_year=self.final_year,

test/test_extractor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import clearskypy
2+
import irradpy
33

44

55
def test_extract_MERRA2(lats, lons, datavecs, elevs):
@@ -24,10 +24,10 @@ def test_extract_MERRA2(lats, lons, datavecs, elevs):
2424
slvpath = 'path to slv dataset'
2525
asmpath = 'path to asm dataset'
2626

27-
aer_var = clearskypy.extractor.extract_dataset(lats, lons, aerpath, aer_pool, datavecs)
28-
rad_var = clearskypy.extractor.extract_dataset(lats, lons, radpath, rad_pool, datavecs)
29-
slv_var = clearskypy.extractor.extract_dataset(lats, lons, slvpath, slv_pool, datavecs)
30-
asm_var = clearskypy.extractor.extract_dataset(lats, lons, asmpath, asm_pool, datavecs, interpolate=False)
27+
aer_var = irradpy.extractor.extract_dataset(lats, lons, aerpath, aer_pool, datavecs)
28+
rad_var = irradpy.extractor.extract_dataset(lats, lons, radpath, rad_pool, datavecs)
29+
slv_var = irradpy.extractor.extract_dataset(lats, lons, slvpath, slv_pool, datavecs)
30+
asm_var = irradpy.extractor.extract_dataset(lats, lons, asmpath, asm_pool, datavecs, interpolate=False)
3131

3232
tot_aer_ext = aer_var[1]
3333
AOD_550 = aer_var[0]
@@ -56,7 +56,7 @@ def test_extract_dataset_list():
5656
date = ['2019-01-01T12:30:00', '2019-01-04T11:45:00', '2019-01-05T01:30:00']
5757
datapathlist = ['path to dataset1', 'path to dataset2']
5858
rad_pool = ['ALBEDO']
59-
test = clearskypy.extractor.extract_dataset_list(lats, lons, datapathlist, rad_pool, date, interpolate=True)
59+
test = irradpy.extractor.extract_dataset_list(lats, lons, datapathlist, rad_pool, date, interpolate=True)
6060
print(test)
6161

6262

0 commit comments

Comments
 (0)