1. PyWPS 기반 OpenWPS 1.0 서비스 소개
이성규
APEC Climate Center
(geoslegend@apcc21.org)
1
* 본 발표자료는 FOSS4G BONN 2016, FOSS4G BOSTON 2017 발표자료와 APCC Annual Report 2015, 2016에서 발췌한 자료를 바탕으로 내용을 확장하였습니다
Version 1.1
3. 3
OpenWPS
OpenWPS 서비스
(http://openwps.apcc21.org)
• 목표
• 기후정보 분석 시스템(서비스)와 기후자료 사용자 그룹
(console 환경 등)에서 기후자료 처리, 가공, 분석에 필요한
기반 기술 제공
• 인터넷 환경에 열악한 환경에서도 이용 가능한 서비스 제공
• 운영 환경(운영체제, 개발 언어 등)에 상관없이 이용이 가능
하도록 OGC WPS 표준 기반의 서비스 설계 및 구현
• 개발환경
• OS: CentOS 6.5 x86_64
• Web Server: Apache HTTP Server 2.4.12
• Programming Language: Python 2.7.10
• Libraries: PyWPS 4.0, Matplotlib 1.5.0
• OGC WPS Operation Name:
OpenWPS:CV_VisualizeNonSeries
OpenWPS:CP_MaskWithCF
5. 5
FOSS4G 기술요소 – PyWPS
• OGC WPS 표준 서비스 구현이 가능한 Python 라이브러리
• OSGeo Incubation Project
• Jáchym Cepicky에 의해 개발 시작
• PyWPS Development Team (Ver. 4.0)
• Jachym Cepicky, Jorge Samuel Mendes de Jesus, Luís de Sousa
• Tom Kralidis, Alex Morega, Calin Ciociu, Fedor Baart
• Jonas Eberle, Carsten Ehbrecht
• Native GRASS GIS Support
• Release Version: 4.0
• License
• MIT license (Ver. 4.x)
• GNU/GPL license (Ver. 3.x)
https://github.com/geopython/pywps
http://pywps.org/
6. 6
FOSS4G 기술요소 – Matplotlib with Basemap
• 다양한 그래프를 그릴 수 있는 Python 라이브러리
• Matplotlib Basemap Toolkit 을 이용하면 지도 기반의
그래프 작성 가능
• Release Version: 2.0.2
• Github
• https://github.com/matplotlib/matplotlib
• License
• BSD-compatible license
(https://matplotlib.org/users/license.html)
https://github.com/matplotlib/matplotlib
http://matplotlib.org/
Source:
https://matplotlib.org/basemap/users/exam
ples.html
http://matplotlib.org/basemap/
8. 8
기후자료 표준 포맷 – OGC CF-netCDF
Source: http://www.opengeospatial.org/standards/netcdf
9. 9
CF metadata and conventions
• CF (Climate and Forecast) Metadata
– NetCDF 파일로 작성된 기후(예측)자료를 공유하고 처리하는 것을 장려하기 위해
디자인 됨
• Description of Data (units, long name, standard name, ancillary data)
• Coordinate types (latitude, longitude, vertical (height or depth), time) 등
– NCAR, Hadley Centre(UK Met Office), PCMDI(LLNL), PMEL (NOAA)의 연구진
이 참여
– CMIP5 기후변화시나리오 데이터는 CF-1.4 적용
– APCC도 MME 데이터에 암묵적으로 사용
– 위성자료 등 NetCDF 포맷으로 배포되는 대부분의 자료들에 암묵적으로 적용
10. 10
CF metadata and conventions (con’t)
• Longitude, Latitude, Time 변수
double lon(lon = 128)
lon:bounds = "lon_bnds"
lon:units = "degrees_east"
lon:axis = "X"
lon:long_name = "longitude"
lon:standard_name = "longitude"
double lat(lat = 60)
lat:bounds = "lat_bnds"
lat:units = "degrees_north"
lat:axis = “Y"
lat:long_name = “latitude"
lat:standard_name = “latitude"
double time(time = 120)
time:bounds = “time_bnds”
time:units = “days since 0001-01-01 00:00:00"
time:calendar = “noleap"
time:axis = “T"
time:long_name = “time"
time:standard_name = “time"
double lon_bnds(lon = 128, bnds = 2)
double time_bnds(lon = 128, bnds = 2)
double lon_bnds(lon = 128, bnds = 2)
데이터의
단위
저장된
데이터 타입
• 긴 설명이 포함된 이름을 포함하기 위해
NUG(NetCDF User’s Guide)에 정의된 속성
• 물리량을 식별하는데 사용
• standard_name 속성값은 CF Metadata Conventions 문서에 정의
• 공백(whitespace) 사용 불가, _ (underscore) 사용 가능
데이터의 시작과 끝 범위값(경계)을 저장해 둔 변수명
• 데이터(날짜)를 정의하는데 사용된 달력 종류
ex) 360day, 365day, 366day, etc. Center
데이터 위치
Latitude/Longitude
lon_bnds 변수
lat_bnds변수
Time
Time 변수의 데이
터
time_bnds 변수
25. 25
자료추출방법 비교 사례 1 – 통가지역
Case 1: Point in Polygon (Tonga boundary) Case 2: Point in MBR (Tonga boundary) Case 3: Point in Expanded MBR (2.5 deg) Case 4: Rectangle (Cell boundary) intersects Polygon
리샘플링
1 deg
선택된 데이터
국가경계
데이터
데이터
26. 26
자료추출방법 비교 사례 2 – 인도네시아
Case 1: Point in Polygon (Indonesia boundary) Case 2: Point in MBR (Indonesia boundary)
Case 3: Point in Expanded MBR (2.5 deg) Case 4: Rectangle (Cell boundary) intersects Polygon