Skip to content

Commit

Permalink
notebooks added from phoenix
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Mar 11, 2015
1 parent f754d04 commit de837af
Show file tree
Hide file tree
Showing 22 changed files with 2,868 additions and 0 deletions.
11 changes: 11 additions & 0 deletions notebooks/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
IPython Notebooks for Phoenix WPS Client
========================================

Folders
-------

**pingutests** - Some test notebooks by pingu ...
**tutorial** - notebooks used for wps tutorial



213 changes: 213 additions & 0 deletions notebooks/nilstest/indice_worker.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
{
"metadata": {
"name": "",
"signature": "sha256:cef281dbc005bfa0f48586643af3a892c31f5fd7dcbff5acc15b5717e5556d1c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from owslib.wps import WebProcessingService, monitorExecution "
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"wps = WebProcessingService(url='http://localhost:8090/wps') "
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"identifier = 'de.csc.indice.worker'"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"token = 'KQAmPTcYQHuCWB2IzilrXA'"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"tasmax_url = 'http://localhost:8090/thredds/fileServer/test/nils.hempelmann@hzg.de/tasmax_EUR-11_ICHEC-EC-EARTH_historical_r3i1p1_DMI-HIRHAM5_v1_day_20040101-20051231.nc' \n"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 6
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"tas_url = 'http://localhost:8090/thredds/fileServer/test/nils.hempelmann@hzg.de/tas_EUR-11_CNRM-CERFACS-CNRM-CM5_historical_r1i1p1_SMHI-RCA4_v1_mon_200101-200512.nc' \n"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 7
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"datainputs = []\n",
"datainputs.append(('token',token))\n",
"datainputs.append(('file_identifier',tasmax_url))\n",
"datainputs.append(('file_identifier',tas_url))\n",
"datainputs.append(('SU','True'))\n",
"datainputs.append(('TG_6to8','True'))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"execute = wps.execute(identifier=identifier, inputs=datainputs, output=[('output', True)])\n",
"\n",
"monitorExecution(execute)\n",
"o = execute.processOutputs[0]\n",
"print o.reference\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Executing WPS request...\n",
"Execution status=ProcessAccepted"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Percent completed=0\n",
"Status message=Process de.csc.indice.worker accepted\n",
"\n",
"Checking execution status... (location=http://localhost:8091/wpsoutputs/pywps-4904b68a-d5fc-11e3-b2e2-d4bed959f031.xml)\n",
"Execution status=ProcessAccepted\n",
"Percent completed=0\n",
"Status message=Process de.csc.indice.worker accepted\n",
"Sleeping 3 seconds...\n",
"Execution status: ProcessAccepted"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Checking execution status... (location=http://localhost:8091/wpsoutputs/pywps-4904b68a-d5fc-11e3-b2e2-d4bed959f031.xml)\n",
"Execution status=ProcessPaused\n",
"Percent completed=0\n",
"Status message=Getting input file_identifier of process de.csc.indice.worker\n",
"Sleeping 3 seconds...\n",
"Execution status: ProcessPaused"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Checking execution status... (location=http://localhost:8091/wpsoutputs/pywps-4904b68a-d5fc-11e3-b2e2-d4bed959f031.xml)\n",
"Execution status=ProcessPaused\n",
"Percent completed=0\n",
"Status message=Getting input file_identifier of process de.csc.indice.worker\n",
"Sleeping 3 seconds...\n",
"Execution status: ProcessPaused"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Checking execution status... (location=http://localhost:8091/wpsoutputs/pywps-4904b68a-d5fc-11e3-b2e2-d4bed959f031.xml)\n"
]
},
{
"ename": "XMLSyntaxError",
"evalue": "None",
"output_type": "pyerr",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<string>\"\u001b[1;36m, line \u001b[1;32munknown\u001b[0m\n\u001b[1;31mXMLSyntaxError\u001b[0m\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print o.reference\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'o' is not defined",
"output_type": "pyerr",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-10-c16d995310f9>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mprint\u001b[0m \u001b[0mo\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreference\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'o' is not defined"
]
}
],
"prompt_number": 10
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}

0 comments on commit de837af

Please sign in to comment.