This release is a pre-release and may not be stable for production use.
pynasapower
Download meteorological data from NASA POWER restful API (https://power.larc.nasa.gov/) using pynasapower API client.
The NASA POWER database is a global database of daily meteorological data designed for agrometeorological applications and more. Data are retrieced from in-situ observations in combination with satellite data. For more information on the NASA POWER database see the documentation at: https://power.larc.nasa.gov/.
Installation from source
git clone https://github.com/alekfal/pynasapower.git
cd pynasapower/
pip install .
Installation from PyPI
pip install pynasapower
NASA POWER API client arguments
geometry: Single point or polygon geometry asgeopandas.GeoDataFrame. User can use methods pynasapower.geometry.point() or pynasapower.geometry.bbox() to create an input geometry for this client.start: Start date asdatetime.dateformat. In the examples the value isdatetime.date(2022, 1, 1).- end: End date as
datetime.dateformat. In the examples the value isdatetime.date(2022, 2, 1). path: Local path to store the downloaded data. In the examples"./"is used.to_file: Boolean argument to save data locally. By default isTrue.community: The default POWERcommunityis agroclimatology ("ag"). Other available communities are sustainable buildings ("sb") and renewable energy ("re"). Find more about the POWER communities here.parameters: The default parameters for downloading (["TOA_SW_DWN", "ALLSKY_SFC_SW_DWN", "T2M", "T2M_MIN", "T2M_MAX", "T2MDEW", "WS2M", "PRECTOTCORR"]) are selected for downloading if an empty list ([]) is provided by the user. Find more for the POWER parameters in here.- temporal_api: Temporal resolution of the data. The default value is
"daily". Other selections are"hourly","monthly","climatology". Read more about the temporal resolution of the data here. spatial_api: Spatial resolution of the data. By default"point"is selected, but a user can also use"regional". Note that in order to download a region a polygon geometry must be used in thegeometryargument.format: Output format of the data. The default is"csv". Other selections supported by the API client are:"netcdf","json"and"ascii".
Quickstart
Download meteorological data for a point in Athens, Greece and save result in *.csv format.
from pynasapower.get_data import query_power
from pynasapower.geometry import point, bbox
import datetime
# Run for point in Athens and save the result in csv format
gpoint = point(23.727539, 37.983810, "EPSG:4326")
start = datetime.date(2022, 1, 1)
end = datetime.date(2022, 2, 1)
data = query_power(geometry = gpoint, start = start, end = end, path = "./data", to_file = True, community = "ag", parameters = [], temporal_api = "daily", spatial_api = "point", format = "csv")
Download meteorological data for a polygon in Athens, Greece and save result in *.csv format.
# Run for small bbox in Athens and save the result in csv format
gbbox = bbox(23.727539, 26.73, 37.983810, 40.99, "EPSG:4326")
start = datetime.date(2022, 1, 1)
end = datetime.date(2022, 2, 1)
data = query_power(geometry = gbbox, start = start, end = end, path = "./data", to_file = True, community = "ag", parameters = [], temporal_api = "daily", spatial_api = "point", format = "csv")
Read more about the software in project's readthedocs.
Metadata
Release files for pynasapower 0.0.1a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pynasapower-0.0.1a1.tar.gz | 21.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynasapower-0.0.1a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.4 kB
Release files / pynasapower-0.0.1a1.tar.gz
| Download URL | pynasapower-0.0.1a1.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
501b4761154ccf79fb4d36fcdad43511712aab978a510ad5cc2fc38551df43b9
|
|
BLAKE2b-256 checksum How to use checksums |
3c852f8ee710883b0a36baa6c64495fa9030b3e6701211ef7b434317906298bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / pynasapower-0.0.1a1-py3-none-any.whl
| Download URL | pynasapower-0.0.1a1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc63ff0e8c0b6f86baa99790f132d0653be455b84c1e19074087db0464d676a8
|
|
BLAKE2b-256 checksum How to use checksums |
b8ac5d97fef68d59835a24ef598a599b52419d6065b09db918205c4c2a017313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|