Commit d614b74c authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

init

parent 790ca775
run.cfg
\ No newline at end of file
{
"python.pythonPath": "c:/Python27/python.exe",
"python.linting.enabled": false
}
\ No newline at end of file
{
// 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
#!/usr/bin/sh
cd /local_disk/SMHI-padmwsverify/run
./run.py
\ No newline at end of file
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment