SlideShare a Scribd company logo
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
APEC CLIMATE CENTER
목차
OpenWPS 소개
OGC CF-netCDF
기후자료 시각화 인터페이스
기후자료 마스킹 인터페이스
서비스 시연
2
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
OpenWPS 구성도
기후정보제공 및
분석 SW/서비스/시스템/플랫폼
기후자료 사용자 그룹
• 기후자료 시각화 인터페이스 서비스
4
<OGC 표준 기반 기후자료 마스킹 (masking) 인터페이스 서비스>
WPS 1.0
{
"climatedata": {
"version" : "0.1",
"dataset" : {
"slp" : {
"longname" : "Sea Level Pressure",
"units" : "mb",
"dimension" : [73, 144],
"method" : "BinaryGzipBase64",
"value" : "H4sIAAAAAAAAAOyc/V8V5ff1iRBo
"null_data" : -9999.000000,
"coordinate" : {
"type" : "Sequence",
"lat" : [-90.000000, 90.000000, 2.500000],
"lon" : [0.000000, 357.500000, 2.500000],
"crs" : 4326
}
}
}
},
gClimateJSON
DATA
XML
"plot" : {
"version" :"0.1",
"titles" : {
"ptitle" : "Sea Level Pressure",
"subtitles" : ["test"]
},
"grid" : {
"parallels" : {
"type" : "Sequence",
"values" : [-90.000000, 90.000000, 30.00000],
"linestyle" : {
"width": 0.75, "style": "--", "color": “
}
},
"meridians" : {
"type" : "Sequence",
"values" : [-180.000000, 180.000000, 30.00000],
"linestyle" : {
"width": 0.75,
"color": "@gray",
"opacity": 1.0,
Region
(GeoJSON)Parsing gClimateJSON
and GeoJSON data
Analyzing
climate metadata Masking
XML
{
"climatedata": {
"version" : "0.1",
"dataset" : {
"slp" : {
"longname" : "Sea Level Pressure",
"units" : "mb",
"dimension" : [73, 144],
"method" : "BinaryGzipBase64",
MaskResult
DATA
• 기후자료 마스킹 인터페이스 서비스
{
"climatedata": {
"version" : "0.1",
"dataset" : {
"slp" : {
"longname" : "Sea Level Pressure",
"units" : "mb",
"dimension" : [73, 144],
"method" : "BinaryGzipBase64",
"value" : "H4sIAAAAAAAAAOyc/V8V5ff1iRBo
"null_data" : -9999.000000,
"coordinate" : {
"type" : "Sequence",
"lat" : [-90.000000, 90.000000, 2.500000],
"lon" : [0.000000, 357.500000, 2.500000],
"crs" : 4326
}
}
}
},
gClimateJSON
DATA
XML
"plot" : {
"version" :"0.1",
"titles" : {
"ptitle" : "Sea Level Pressure",
"subtitles" : ["test"]
},
"grid" : {
"parallels" : {
"type" : "Sequence",
"values" : [-90.000000, 90.000000, 30.00000],
"linestyle" : {
"width": 0.75, "style": "--", "color": “
}
},
"meridians" : {
"type" : "Sequence",
"values" : [-180.000000, 180.000000, 30.00000],
"linestyle" : {
"width": 0.75,
"color": "@gray",
"opacity": 1.0,
gClimateJSON
PLOT
<OGC 표준 기반 기후자료 시각화 인터페이스 서비스>
WPS 1.0
gClimateJSON
Parser
Visualization
&
Output
Image
Compression
iVBORw0KGgoAAAANSUhEUgAAA5EAAAKZCAYA
AAAh9q9mAAAABHNCSVQICAgIfAhkiAAAAAlwS
FlzAAAPYQAAD2EBqD+naQAAIABJREFUeJzs3Xd4F
HXix/HPtvReSIAEAgm9SFUEQZCj6mEBKTbgULCAh+X
nHVYUC5ZTTz3P3lBPQVBBLICCBZAmCNI7BBKSQHrP
7vz+CCxZU5hAIAHer+fxecjMd2a+Gze785lvsxiGYQ
gAAAAAABOstV0BAAAA
Base64
XML
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
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/
APEC CLIMATE CENTER
7
OGC CF-netCDF 소개
8
기후자료 표준 포맷 – OGC CF-netCDF
Source: http://www.opengeospatial.org/standards/netcdf
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
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 변수
APEC CLIMATE CENTER
11
기후자료 시각화 인터페이스
12
기후자료 시각화 요소
[지도 기반의 시각화 요소 (Adapted from Kosaka et al., 2012)]
등고선
(Contour line)
국가 경계
(Country boundary)
채워진 등고선
(Filled Contour)
색상막대
(Color bar)
색상막대 라벨
(Color bar label)
제목 (title)
축 라벨
(Axis label)
위경도 격자
(Lat/Lon grid)
데이터교환 포맷 설계 - gClimateJSON
• gClimateJSON 구조 – 기후자료 (climatedata)
13
14
데이터교환 포맷 설계 (con’t)
None
BinaryBase64
BinaryGzipBase64
Memory
(Float, Double, etc.)
Memory
(Float, Double, etc.)
Memory
(Float, Double, etc.)
GZIP
BASE64
Binary-to-text encoding
BASE64
Binary-to-text encoding
iVBORw0KGgoAAAANSU
hEUgAAA5EAAAKZCAYA
AAAh9q9mAAAABHNCS
VQICAgIfAhkiAAAAAlwS
FlzAAAPYQAAD2EBqD+n
aQAAIABJREFUeJzs3Xd4F
HXix/HPtvReSIAEAgm9SFU
EQZCj6mEBKTbgULCAh+X
nHVYUC5ZTTz3P3lBPQVBB
LICCBZAmCNI7BBKSQHrP
7vz+CCxZU5hAIAHer+fxe
cjMd2a+Gze785lvsxiGYQ
gAAAAAABOstV0BAAAA
Base64
iVBORw0KGgoAAAANSU
hEUgAAA5EAAAKZCAYA
AAAh9q9mAAAABHNCS
VQICAgIfAhkiAAAAAlwS
FlzAAAPYQAAD2EBqD+n
aQAAIABJREFUeJzs3Xd4F
HXix/HPtvReSIAEAgm9SFU
EQZCj6mEBKTbgULCAh+X
nHVYUC5ZTTz3P3lBPQVBB
LICCBZAmCNI7BBKSQHrP
7vz+CCxZU5hAIAHer+fxe
cjMd2a+Gze785lvsxiGYQ
gAAAAAABOstV0BAAAA
Base64
987.653686,987.653686,
987.653686,987.653686,
987.653686,987.653686
988.032714,988.096374,
988.158630,987.831481,
987.899108,987.966491,
987.223022,987.314270,
987.398986,986.930786,
987.028991,987.127319,
988.158630,987.831481,
987.899108,987.966491,
987.223022,987.314270,
987.398986,986.930786,
Text
- 정수부와 소수점 자릿수에 따라 데이터
크기가 결정됨
- 정수부와 소수점 자릿수에 상관없이 데이터
타입(float, real, etc.)의 크기에 따라 데이터
크기가 결정됨
- 데이터 타입(float, real, etc.)의 binary
data를 Gzip 알고리즘으로 압축하여 데이터의
크기를 줄임
※ Test data: Float Array [73, 144]
- Data Size: Approx. 95 KB (4th decimal place)
- Data Size: Approx. 56 KB
- Data Size: Approx. 39 KB
• gClimateJSON 격자 표기법
15
데이터교환 포맷 설계 (con’t)
- titles > ptitle (그래프 제목)
> subtitles (그래프 부제목)
- grid > parallels (위도선)
> meridians (경도선)
- basemap > coastlines (해안선)
> countries (국가)
- map > center_position (지도 중심 위치)
> projection (투영법)
- contour > center_position (지도 중심 위치)
- output > datatype (데이터 인코딩 방법)
> format (이미지 포맷)
시각화 옵션
• gClimateJSON 구조 – 시각화 옵션 (plot)
OGC WPS 인터페이스
16
APEC CLIMATE CENTER
17
기후자료 마스킹 인터페이스
데이터교환 포맷 설계 - gClimateMaskJSON
• gClimateMaskJSON 구조 – 기후자료 (climatemask)
18
데이터교환 포맷 설계
• MaskingOperator (마스킹 옵션) , MaskResult (마스킹 결과)
19
OGC WPS 인터페이스
20
APEC CLIMATE CENTER
21
OpenWPS 활용
22
NetCDF Viewer with OpenWPS
• 데모 어플리케이션 다운로드 및 설치
Windows Application
- Programming Language: C#
- Libraries: Scientific DataSet 1.3, APCC OGC.NET
0.1.0, APCC QFSciNetCDF.Net 0.1.0, SourceGrid
4.40, Fast Lightweight Expression Evaluator (flee)
0.9.26.0, ColorPicker Control, Json.NET 7.0.1
23
NetCDF Viewer with OpenWPS (con’t)
24
기후자료 추출
• OpenWPS 사이트를 통해 자료 추출에 필요한 라이브러리와 교육자료
배포 예정
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
자료추출방법 비교 사례 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
27
자료추출방법 비교 사례 3 – 태국/라오스
- 태국 (THA, Thailand)
- 라오스 (LAO, Lao People’s Democratic Republic)
APEC CLIMATE CENTER
28
경청해 주셔서 고맙습니다.

More Related Content

PPTX
Proj4를 이용한 좌표계 변환
PPT
GeoTools와 GeoServer를 이용한 KOPSS Open API의 구현
PDF
OGC 표준 서비스를 이용한 Web KOPSS 구현사례
PPTX
오픈소스GIS 개론 과정 - OpenLayers 기초
PPTX
공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
PDF
State of OpenGXT: 오픈소스 공간분석엔진
PPTX
Python qgis advanced
PPTX
PostGIS - National Education Center for GIS: Open Source GIS
Proj4를 이용한 좌표계 변환
GeoTools와 GeoServer를 이용한 KOPSS Open API의 구현
OGC 표준 서비스를 이용한 Web KOPSS 구현사례
오픈소스GIS 개론 과정 - OpenLayers 기초
공간정보 거점대학 - OpenLayers의 고급 기능 이해 및 실습
State of OpenGXT: 오픈소스 공간분석엔진
Python qgis advanced
PostGIS - National Education Center for GIS: Open Source GIS

Similar to PyWPS 기반 OpenWPS 1.0 서비스 소개 (20)

PDF
[기상 정보학] 지상 관측 자료 (아스키 파일)를 이용하여 NetCDF 변환한 후 시계열 그래프 그리기 그리고 GPCP 강우강도 자료를 이...
PDF
[EEENAR] OpenGXT 소개와 활용
PDF
[기상청] 기상자료개방포털 사용자 안내서_20191025
PDF
weather-data-processing-using-python
PPTX
Map reduce 기본 설명
PPTX
[FOSS4G Korea 2016] Workshop - Advanced GeoServer
PDF
야생동물(Brown bear) 행동권 · 서식지 분석하기
PDF
[FOSS4G Korea 2019] 오픈소스를 활용한 역학조사 분석도구 개발
PDF
오픈소스 GIS 실습 (1)
PPTX
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
PPTX
공간정보거점대학 1.geo server_고급과정
PDF
지리정보체계(GIS) - [1] GIS 데이터 유형, 구조 알기
PPTX
GeoServer 기초
PDF
QGIS와 Tableau를 이용한 한반도 기온 변화 인포그래픽스
PDF
오픈소스 GIS 실습 (5)
PDF
[FOSS4G Korea 2021]Workshop-QGIS-TIPS-20211028
PPTX
오픈소스기반 상용소프트웨어 GXT의 적용사례
PPTX
[FOSS4G Korea 2016] GeoHash를 이용한 지형도 변화탐지와 시계열 관리
PDF
[포트폴리오] 이상호 20190913
PDF
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[기상 정보학] 지상 관측 자료 (아스키 파일)를 이용하여 NetCDF 변환한 후 시계열 그래프 그리기 그리고 GPCP 강우강도 자료를 이...
[EEENAR] OpenGXT 소개와 활용
[기상청] 기상자료개방포털 사용자 안내서_20191025
weather-data-processing-using-python
Map reduce 기본 설명
[FOSS4G Korea 2016] Workshop - Advanced GeoServer
야생동물(Brown bear) 행동권 · 서식지 분석하기
[FOSS4G Korea 2019] 오픈소스를 활용한 역학조사 분석도구 개발
오픈소스 GIS 실습 (1)
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
공간정보거점대학 1.geo server_고급과정
지리정보체계(GIS) - [1] GIS 데이터 유형, 구조 알기
GeoServer 기초
QGIS와 Tableau를 이용한 한반도 기온 변화 인포그래픽스
오픈소스 GIS 실습 (5)
[FOSS4G Korea 2021]Workshop-QGIS-TIPS-20211028
오픈소스기반 상용소프트웨어 GXT의 적용사례
[FOSS4G Korea 2016] GeoHash를 이용한 지형도 변화탐지와 시계열 관리
[포트폴리오] 이상호 20190913
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
Ad

PyWPS 기반 OpenWPS 1.0 서비스 소개

  • 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
  • 2. APEC CLIMATE CENTER 목차 OpenWPS 소개 OGC CF-netCDF 기후자료 시각화 인터페이스 기후자료 마스킹 인터페이스 서비스 시연 2
  • 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
  • 4. OpenWPS 구성도 기후정보제공 및 분석 SW/서비스/시스템/플랫폼 기후자료 사용자 그룹 • 기후자료 시각화 인터페이스 서비스 4 <OGC 표준 기반 기후자료 마스킹 (masking) 인터페이스 서비스> WPS 1.0 { "climatedata": { "version" : "0.1", "dataset" : { "slp" : { "longname" : "Sea Level Pressure", "units" : "mb", "dimension" : [73, 144], "method" : "BinaryGzipBase64", "value" : "H4sIAAAAAAAAAOyc/V8V5ff1iRBo "null_data" : -9999.000000, "coordinate" : { "type" : "Sequence", "lat" : [-90.000000, 90.000000, 2.500000], "lon" : [0.000000, 357.500000, 2.500000], "crs" : 4326 } } } }, gClimateJSON DATA XML "plot" : { "version" :"0.1", "titles" : { "ptitle" : "Sea Level Pressure", "subtitles" : ["test"] }, "grid" : { "parallels" : { "type" : "Sequence", "values" : [-90.000000, 90.000000, 30.00000], "linestyle" : { "width": 0.75, "style": "--", "color": “ } }, "meridians" : { "type" : "Sequence", "values" : [-180.000000, 180.000000, 30.00000], "linestyle" : { "width": 0.75, "color": "@gray", "opacity": 1.0, Region (GeoJSON)Parsing gClimateJSON and GeoJSON data Analyzing climate metadata Masking XML { "climatedata": { "version" : "0.1", "dataset" : { "slp" : { "longname" : "Sea Level Pressure", "units" : "mb", "dimension" : [73, 144], "method" : "BinaryGzipBase64", MaskResult DATA • 기후자료 마스킹 인터페이스 서비스 { "climatedata": { "version" : "0.1", "dataset" : { "slp" : { "longname" : "Sea Level Pressure", "units" : "mb", "dimension" : [73, 144], "method" : "BinaryGzipBase64", "value" : "H4sIAAAAAAAAAOyc/V8V5ff1iRBo "null_data" : -9999.000000, "coordinate" : { "type" : "Sequence", "lat" : [-90.000000, 90.000000, 2.500000], "lon" : [0.000000, 357.500000, 2.500000], "crs" : 4326 } } } }, gClimateJSON DATA XML "plot" : { "version" :"0.1", "titles" : { "ptitle" : "Sea Level Pressure", "subtitles" : ["test"] }, "grid" : { "parallels" : { "type" : "Sequence", "values" : [-90.000000, 90.000000, 30.00000], "linestyle" : { "width": 0.75, "style": "--", "color": “ } }, "meridians" : { "type" : "Sequence", "values" : [-180.000000, 180.000000, 30.00000], "linestyle" : { "width": 0.75, "color": "@gray", "opacity": 1.0, gClimateJSON PLOT <OGC 표준 기반 기후자료 시각화 인터페이스 서비스> WPS 1.0 gClimateJSON Parser Visualization & Output Image Compression iVBORw0KGgoAAAANSUhEUgAAA5EAAAKZCAYA AAAh9q9mAAAABHNCSVQICAgIfAhkiAAAAAlwS FlzAAAPYQAAD2EBqD+naQAAIABJREFUeJzs3Xd4F HXix/HPtvReSIAEAgm9SFUEQZCj6mEBKTbgULCAh+X nHVYUC5ZTTz3P3lBPQVBBLICCBZAmCNI7BBKSQHrP 7vz+CCxZU5hAIAHer+fxecjMd2a+Gze785lvsxiGYQ gAAAAAABOstV0BAAAA Base64 XML
  • 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/
  • 7. APEC CLIMATE CENTER 7 OGC CF-netCDF 소개
  • 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 변수
  • 11. APEC CLIMATE CENTER 11 기후자료 시각화 인터페이스
  • 12. 12 기후자료 시각화 요소 [지도 기반의 시각화 요소 (Adapted from Kosaka et al., 2012)] 등고선 (Contour line) 국가 경계 (Country boundary) 채워진 등고선 (Filled Contour) 색상막대 (Color bar) 색상막대 라벨 (Color bar label) 제목 (title) 축 라벨 (Axis label) 위경도 격자 (Lat/Lon grid)
  • 13. 데이터교환 포맷 설계 - gClimateJSON • gClimateJSON 구조 – 기후자료 (climatedata) 13
  • 14. 14 데이터교환 포맷 설계 (con’t) None BinaryBase64 BinaryGzipBase64 Memory (Float, Double, etc.) Memory (Float, Double, etc.) Memory (Float, Double, etc.) GZIP BASE64 Binary-to-text encoding BASE64 Binary-to-text encoding iVBORw0KGgoAAAANSU hEUgAAA5EAAAKZCAYA AAAh9q9mAAAABHNCS VQICAgIfAhkiAAAAAlwS FlzAAAPYQAAD2EBqD+n aQAAIABJREFUeJzs3Xd4F HXix/HPtvReSIAEAgm9SFU EQZCj6mEBKTbgULCAh+X nHVYUC5ZTTz3P3lBPQVBB LICCBZAmCNI7BBKSQHrP 7vz+CCxZU5hAIAHer+fxe cjMd2a+Gze785lvsxiGYQ gAAAAAABOstV0BAAAA Base64 iVBORw0KGgoAAAANSU hEUgAAA5EAAAKZCAYA AAAh9q9mAAAABHNCS VQICAgIfAhkiAAAAAlwS FlzAAAPYQAAD2EBqD+n aQAAIABJREFUeJzs3Xd4F HXix/HPtvReSIAEAgm9SFU EQZCj6mEBKTbgULCAh+X nHVYUC5ZTTz3P3lBPQVBB LICCBZAmCNI7BBKSQHrP 7vz+CCxZU5hAIAHer+fxe cjMd2a+Gze785lvsxiGYQ gAAAAAABOstV0BAAAA Base64 987.653686,987.653686, 987.653686,987.653686, 987.653686,987.653686 988.032714,988.096374, 988.158630,987.831481, 987.899108,987.966491, 987.223022,987.314270, 987.398986,986.930786, 987.028991,987.127319, 988.158630,987.831481, 987.899108,987.966491, 987.223022,987.314270, 987.398986,986.930786, Text - 정수부와 소수점 자릿수에 따라 데이터 크기가 결정됨 - 정수부와 소수점 자릿수에 상관없이 데이터 타입(float, real, etc.)의 크기에 따라 데이터 크기가 결정됨 - 데이터 타입(float, real, etc.)의 binary data를 Gzip 알고리즘으로 압축하여 데이터의 크기를 줄임 ※ Test data: Float Array [73, 144] - Data Size: Approx. 95 KB (4th decimal place) - Data Size: Approx. 56 KB - Data Size: Approx. 39 KB • gClimateJSON 격자 표기법
  • 15. 15 데이터교환 포맷 설계 (con’t) - titles > ptitle (그래프 제목) > subtitles (그래프 부제목) - grid > parallels (위도선) > meridians (경도선) - basemap > coastlines (해안선) > countries (국가) - map > center_position (지도 중심 위치) > projection (투영법) - contour > center_position (지도 중심 위치) - output > datatype (데이터 인코딩 방법) > format (이미지 포맷) 시각화 옵션 • gClimateJSON 구조 – 시각화 옵션 (plot)
  • 17. APEC CLIMATE CENTER 17 기후자료 마스킹 인터페이스
  • 18. 데이터교환 포맷 설계 - gClimateMaskJSON • gClimateMaskJSON 구조 – 기후자료 (climatemask) 18
  • 19. 데이터교환 포맷 설계 • MaskingOperator (마스킹 옵션) , MaskResult (마스킹 결과) 19
  • 22. 22 NetCDF Viewer with OpenWPS • 데모 어플리케이션 다운로드 및 설치 Windows Application - Programming Language: C# - Libraries: Scientific DataSet 1.3, APCC OGC.NET 0.1.0, APCC QFSciNetCDF.Net 0.1.0, SourceGrid 4.40, Fast Lightweight Expression Evaluator (flee) 0.9.26.0, ColorPicker Control, Json.NET 7.0.1
  • 23. 23 NetCDF Viewer with OpenWPS (con’t)
  • 24. 24 기후자료 추출 • OpenWPS 사이트를 통해 자료 추출에 필요한 라이브러리와 교육자료 배포 예정
  • 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
  • 27. 27 자료추출방법 비교 사례 3 – 태국/라오스 - 태국 (THA, Thailand) - 라오스 (LAO, Lao People’s Democratic Republic)
  • 28. APEC CLIMATE CENTER 28 경청해 주셔서 고맙습니다.