|
| 1 | +# RESource Quickstart Guide |
| 2 | + |
| 3 | +**Get up and running with RESource** - A modular framework for renewable energy resource assessment. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 🚀 Quick Setup (5 Minutes) |
| 8 | + |
| 9 | +### Prerequisites |
| 10 | + |
| 11 | +- **Linux environment** (Linux, macOS, or Windows WSL2) |
| 12 | +- **Git** and **Conda/Miniconda** installed |
| 13 | +- **Python 3.12+** support |
| 14 | + |
| 15 | +### 1️⃣ Clone & Navigate |
| 16 | + |
| 17 | +```bash |
| 18 | +git clone https://github.com/DeltaE/RESource.git |
| 19 | +cd RESource |
| 20 | +``` |
| 21 | + |
| 22 | +### 2️⃣ One-Command Setup |
| 23 | + |
| 24 | +```bash |
| 25 | +# Create complete conda environment |
| 26 | +make setupenv |
| 27 | +``` |
| 28 | + |
| 29 | +### 3️⃣ Activate & Test |
| 30 | + |
| 31 | +```bash |
| 32 | +# Activate environment |
| 33 | +conda activate RES |
| 34 | + |
| 35 | +# Quick test |
| 36 | +python -c "import RES; print('✅ RESource ready!')" |
| 37 | +``` |
| 38 | + |
| 39 | +**🎉 You're ready to go!** |
| 40 | + |
| 41 | +### 4️⃣ Download Case Study Data |
| 42 | + |
| 43 | +```bash |
| 44 | +# Download required data for Canadian analysis (~2GB) |
| 45 | +# Visit and download: https://zenodo.org/records/16658067 |
| 46 | +# Extract to data/ directory |
| 47 | + |
| 48 | +wget https://zenodo.org/record/16658067/files/RESource_data.zip |
| 49 | +unzip RESource_data.zip -d data/ |
| 50 | +``` |
| 51 | + |
| 52 | +```{note} |
| 53 | +**Case Study Data**: Contains processed geospatial data for Canadian provinces including ERA5 weather data, exclusion zones, and land cover classifications needed for renewable energy resource assessment. |
| 54 | +``` |
| 55 | + |
| 56 | +### 5️⃣ Setup API Access (For Custom Analysis) |
| 57 | + |
| 58 | +```{warning} |
| 59 | +**Required for Custom Regions**: Skip this step if only using the provided case study data. |
| 60 | +``` |
| 61 | + |
| 62 | +For running custom analyses beyond the provided case study data, some data sources require API registration: |
| 63 | + |
| 64 | +- **ERA5 Climate Data**: Requires Copernicus Climate Data Store registration for global weather data |
| 65 | +- **CODERS API**: Requires registration for Canadian-specific data sources |
| 66 | + |
| 67 | +```{note} |
| 68 | +**Complete Setup Instructions**: For detailed API registration steps, configuration files, and data source information, see [data.md](data.md). |
| 69 | +``` |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## 🔥 First Run (2 Minutes) |
| 74 | + |
| 75 | +### Run Canadian Wind & Solar Analysis |
| 76 | + |
| 77 | +```bash |
| 78 | +# Run with default Canadian configuration |
| 79 | +make run |
| 80 | + |
| 81 | +# Or run specific region/config |
| 82 | +python run.py --config config/config_CAN_baseline.yaml |
| 83 | +``` |
| 84 | + |
| 85 | +### Start Interactive Environment |
| 86 | + |
| 87 | +```bash |
| 88 | +# Launch Jupyter Lab |
| 89 | +make jupyter |
| 90 | + |
| 91 | +# Open notebooks/ |
| 92 | +# Try: resources_playground_CAN.ipynb |
| 93 | +``` |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## 📊 What RESource Does |
| 98 | + |
| 99 | +RESource analyzes **renewable energy potential** by: |
| 100 | + |
| 101 | +1. **📍 Site Selection**: Filters suitable land using exclusion zones, slopes, land cover |
| 102 | +2. **🌤️ Weather Processing**: Converts ERA5 climate data to energy capacity factors |
| 103 | +3. **⚡ Capacity Estimation**: Calculates wind/solar potential per grid cell |
| 104 | +4. **📈 Time Series Generation**: Creates hourly profiles for energy system modeling |
| 105 | +5. **🎯 Optimization**: Selects optimal sites based on capacity and cost criteria |
| 106 | + |
| 107 | +**Output Organization:** |
| 108 | +- **`data/store/`**: Primary resource data (HDF5 format) - detailed analysis results |
| 109 | +- **`results/Country/Region/Scenario/`**: Organized CSV files - resource clusters, timeseries, and cost-filtered sites |
| 110 | +- **`vis/Country/Region/`**: SVG/PNG visualizations - maps, supply curves, clustering analysis, and policy scenarios |
| 111 | + |
| 112 | +### Example Output |
| 113 | + |
| 114 | +```text |
| 115 | +data/store/ |
| 116 | +├── resources_Canada_BC_BASELINE.h5 # resource data store for BASELINE |
| 117 | +
|
| 118 | +results/Canada/BC/BASELINE/ |
| 119 | +├── resource_options_wind_British Columbia.csv # Wind resource clusters with LCOE |
| 120 | +├── resource_options_wind_British Columbia_timeseries.csv # Hourly capacity factors |
| 121 | +├── resource_options_solar_British Columbia.csv # Solar resource clusters with LCOE |
| 122 | +├── resource_options_solar_British Columbia_timeseries.csv # Hourly capacity factors |
| 123 | +├── cells_aggregated_by_Region_BC_BASELINE.csv # Regional capacity summaries |
| 124 | +├── wind_cells_below_50_$pMWh_BC_BASELINE.csv # Cost-filtered wind sites |
| 125 | +├── solar_cells_below_57_$pMWh_BC_BASELINE.csv # Cost-filtered solar sites |
| 126 | +└── Resource_options_summary.txt # Analysis summary report |
| 127 | +
|
| 128 | +vis/Canada/BC/ |
| 129 | +├── BC_gridcells_outline.svg # Grid cell boundaries |
| 130 | +├── BC_regions.png # Administrative regions |
| 131 | +├── supply_curve_baseline_vs_policy_BC.svg # Supply curve comparisons |
| 132 | +├── Resources_proximity_to_grid_BC.svg # Grid connectivity analysis |
| 133 | +├── BASELINE/ |
| 134 | +│ ├── Resources_combined_CAPACITY.svg # Combined capacity maps |
| 135 | +│ ├── Resources_combined_CF.svg # Capacity factor maps |
| 136 | +│ ├── Resources_combined_SCORE.svg # Resource quality scores |
| 137 | +│ ├── wind/ |
| 138 | +│ │ ├── Regional_cluster_Elbow_Plots/ # Clustering analysis plots |
| 139 | +│ │ └── lands/ # Land availability analysis |
| 140 | +│ └── solar/ |
| 141 | +│ ├── Regional_cluster_Elbow_Plots/ # Clustering analysis plots |
| 142 | +│ └── lands/ # Land availability analysis |
| 143 | +└── strict_policy_aeroway_CPCAD_buffer/ # Alternative policy scenario |
| 144 | + ├── cost_map_wind.svg # Cost mapping visualizations |
| 145 | + ├── cost_map_solar.svg |
| 146 | + └── potential_capacity_lost_*.svg # Policy impact analysis |
| 147 | +``` |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +## 📁 Key Files & Structure |
| 152 | + |
| 153 | +```text |
| 154 | +RESource/ |
| 155 | +├── config/ # Configuration files |
| 156 | +│ ├── config_CAN.yaml # Canadian analysis setup |
| 157 | +│ └── config_WB6.yaml # Western Balkans setup |
| 158 | +├── RES/ # Core analysis modules |
| 159 | +├── notebooks/ # Interactive examples |
| 160 | +├── run.py # Main analysis script |
| 161 | +├── data/ |
| 162 | +│ └── store/ # Main resource data storage (HDF5) |
| 163 | +├── results/ # Downstream modeling exports (CSV) |
| 164 | +└── vis/ # Visualizations & plots |
| 165 | +``` |
| 166 | + |
| 167 | +--- |
| 168 | + |
| 169 | +## 🛠️ Common Commands |
| 170 | + |
| 171 | +```bash |
| 172 | +make help # Show all available commands |
| 173 | +make setupenv # Create/setup conda environment |
| 174 | +make updateenv # Update existing environment |
| 175 | +make run # Run main analysis |
| 176 | +make jupyter # Start Jupyter Lab |
| 177 | +make docs # Build documentation |
| 178 | +make clean # Clean cache & build files |
| 179 | +``` |
| 180 | + |
| 181 | +--- |
| 182 | + |
| 183 | +## 🌍 Supported Regions |
| 184 | + |
| 185 | +- **🇨🇦 Canada**: Provincial analysis (BC, AB, SK, ON, QC, NS, MB) |
| 186 | +- **🌍 Western Balkans**: Regional analysis (6 countries) |
| 187 | +- **🔧 Custom**: Configure any region with your own data |
| 188 | + |
| 189 | +--- |
| 190 | + |
| 191 | +## 📚 Next Steps |
| 192 | + |
| 193 | +### Explore Examples |
| 194 | + |
| 195 | +```bash |
| 196 | +# Try the playground notebooks |
| 197 | +jupyter lab notebooks/resources_playground_CAN.ipynb |
| 198 | +``` |
| 199 | + |
| 200 | +### Build Documentation |
| 201 | + |
| 202 | +```bash |
| 203 | +# Generate full documentation |
| 204 | +make docs |
| 205 | + |
| 206 | +# Live development server |
| 207 | +make autobuild # Visit http://127.0.0.1:8000 |
| 208 | +``` |
| 209 | + |
| 210 | +## 🆘 Need Help? |
| 211 | + |
| 212 | +### Quick Debugging |
| 213 | + |
| 214 | +```bash |
| 215 | +# Check environment |
| 216 | +conda activate RES && python -c "import RES" |
| 217 | + |
| 218 | +# Test all dependencies |
| 219 | +python workflow/scripts/test_venv.py |
| 220 | + |
| 221 | +# Check data store (look for resources_Canada_*_BASELINE.h5) |
| 222 | +ls -la data/store/resources_Canada_* |
| 223 | + |
| 224 | +# View recent outputs - organized by Country/Region/Scenario |
| 225 | +ls -la results/Canada/BC/BASELINE/ |
| 226 | +ls -la vis/Canada/BC/BASELINE/ |
| 227 | + |
| 228 | +# Check visualization files |
| 229 | +find vis/Canada/BC/ -name "*.svg" -o -name "*.png" | head -10 |
| 230 | +``` |
| 231 | + |
| 232 | +### Resources |
| 233 | + |
| 234 | +- 📖 **Full Documentation**: [https://deltae.github.io/RESource/](https://deltae.github.io/RESource/) |
| 235 | +- 🐛 **Issues**: [GitHub Issues](https://github.com/DeltaE/RESource/issues) |
| 236 | +- 💬 **Discussions**: [GitHub Discussions](https://github.com/DeltaE/RESource/discussions) |
| 237 | + |
| 238 | +--- |
| 239 | + |
| 240 | +## 🔍 Troubleshooting |
| 241 | + |
| 242 | +| Problem | Solution | |
| 243 | +|---------|----------| |
| 244 | +| `Environment 'RES' not found` | Run `make setupenv` | |
| 245 | +| `ImportError: No module named RES` | Run `conda activate RES` | |
| 246 | +| `FileNotFoundError: data/...` | Download case study data from [Zenodo](https://zenodo.org/records/16658067) | |
| 247 | +| `Permission denied` on WSL2 | Run `sudo chown -R $USER:$USER .` | |
| 248 | +| Slow downloads | Check internet connection, try different mirror | |
| 249 | + |
| 250 | +### Still Need Help? |
| 251 | + |
| 252 | +If you encounter issues not covered above, you can reach out to the development team: |
| 253 | + |
| 254 | +```{tip} |
| 255 | +**Contact the Developer**: For direct assistance, see contact information in [developers.md](developers.md) or open an issue on GitHub. |
| 256 | +``` |
| 257 | + |
| 258 | +--- |
| 259 | + |
| 260 | +**🎯 Ready to analyze renewable energy resources? Run `make run` and explore the results!** |
| 261 | + |
| 262 | +```{tip} |
| 263 | +For more detailed setup and development information, see the [Complete Setup Guide](setup_guide.md). |
| 264 | +``` |
0 commit comments