Last active
March 24, 2017 19:53
-
-
Save jrleeman/f2e43c81d26741de39b175c280cb2ba5 to your computer and use it in GitHub Desktop.
Example of find intersections failure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"import numpy.ma as ma\n", | |
"import metpy.calc as mpcalc\n", | |
"from metpy.units import units\n", | |
"\n", | |
"%matplotlib inline" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# No Masked Data" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"p = ma.masked_array([1000,900,800,700,600,500]) * units.mbar\n", | |
"T = ma.masked_array([20,15,10,5,0,-5]) * units.degC\n", | |
"profile = ma.masked_array([30,20,8,0,-10, -20]) * units.degC" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.collections.PathCollection at 0x1182fd128>" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPW9//HXhxAgrGFPWMIii5C4gLmIWJFNEtSK9apX\nvXWr99LNrVVv3arWauvSTWttL79qtd5WpXUBF8ImLlXBBtGQsAgChUAWIBC2xGzf3x/nhISQQJaZ\nTGbm/Xw8eGRy5iTn+yX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xe0eYdl\n4JtZFzPrVv0Y71xvNrAAqH5H+1pgvv94AXCN/674RKC4+p9YbZ1zLh/Ybmaj/U3TgbVE4FzruJKa\n0zkQufPdBkw0s85mZtT8fJcDl/r71J1v9d/DpcA7zj/RGw7MrJ//MQm4BO9nHKk/22pNnd8iYKaZ\n9fT/BTjT39ZyoX6Do5lvigzH++fg50AOcI+/vTewDO9VwzKgl7/dgN8BXwJrgNRQz6GJ8z0dyASy\ngNfx3rmPyLn6c+gM7AF61NoWyfP9CbAe70XLC0BH/7/xT4BNeKe1Ovr7dvI/3+Q/PzzU42/iXD/A\n+4X2OTA90n62eL/A8oByvFfqNzRnfsC3/J/xJuD6QI1PTVsRkSgRlqd0RESk6RT4IiJRQoEvIhIl\nFPgiIlFCgS8iEiUU+CIiUUKBLyISJRT4IiJR4v8DMLlFqRIelIEAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x117f3e908>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plt.plot(p, T)\n", | |
"plt.scatter(p, T)\n", | |
"plt.plot(p, profile)\n", | |
"plt.scatter(p, profile)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[828.5714285714286] millibar [11.428571428571427] degC\n" | |
] | |
} | |
], | |
"source": [ | |
"x, y = mpcalc.find_intersections(p, T, profile, direction='increasing')\n", | |
"print(x, y)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# With masked data\n", | |
"\n", | |
"Note that it plots masked as a value of 1, but the calculation behaves as below." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"p = ma.masked_array([1000,900,800,700,600,500]) * units.mbar\n", | |
"T = ma.masked_array([20,15,10,5,0,-5], mask=[True, False, True, False, False, False]) * units.degC\n", | |
"profile = ma.masked_array([30,20,8,0,-10, -20]) * units.degC" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.collections.PathCollection at 0x11a4219e8>" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8FfW9//HXh7CFRcISCLKDuIEoGBGwrqCgtWi9itpb\nQG0v1qXqbXGrlUfLbavW3vZa9eeFWipaq4JaAbUsckFRcAlbZJVVSNgDhC2Q7fv7YyYQQkJCMidn\nmffz8eBxzpkznPkO0fc5mTPv+ZpzDhERSXx1oj0AERGpHQp8EZGQUOCLiISEAl9EJCQU+CIiIaHA\nFxEJCQW+iEhIKPBFREJCgS8iEhJ1oz2A0lq1auU6d+4c7WGIiMSVhQsX7nLOpVa2XkwFfufOncnI\nyIj2MERE4oqZfVuV9XRIR0QkJBT4IiIhocAXEQkJBb6ISEgo8EVEQkKBLyISEgp8EZGQqHHgm1lD\nM/vSzJaa2XIz+7W/vIuZfWFma8zsLTOrX/PhiohIdQXxCf8IcJVz7nzgAmCImfUDngH+5JzrDuwB\nfhTAtkRE4l/mJPhTT/hVinebOalWNlvjwHeeA/7Dev4fB1wFvO0vnwjcWNNtiYjEvcxJMO0ByN0M\nOO922gO1EvqBHMM3syQzWwLsAGYB64C9zrlCf5UsoF0Q2xIRiWuzx0JB3vHLCvK85REWSOA754qc\ncxcA7YG+wDnlrVbe3zWzUWaWYWYZO3fuDGI4IiKxK3dzBcuzIr7pQM/Scc7tBeYC/YAUM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fr/Wf7xrt8Z/ivs7De0NbCgxMtJ8t3hvYVqAA\n75P6j6qzf8Bd/s94LXBnUONT01ZEJCTi8pCOiIicOgW+iEhIKPBFREJCgS8iEhIKfBGRkFDgi4iE\nhAJfRCQkFPgiIiHx/wGFiIuxIkuvlwAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x10e88d8d0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plt.plot(p, T)\n", | |
"plt.scatter(p, T)\n", | |
"plt.plot(p, profile)\n", | |
"plt.scatter(p, profile)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[] millibar [] degC\n" | |
] | |
} | |
], | |
"source": [ | |
"x, y = mpcalc.find_intersections(p, T, profile, direction='increasing')\n", | |
"print(x, y)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# With masked data, without units" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"p = ma.masked_array([1000,900,800,700,600,500])\n", | |
"T = ma.masked_array([20,15,10,5,0,-5], mask=[True, False, True, False, False, False])\n", | |
"profile = ma.masked_array([30,20,8,0,-10, -20])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.collections.PathCollection at 0x11a4fb630>" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAA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\nrZ7AuuxVm5IyoMw597b/+Gm8XwBRHGuiC4D3nHMb/MdRHe9wYJVzbpNzrgp4BjgdKDCzlv42iWPa\nN15/fXvgs+yW3HzOuYecc4Odc2fh1b2C6L62tZo6voyNO5SBb2btzOyI2vt4x3pLgRlA7Sfa44Dp\n/v0ZwFj/U/EhQEXtn1i5zjlXDqwxs/7+omHAUiI41jquYP/hHIjueD8FhpjZYWZm7H99XwQu87ep\nO97af4fLgBecf6A3DMzsaP+2F3Ap3msc1de2VlPHNwc4z8w6+H8BnucvS13QH3A080ORvnh/Dr4P\nLAFu95cfBczHe9cwH+joLzfgfuAjYDFQGPQYmjjeU4BioASYhvfJfSTH6o/hMGAL0D5hWZTHewew\nDO9Ny2NAG///+DvASrzDWm38bdv6j1f66/sGXX8Tx/oq3i+094FhUXtt8X6BrQeq8N6pX9Oc8QHf\n9V/jlcDV6apPnbYiIjERykM6IiLSdAp8EZGYUOCLiMSEAl9EJCYU+CIiMaHAFxGJCQW+iEhMKPBF\nRGLi/wO/Atqg1ZlVZAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x11a457dd8>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plt.plot(p, T)\n", | |
"plt.scatter(p, T)\n", | |
"plt.plot(p, profile)\n", | |
"plt.scatter(p, profile)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[] []\n" | |
] | |
} | |
], | |
"source": [ | |
"x, y = mpcalc.find_intersections(p, T, profile, direction='increasing')\n", | |
"print(x, y)" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python [conda env:metpydev35]", | |
"language": "python", | |
"name": "conda-env-metpydev35-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment