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
d614b74c
Commit
d614b74c
authored
Feb 07, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
790ca775
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
7 deletions
+50
-7
.gitignore
.gitignore
+1
-0
.vscode/settings.json
.vscode/settings.json
+4
-0
.vscode/tasks.json
.vscode/tasks.json
+5
-7
main.sh
main.sh
+3
-0
run/run.py
run/run.py
+37
-0
No files found.
.gitignore
View file @
d614b74c
run.cfg
\ No newline at end of file
.vscode/settings.json
0 → 100644
View file @
d614b74c
{
"python.pythonPath"
:
"c:/Python27/python.exe"
,
"python.linting.enabled"
:
false
}
\ No newline at end of file
.vscode/tasks.json
View file @
d614b74c
{
//
See
https://go.microsoft.com/fwlink/?LinkId=
733558
//
for
the
documentation
about
the
tasks.json
format
"version"
:
"0.1.0"
,
"command"
:
"echo"
,
"isShellCommand"
:
true
,
"args"
:
[
"Hello World"
],
"showOutput"
:
"never"
"version"
:
"0.1.0"
,
"command"
:
"python"
,
"isShellCommand"
:
true
,
"showOutput"
:
"always"
,
"args"
:
[
"${file}"
]
}
\ No newline at end of file
main.sh
0 → 100644
View file @
d614b74c
#!/usr/bin/sh
cd
/local_disk/SMHI-padmwsverify/run
./run.py
\ No newline at end of file
run/run.py
0 → 100644
View file @
d614b74c
#!/usr/bin/python
# coding: utf-8
import
json
import
ConfigParser
as
cp
global
settings
settings
=
cp
.
ConfigParser
()
settings
.
read
(
'run.cfg'
)
class
Runner_HELCOM_NEMO
:
def
__init__
(
self
):
self
.
data
=
[]
def
__call__
(
self
):
'''
#!/bin/bash
. padmrun.properties
WID=`curl -u $USER:$PWD -s -I -X POST $HOST/workarea/v2 | grep Location: | awk {'print $2'} | rev | cut -d/ -f1 | rev | tr -d '
\r
'`
curl -u $USER:$PWD -X POST -d 'padmVersion=NS03_HIRLAM_2.7&modelSetupVersion=NS03_HIRLAM&forcingVersion=NS03_HIRLAM' $HOST/workarea/v2/$WID/op/version
curl -u $USER:$PWD -X POST -H 'Content-type: application/json' -d '{ "forecastMethod": "HIRLAM", "outletType": "AREA","forwardCalculation": "true", "start": "2016-06-01 00:00:00", "end": "2016-06-01 12:00:00", "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" }' $HOST/workarea/v2/$WID/op/setting
curl -u $USER:$PWD -X POST -H 'Content-type: application/json' -d '{"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}]}' $HOST/workarea/v2/$WID/op/coordinates
curl -u $USER:$PWD -v -X POST -d 'workareaId='$WID $HOST/runner/v2
echo $WID
'''
return
""
def
main
():
Runner_HELCOM_NEMO
()
if
__name__
==
"__main__"
:
main
()
\ No newline at end of file
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