{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Basic Radiative Transfer Calculation with HR\n", "\n", "In this example we perform a full radiative transfer calculation using the HR model. The example is very similar to the one done in the quickstart guide, so see the quickstart guide for more information." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import sasktran as sk\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from sasktran.geometry import VerticalImage\n", "\n", "tanalts_km = np.arange(10, 50, 1)\n", "\n", "# First recreate our geometry and atmosphere classes\n", "geometry = VerticalImage()\n", "geometry.from_sza_saa(sza=60, saa=60, lat=0, lon=0, tanalts_km=tanalts_km, mjd=54372, locallook=0,\n", " satalt_km=600, refalt_km=20)\n", "\n", "atmosphere = sk.Atmosphere()\n", "\n", "atmosphere['ozone'] = sk.Species(sk.O3OSIRISRes(), sk.Labow())\n", "atmosphere['air'] = sk.Species(sk.Rayleigh(), sk.MSIS90())\n", "\n", "# And now make the engine\n", "engine = sk.EngineHR(geometry=geometry, atmosphere=atmosphere)\n", "\n", "# Choose some wavelengths to do the calculation at\n", "engine.wavelengths = [340, 600]\n", "\n", "# And do the calculation\n", "radiance = engine.calculate_radiance()\n", "\n", "plt.plot(radiance.T, tanalts_km)\n", "plt.xlabel('Sun Normalized Radiance')\n", "plt.ylabel('Altitude [km]')\n", "\n", "plt.legend(['340 nm', '600 nm'])\n", "\n", "plt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python [default]", "language": "python", "name": "python3" }, "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.6.2" } }, "nbformat": 4, "nbformat_minor": 2 }