forked from flashlxy/PyMICAPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UV.py
32 lines (26 loc) · 1.25 KB
/
UV.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
#
# Author: Liu xianyao
# Email: [email protected]
# Update: 2017-04-11
# Copyright: ©江西省气象台 2017
# Version: 2.0.20170411
from __future__ import print_function
from Projection import Projection
class UV:
def __init__(self, root):
leaf = root.find("UV")
if leaf is None:
return
self.stream = Projection.leaf_to_bool(leaf, 'Stream', False)
self.density = Projection.leaf_to_list(leaf, 'Density', [1, 1])
self.barbsgrid = Projection.leaf_to_list(leaf, 'BarbsGrid', [31, 31])
self.color = Projection.leaf_to_string(leaf, 'Color', 'k')
self.onspeed = Projection.leaf_to_bool(leaf, 'OnSpeed', False)
self.wholecilp = Projection.leaf_to_bool(leaf, 'WholeClip', False)
self.oncolor = Projection.leaf_to_bool(leaf, 'OnColor', False)
self.linewidth = Projection.leaf_to_float(leaf, 'LineWidth', 1.)
self.scale = Projection.leaf_to_int(leaf, 'Scale', 700)
self.markscalelength = Projection.leaf_to_float(leaf, 'MarkScaleLength', 12.)
self.barbs = Projection.leaf_to_bool(leaf, 'Barbs', False)
self.length = Projection.leaf_to_int(leaf, 'Length', 1)