Calculate solar radiation on tilted surfaces based on NASA POWER data. Supports user-defined tilt angle and azimuth angle. Outputs structured Excel files.
---
name: solar-tilt-calculator
description: Calculate solar radiation on tilted surfaces based on NASA POWER data. Supports user-defined tilt angle and azimuth angle. Outputs structured Excel files.
homepage: https://power.larc.nasa.gov
metadata: {"clawdbot":{"emoji":"☀️","requires":{"bins":["curl"],"python":["openpyxl","pandas"]}}}
---
# Solar-Tilt-Calculator
Calculate solar radiation on tilted surfaces for wind and solar energy analysis. Based on NASA POWER climatology data and Hay's anisotropic sky-diffuse model.
## Trigger
User provides:
1. Input Excel file path (from metdata-nasa-access)
2. Tilt angle (β) in degrees
3. Azimuth angle (γ) in degrees (optional, default: 0 = facing equator)
Example:
- "帮我计算倾角30°,方位角0°的辐射量"
- "使用 /path/to/metdata.xlsx,倾角25°"
- "30度倾角,正南朝向"
## Workflow
### Step 1: Read Input Excel
Read the Excel file generated by metdata-nasa-access:
```bash
python3 scripts/calculate_tilt_radiation.py \
--input <INPUT_EXCEL> \
--tilt <TILT_ANGLE> \
--azimuth <AZIMUTH_ANGLE> \
--output <OUTPUT_EXCEL>
```
**Input Excel structure** (from metdata-nasa-access):
- Sheet "气象数据": Contains monthly radiation data
- Columns: T2M, T10M, ALLSKY_SRF_ALB, ALLSKY_SFC_SW_DNI, ALLSKY_SFC_SW_DIFF, ALLSKY_SFC_SW_DWN
- Rows: 1月-12月 + 年度均值
### Step 2: Calculate Tilted Surface Radiation
Use Hay's anisotropic model (from paper: 不同方位倾斜面上太阳辐射量及最佳倾角的计算):
```
HT = Hb × Rb + Hd × [(Hb/H0) × Rb + (1/2)(1 - Hb/H0)(1 + cosβ)] + (1/2)ρH(1 - cosβ)
```
**For equator-facing surfaces (γ = 0)**:
```
Rb = [sin(φ - β) × sinδ + cos(φ - β) × cosδ × cosωs] / [sinφ × sinδ + cosφ × cosδ × cosωs]
```
**For tilted surfaces with azimuth (γ ≠ 0)**:
Use Bushell's improved formula for sunrise/sunset hour angles:
```
ωs1 = min{ωs, arccos[(A - B)/C]}
ωs2 = max{-ωs, arccos[(A + B)/C]}
```
Where:
- A = sinδ(sinφ cosβ - cosφ sinβ cosγ)
- B = cosδ(cosφ cosβ + sinφ sinβ cosγ)
- C = cosδ sinβ sinγ
- ωs = arccos(-tanφ tanδ)
### Step 3: Generate Output Excel
Output Excel with 3 sheets:
1. **基本信息** - Location, tilt angle, azimuth angle, input data source
2. **倾斜面辐射数据** - Monthly mean daily radiation on tilted surface
3. **参数说明** - Calculation model, parameters, formulas
### Step 4: Report to User
Confirm the file path and summarize key findings:
- 年均可用辐射量(水平面 vs 倾斜面)
- 最佳辐射月份
- 辐射增益/损失百分比
## Output Format
Excel with 3 sheets:
**基本信息**:
- 输入数据源
- 当地纬度
- 倾斜角度
- 方位角度
- 计算模型
**倾斜面辐射数据**:
| 月份 | 直射辐射 | 散射辐射 | 地面反射 | 总辐射 | 水平面总辐射 | 增益/损失 |
|------|---------|---------|---------|--------|-------------|----------|
| 1月 | ... | ... | ... | ... | ... | ... |
**参数说明**:
- Hay 模型说明
- 公式来源
- 符号对照表
## Notes
- Based on Hay's anisotropic sky-diffuse model
- Input data should be from metdata-nasa-access (NASA POWER climatology)
- Tilt angle (β): 0-90° (0° = horizontal)
- Azimuth angle (γ): -90° to +90° (0° = facing equator, negative = east, positive = west)
- Ground reflectance (ρ): default 0.2 (typical for most surfaces)
- Units: MJ/(m²·day)
- Calculation method: Monthly mean daily radiation
## References
- 杨金焕, 毛家俊, 陈中华. 不同方位倾斜面上太阳辐射量及最佳倾角的计算[J]. 上海交通大学学报, 2002, 36(7): 1032-1035.
- Hay J E. Calculation of monthly mean solar radiation for horizontal and inclined surfaces[J]. Solar Energy, 1979, 23(4): 301-307.
- Bushell R H. A solution for sunrise and sunset hour angles on a tilted surface without a singularity at zero[J]. Solar Energy, 1982, 28(4): 359.
don't have the plugin yet? install it then click "run inline in claude" again.