Skip to content

Commit

Permalink
Merge pull request #1 from openclimatefix/dev
Browse files Browse the repository at this point in the history
Create basic functionality to download satellite data
  • Loading branch information
dfulu authored Jul 2, 2024
2 parents a057eb0 + fc16707 commit 561ceb3
Show file tree
Hide file tree
Showing 9 changed files with 1,607 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Open Climate Fix
Copyright (c) 2024 Open Climate Fix

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
49 changes: 39 additions & 10 deletions README.md
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
7 changes: 0 additions & 7 deletions environment.yml

This file was deleted.

Loading

0 comments on commit 561ceb3

Please sign in to comment.