Skip to content

Commit

Permalink
add GTI (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-zippenfenig authored Jan 17, 2024
1 parent 1c3995b commit e75cf5a
Show file tree
Hide file tree
Showing 12 changed files with 796 additions and 79 deletions.
80 changes: 73 additions & 7 deletions src/routes/en/docs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
sliceIntoChunks
} from '$lib/meteo';
import AccordionItem from '$lib/Elements/AccordionItem.svelte';
import { fade } from 'svelte/transition';
import { fade, slide } from 'svelte/transition';
import CalendarEvent from 'svelte-bootstrap-icons/lib/CalendarEvent.svelte';
import Clock from 'svelte-bootstrap-icons/lib/Clock.svelte';
import StartEndDate from './StartEndDate.svelte';
Expand All @@ -36,6 +36,8 @@
forecast_minutely_15: '',
start_date: '',
end_date: '',
tilt: 0,
azimuth: 0,
time_mode: 'forecast_days',
models: []
};
Expand Down Expand Up @@ -212,17 +214,19 @@
const solarVariables = [
[
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation' },
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation GHI' },
{ name: 'direct_radiation', label: 'Direct Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation DHI' },
{ name: 'direct_normal_irradiance', label: 'Direct Normal Irradiance DNI' },
{ name: 'global_tilted_irradiance', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation', label: 'Terrestrial Solar Radiation' }
],
[
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation (Instant)' },
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation GHI (Instant)' },
{ name: 'direct_radiation_instant', label: 'Direct Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation DHI (Instant)' },
{ name: 'direct_normal_irradiance_instant', label: 'Direct Normal Irradiance DNI (Instant)' },
{ name: 'global_tilted_irradiance_instant', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation_instant', label: 'Terrestrial Solar Radiation (Instant)' }
]
];
Expand Down Expand Up @@ -519,12 +523,54 @@
{/each}
</div>
{/each}
<div class="col-md-12">
<div class="col-md-12 mb-3">
<small class="text-muted"
>Note: Solar radiation is averaged over the past hour. Use
<mark>instant</mark> for radiation at the indicated time.</small
<mark>instant</mark> for radiation at the indicated time. For global tilted irradiance GTI please specify Tilt and Azimuth below.</small
>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.tilt < 0 ||$params.tilt > 90}
name="tilt"
id="tilt"
step="1"
min="0"
max="90"
bind:value={$params.tilt}
/>
<label for="latitude">Panel Tilt (0° horizontal)</label>
{#if $params.tilt < 0 ||$params.tilt > 90 }
<div class="invalid-tooltip" transition:slide>
Tilt must be between 0° and 90°
</div>
{/if}
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.azimuth < -90 || $params.azimuth > 90}
name="azimuth"
id="azimuth"
step="1"
min="-90"
max="90"
bind:value={$params.azimuth}
/>
<label for="latitude">Panel Azimuth (0° S, -90° E, 90° W)</label>
{#if Number($params.azimuth) < 0 || Number($params.azimuth) > 90 }
<div class="invalid-tooltip" transition:slide>
Azimuth must be between -90° (east) and 90° (west)
</div>
{/if}
</div>
</div>
</AccordionItem>
<AccordionItem
id="pressure-levels"
Expand Down Expand Up @@ -1288,6 +1334,18 @@
<td>W/m²</td>
<td>Diffuse solar radiation as average of the preceding hour</td>
</tr>
<tr>
<th scope="row">global_tilted_irradiance</th>
<td>Preceding hour mean</td>
<td>W/m²</td>
<td>Total radiation received on a tilted pane as average of the preceding hour.
The calculation is assuming a fixed albedo of 20% and in isotropic sky.
Please specify tilt and azimuth parameter. Tilt ranges from 0° to 90° and is typically around 45°.
Azimuth should be close to 0° (0° south, -90° east, 90° west).
If azimuth is set to "nan", the calculation assumes a horizontal tracker.
If tilt is set to "nan", it is assumed that the panel has a vertical tracker.
If both are set to "nan", a bi-axial tracker is assumed.</td>
</tr>
<tr>
<th scope="row">vapour_pressure_deficit</th>
<td>Instant</td>
Expand Down Expand Up @@ -1502,6 +1560,14 @@
<td>x</td>
<td></td>
</tr>
<tr>
<th scope="row">global_tilted_irradiance<br />global_tilted_irradiance_instant</th>
<td>Preceding 15 minutes mean</td>
<td>W/m²</td>
<td>x</td>
<td>x</td>
<td></td>
</tr>
<tr>
<th scope="row">diffuse_radiation</th>
<td>Preceding 15 minutes mean</td>
Expand Down
72 changes: 65 additions & 7 deletions src/routes/en/docs/bom-api/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { urlHashStore } from '$lib/url-hash-store';
import { countVariables } from '$lib/meteo';
import AccordionItem from '$lib/Elements/AccordionItem.svelte';
import { fade } from 'svelte/transition';
import { fade, slide } from 'svelte/transition';
import CalendarEvent from 'svelte-bootstrap-icons/lib/CalendarEvent.svelte';
import Clock from 'svelte-bootstrap-icons/lib/Clock.svelte';
import StartEndDate from '../StartEndDate.svelte';
Expand All @@ -30,6 +30,8 @@
forecast_minutely_15: '',
start_date: '',
end_date: '',
tilt: '0',
azimuth: 0,
time_mode: 'forecast_days',
models: []
};
Expand Down Expand Up @@ -129,17 +131,19 @@
const solarVariables = [
[
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation' },
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation GHI' },
{ name: 'direct_radiation', label: 'Direct Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation DHI' },
{ name: 'direct_normal_irradiance', label: 'Direct Normal Irradiance DNI' },
{ name: 'global_tilted_irradiance', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation', label: 'Terrestrial Solar Radiation' }
],
[
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation (Instant)' },
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation GHI (Instant)' },
{ name: 'direct_radiation_instant', label: 'Direct Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation DHI (Instant)' },
{ name: 'direct_normal_irradiance_instant', label: 'Direct Normal Irradiance DNI (Instant)' },
{ name: 'global_tilted_irradiance_instant', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation_instant', label: 'Terrestrial Solar Radiation (Instant)' }
]
];
Expand Down Expand Up @@ -383,12 +387,54 @@
{/each}
</div>
{/each}
<div class="col-md-12">
<div class="col-md-12 mb-3">
<small class="text-muted"
>Note: Solar radiation is averaged over the past hour. Use
<mark>instant</mark> for radiation at the indicated time.</small
<mark>instant</mark> for radiation at the indicated time. For global tilted irradiance GTI please specify Tilt and Azimuth below.</small
>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.tilt < 0 ||$params.tilt > 90}
name="tilt"
id="tilt"
step="1"
min="0"
max="90"
bind:value={$params.tilt}
/>
<label for="latitude">Panel Tilt (0° horizontal)</label>
{#if $params.tilt < 0 ||$params.tilt > 90 }
<div class="invalid-tooltip" transition:slide>
Tilt must be between 0° and 90°
</div>
{/if}
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.azimuth < -90 || $params.azimuth > 90}
name="azimuth"
id="azimuth"
step="1"
min="-90"
max="90"
bind:value={$params.azimuth}
/>
<label for="latitude">Panel Azimuth (0° S, -90° E, 90° W)</label>
{#if Number($params.azimuth) < 0 || Number($params.azimuth) > 90 }
<div class="invalid-tooltip" transition:slide>
Azimuth must be between -90° (east) and 90° (west)
</div>
{/if}
</div>
</div>
</AccordionItem>
</div>
</div>
Expand Down Expand Up @@ -860,6 +906,18 @@
<td>W/m²</td>
<td>Diffuse solar radiation as average of the preceding hour.</td>
</tr>
<tr>
<th scope="row">global_tilted_irradiance</th>
<td>Preceding hour mean</td>
<td>W/m²</td>
<td>Total radiation received on a tilted pane as average of the preceding hour.
The calculation is assuming a fixed albedo of 20% and in isotropic sky.
Please specify tilt and azimuth parameter. Tilt ranges from 0° to 90° and is typically around 45°.
Azimuth should be close to 0° (0° south, -90° east, 90° west).
If azimuth is set to "nan", the calculation assumes a horizontal tracker.
If tilt is set to "nan", it is assumed that the panel has a vertical tracker.
If both are set to "nan", a bi-axial tracker is assumed.</td>
</tr>
<tr>
<th scope="row">sunshine_duration</th>
<td>Preceding hour sum</td>
Expand Down
72 changes: 65 additions & 7 deletions src/routes/en/docs/cma-api/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
sliceIntoChunks
} from '$lib/meteo';
import AccordionItem from '$lib/Elements/AccordionItem.svelte';
import { fade } from 'svelte/transition';
import { fade, slide } from 'svelte/transition';
import CalendarEvent from 'svelte-bootstrap-icons/lib/CalendarEvent.svelte';
import Clock from 'svelte-bootstrap-icons/lib/Clock.svelte';
import StartEndDate from '../StartEndDate.svelte';
Expand All @@ -34,6 +34,8 @@
forecast_minutely_15: '',
start_date: '',
end_date: '',
tilt: 0,
azimuth: 0,
time_mode: 'forecast_days',
models: []
};
Expand Down Expand Up @@ -166,17 +168,19 @@
const solarVariables = [
[
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation' },
{ name: 'shortwave_radiation', label: 'Shortwave Solar Radiation GHI' },
{ name: 'direct_radiation', label: 'Direct Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation' },
{ name: 'diffuse_radiation', label: 'Diffuse Solar Radiation DHI' },
{ name: 'direct_normal_irradiance', label: 'Direct Normal Irradiance DNI' },
{ name: 'global_tilted_irradiance', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation', label: 'Terrestrial Solar Radiation' }
],
[
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation (Instant)' },
{ name: 'shortwave_radiation_instant', label: 'Shortwave Solar Radiation GHI (Instant)' },
{ name: 'direct_radiation_instant', label: 'Direct Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation (Instant)' },
{ name: 'diffuse_radiation_instant', label: 'Diffuse Solar Radiation DHI (Instant)' },
{ name: 'direct_normal_irradiance_instant', label: 'Direct Normal Irradiance DNI (Instant)' },
{ name: 'global_tilted_irradiance_instant', label: 'Global Tilted Radiation GTI' },
{ name: 'terrestrial_radiation_instant', label: 'Terrestrial Solar Radiation (Instant)' }
]
];
Expand Down Expand Up @@ -420,12 +424,54 @@
{/each}
</div>
{/each}
<div class="col-md-12">
<div class="col-md-12 mb-3">
<small class="text-muted"
>Note: Solar radiation is averaged over the past hour. Use
<mark>instant</mark> for radiation at the indicated time.</small
<mark>instant</mark> for radiation at the indicated time. For global tilted irradiance GTI please specify Tilt and Azimuth below.</small
>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.tilt < 0 ||$params.tilt > 90}
name="tilt"
id="tilt"
step="1"
min="0"
max="90"
bind:value={$params.tilt}
/>
<label for="latitude">Panel Tilt (0° horizontal)</label>
{#if $params.tilt < 0 ||$params.tilt > 90 }
<div class="invalid-tooltip" transition:slide>
Tilt must be between 0° and 90°
</div>
{/if}
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<input
type="number"
class="form-control"
class:is-invalid={$params.azimuth < -90 || $params.azimuth > 90}
name="azimuth"
id="azimuth"
step="1"
min="-90"
max="90"
bind:value={$params.azimuth}
/>
<label for="latitude">Panel Azimuth (0° S, -90° E, 90° W)</label>
{#if Number($params.azimuth) < 0 || Number($params.azimuth) > 90 }
<div class="invalid-tooltip" transition:slide>
Azimuth must be between -90° (east) and 90° (west)
</div>
{/if}
</div>
</div>
</AccordionItem>
<AccordionItem
id="pressure-levels"
Expand Down Expand Up @@ -984,6 +1030,18 @@
></td
>
</tr>
<tr>
<th scope="row">global_tilted_irradiance</th>
<td>Preceding hour mean</td>
<td>W/m²</td>
<td>Total radiation received on a tilted pane as average of the preceding hour.
The calculation is assuming a fixed albedo of 20% and in isotropic sky.
Please specify tilt and azimuth parameter. Tilt ranges from 0° to 90° and is typically around 45°.
Azimuth should be close to 0° (0° south, -90° east, 90° west).
If azimuth is set to "nan", the calculation assumes a horizontal tracker.
If tilt is set to "nan", it is assumed that the panel has a vertical tracker.
If both are set to "nan", a bi-axial tracker is assumed.</td>
</tr>
<tr>
<th scope="row">sunshine_duration</th>
<td>Preceding hour sum</td>
Expand Down
Loading

0 comments on commit e75cf5a

Please sign in to comment.