Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathause/weatherathome
weatherathome functionality
https://github.com/mathause/weatherathome
Last synced: about 1 month ago
JSON representation
weatherathome functionality
- Host: GitHub
- URL: https://github.com/mathause/weatherathome
- Owner: mathause
- License: mit
- Created: 2016-09-29T10:47:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T13:47:57.000Z (over 5 years ago)
- Last Synced: 2024-10-14T09:41:15.283Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# weather at home
weatherathome functionality
## Usage
Unzip folders
```python
import weatherathome as wah
# unzip month_index 7 (= June) monthly regional file
wah.unzip('/path/w_at_h/hadam3p_eu_2014', '*_7.zip', '*ga.pe*')
```Obtain list of available folders
```python
import weatherathome as wah
import xarray as xr
# read all simulations months
w = wah.wah('/path/w_at_h/hadam3p_eu/hadam3p_eu_*[!zip]')# subset
ws = w.select(year=2014, month=slice(6, 8))umid_unique = ws.UMID_number_unique
# load simulation per umid
for ui in umid_unique:
ds = ws.load_regional_monthly('precipitation_flux', UMID_number=ui)
# concatenate in time
ds = xr.concat(ds, dim='time1')
# postprocess ...
```