Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
padmwsverify
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
wt
padmwsverify
Commits
dbc90929
Commit
dbc90929
authored
Feb 08, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
d614b74c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
7 deletions
+73
-7
run/helcom_nemo_1.json
run/helcom_nemo_1.json
+36
-0
run/run.py
run/run.py
+37
-7
No files found.
run/helcom_nemo_1.json
0 → 100644
View file @
dbc90929
{
"setting"
:
{
"forecastMethod"
:
"HIRLAM"
,
"outletType"
:
"AREA"
,
"forwardCalculation"
:
"true"
,
"start"
:
"STARTDATE"
,
"end"
:
"ENDDATE"
,
"calculationType"
:
"Oil classes"
,
"substance"
:
"Medium oils (100-1000 cSt)"
,
"fresh"
:
"true"
,
"winddrag"
:
"0.00"
,
"outletPoints"
:
"3"
,
"depth"
:
"0"
,
"instantaneous"
:
"true"
,
"amount"
:
"100"
,
"amountUnit"
:
"m3"
,
"duration"
:
"24"
,
"durationUnit"
:
"hours"
,
"uncertainty"
:
"false"
,
"calculationMode"
:
"Normal"
},
"coordinate"
:
[{
"latitude"
:
60.356127978060933
,
"longitude"
:
26.961650443838113
},
{
"latitude"
:
60.348048724559071
,
"longitude"
:
26.934164170849897
},
{
"latitude"
:
60.357731733846322
,
"longitude"
:
26.935840154054311
},
{
"latitude"
:
60.362457652517769
,
"longitude"
:
26.958385167216541
}],
"timeperiod"
:
24
}
\ No newline at end of file
run/run.py
View file @
dbc90929
...
...
@@ -2,16 +2,45 @@
# coding: utf-8
import
json
import
ConfigParser
as
cp
from
pprint
import
pprint
from
ConfigParser
import
SafeConfigParser
global
settings
settings
=
cp
.
ConfigParser
()
settings
.
read
(
'run.cfg'
)
class
Runner_HELCOM_NEMO
:
# class RegexValidator(object):
# def __call__(self, value):
# # validation logic
# class URLValidator(RegexValidator):
# def __call__(self, value):
# super(URLValidator, self).__call__(value)
# #additional logic
# class EmailValidator(RegexValidator):
# # some logic
# for v in [custom_validator, EmailValidator()]:
# v(value) # <-----
class
Runner
:
def
__init__
(
self
):
self
.
data
=
[]
settings
=
SafeConfigParser
()
settings
.
read
(
'run/run.cfg'
)
self
.
url
=
settings
.
get
(
'misc'
,
'url'
);
self
.
usr
=
settings
.
get
(
'misc'
,
'usr'
);
self
.
pwd
=
settings
.
get
(
'misc'
,
'pwd'
);
def
__call__
(
self
):
usr
=
self
.
settings
.
get
(
'misc'
,
'usr'
);
pwd
=
self
.
settings
.
get
(
'misc'
,
'pwd'
);
print
usr
,
pwd
pprint
(
helcom_nemo_1
)
class
HELCOM_NEMO
:
def
__init__
(
self
):
with
open
(
'run/helcom_nemo_1.json'
)
as
helcom_nemo_1_file
:
self
.
helcom_nemo_1
=
json
.
load
(
helcom_nemo_1_file
)
def
__call__
(
self
):
super
(
Runner
,
self
).
__call__
(
value
)
'''
#!/bin/bash
...
...
@@ -30,7 +59,8 @@ class Runner_HELCOM_NEMO:
return
""
def
main
():
Runner_HELCOM_NEMO
()
for
v
in
[
HELCOM_NEMO
()]:
v
()
# <-----
if
__name__
==
"__main__"
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment