Sky Conditions¶
Derived sky condition variables computed from cloud area fraction.
clear_sky — Clear sky¶
Boolean mask for clear-sky conditions. Returns True where cloud fraction is at or below cover_threshold.
| Parameter | Default | Description |
|---|---|---|
cloud_cover |
"cloud_cover" |
Cloud area fraction variable name (0–1) |
cover_threshold |
0.0 |
Maximum cloud fraction considered clear sky |
covered_sky — Covered sky¶
Boolean mask for fully overcast conditions. Returns True where cloud fraction is at or above cover_threshold.
| Parameter | Default | Description |
|---|---|---|
cloud_cover |
"cloud_cover" |
Cloud area fraction variable name (0–1) |
cover_threshold |
1.0 |
Minimum cloud fraction considered covered sky |
derived_vars:
- name: covered_sky
func: covered_sky
cover_threshold: 0.9 # consider overcast above 90% cloud cover
API reference¶
gridstats.derived.sky.clear_sky(ds: xr.Dataset, *, cloud_cover: str = 'cloud_cover', cover_threshold: float = 0.0) -> xr.DataArray
¶
Boolean mask for clear-sky conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds
|
Dataset
|
Input dataset. |
required |
cloud_cover
|
str
|
Name of the cloud area fraction variable (0–1). |
'cloud_cover'
|
cover_threshold
|
float
|
Maximum cloud fraction considered clear sky. |
0.0
|
Returns:
| Type | Description |
|---|---|
DataArray
|
Boolean DataArray: True where sky is clear. |
gridstats.derived.sky.covered_sky(ds: xr.Dataset, *, cloud_cover: str = 'cloud_cover', cover_threshold: float = 1.0) -> xr.DataArray
¶
Boolean mask for fully overcast conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds
|
Dataset
|
Input dataset. |
required |
cloud_cover
|
str
|
Name of the cloud area fraction variable (0–1). |
'cloud_cover'
|
cover_threshold
|
float
|
Minimum cloud fraction considered covered sky. |
1.0
|
Returns:
| Type | Description |
|---|---|
DataArray
|
Boolean DataArray: True where sky is fully covered. |