-
Notifications
You must be signed in to change notification settings - Fork 1
~PTT 2020 09 23
Ian Edwards edited this page Nov 2, 2020
·
2 revisions
Proposed: Wednesday 23 September 2020 13h UTC
Microsoft Teams
- Demonstration of pyopencdms
- AOB
- Next meeting date
@steve-palmer, @isedwards, @githubetna, @eporrasc, @smachua, @mhabimana, @volloholic, @jaggh, @lloyddewit
Ian gave a demonstration of the pyopencdms package. A summary of the code shown in the meeting is below:
import os
from pathlib import Path
import opencdms
from opencdms import Climsoft4, MCH, MidasOpen
from opencdms import MidasOpen
connection = os.path.join(
Path.home(), 'opencdms-dev', 'git', 'opencdms-test-data')
connection
'/home/ubuntu/opencdms-dev/git/opencdms-test-data'
session = MidasOpen(connection)
session
<opencdms.provider.midas.MidasOpen at 0x7f9cbc726e80>
filters = {
'src_id': 838,
'period': 'hourly',
'year': 1991,
'elements': ['wind_speed', 'wind_direction'],
}
filters
{'src_id': 838, 'period': 'hourly', 'year': 1991, 'elements': ['wind_speed', 'wind_direction']}
# obs = session.obs(src_id=838, period='hourly', year=1991, element=['wind_speed', 'wind_direction'])
obs = session.obs(**filters)
obs
ob_time | src_id | wind_direction | wind_speed | |
---|---|---|---|---|
0 | 1991-01-01 00:00:00 | 838 | 230.0 | 3.0 |
1 | 1991-01-01 01:00:00 | 838 | 230.0 | 3.0 |
2 | 1991-01-01 02:00:00 | 838 | 210.0 | 4.0 |
3 | 1991-01-01 03:00:00 | 838 | 200.0 | 2.0 |
4 | 1991-01-01 04:00:00 | 838 | 220.0 | 1.0 |
... | ... | ... | ... | ... |
16212 | 1991-12-31 19:00:00 | 838 | 190.0 | 1.0 |
16213 | 1991-12-31 20:00:00 | 838 | 220.0 | 2.0 |
16214 | 1991-12-31 21:00:00 | 838 | 210.0 | 3.0 |
16215 | 1991-12-31 22:00:00 | 838 | 200.0 | 4.0 |
16216 | 1991-12-31 23:00:00 | 838 | 220.0 | 5.0 |
16217 rows Γ 4 columns
type(obs)
pandas.core.frame.DataFrame
from opencdms.process.climatol import windrose
windrose(obs)
David and Stephen gave an overview of the PICSA work and how it relates to the work on pyopencdms
so far. More details will be given in future meetings.
Wednesday 14 October 2020 13h UTC. This would be at the usual time for all participants except for anyone joining the call from Australia.