generated from openclimatefix/ocf-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from openclimatefix/dev
Create basic functionality to download satellite data
- Loading branch information
Showing
9 changed files
with
1,607 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,42 @@ | ||
# OCF Template Repository | ||
Template Repository for OCF Projects | ||
# A starting library for future satellite prediction | ||
|
||
## Usage | ||
|
||
Do the following to customize the repo to the project: | ||
### Getting started | ||
|
||
- Replace `src` with name of the library/project | ||
- Update `setup.py` with the proper info | ||
- Change `commit` to `True` in `.bumpversion.cfg` if you want the minor version | ||
to increment on every commit. | ||
- Add PyPi access token to release to PyPi | ||
- Update name of folder in the test workflow | ||
Create and activate a new python environment, e.g. | ||
|
||
``` | ||
conda create -n sat_pred python=3.10 | ||
conda activate sat_pred | ||
``` | ||
|
||
Install the dependencies | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` | ||
|
||
Create a empty directory to save the satellite data to | ||
|
||
``` | ||
mkdir path/to/new/satellite/directory | ||
``` | ||
|
||
Run the command line utility to download download satellite data | ||
|
||
``` | ||
python scripts/download_uk_satellite.py \ | ||
"2020-06-01 00:00" \ | ||
"2020-06-30 23:55" \ | ||
"path/to/new/satellite/directory" | ||
``` | ||
|
||
The above script downloads all the satellite imagery from June 2020. The input arguments are: | ||
- start_date: First datetime (inclusive) to download | ||
- end_date: Last datetime (inclusive) to download | ||
- output_directory: Directory to which the satellite data should be saved | ||
|
||
Note that the above script creates a satellite dataset which is 21GB. On my machine it used about | ||
12GB of RAM at its peak and took around 30 minutes to run. | ||
|
||
See the notebook `plot_satellite_image_example.ipynb` for loading and plotting example |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.