|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Meteorology" |
| 8 | + ] |
| 9 | + }, |
| 10 | + { |
| 11 | + "cell_type": "markdown", |
| 12 | + "metadata": {}, |
| 13 | + "source": [ |
| 14 | + "## Overview\n", |
| 15 | + "\n", |
| 16 | + "This section covers meteorology functions from NCL:\n", |
| 17 | + "\n", |
| 18 | + "- [dewtemp_trh](https://www.ncl.ucar.edu/Document/Functions/Built-in/dewtemp_trh.shtml)\n", |
| 19 | + "- [daylight_fao56](https://www.ncl.ucar.edu/Document/Functions/Crop/daylight_fao56.shtml)" |
| 20 | + ] |
| 21 | + }, |
| 22 | + { |
| 23 | + "cell_type": "markdown", |
| 24 | + "metadata": {}, |
| 25 | + "source": [ |
| 26 | + "## dewtemp_trh\n", |
| 27 | + "NCL's `dewtemp_trh` calculates the dew point temperature given temperature and relative humidity using the equations from John Dutton's _\"Ceaseless Wind\"_ (pg. 273-274){footcite}`dutton_1986` and returns a temperature in Kelvin\n", |
| 28 | + "\n", |
| 29 | + "<div class=\"admonition alert alert-info\">\n", |
| 30 | + " <p class=\"admonition-title\" style=\"font-weight:bold\">Important Note</p>\n", |
| 31 | + " To convert from Kelvin to Celsius <code>-273.15</code> and to convert from Celsius to Kelvin <code>+273.15</code>\n", |
| 32 | + "</div>" |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "cell_type": "markdown", |
| 37 | + "metadata": {}, |
| 38 | + "source": [ |
| 39 | + "### Grab and Go" |
| 40 | + ] |
| 41 | + }, |
| 42 | + { |
| 43 | + "cell_type": "code", |
| 44 | + "execution_count": null, |
| 45 | + "metadata": {}, |
| 46 | + "outputs": [], |
| 47 | + "source": [ |
| 48 | + "# Input: Single Value\n", |
| 49 | + "from geocat.comp import dewtemp\n", |
| 50 | + "\n", |
| 51 | + "temp_c = 18 # Celsius\n", |
| 52 | + "relative_humidity = 46.5 # %\n", |
| 53 | + "\n", |
| 54 | + "dewtemp(temp_c + 273.15, relative_humidity) - 273.15 # Returns in Celsius" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "code", |
| 59 | + "execution_count": null, |
| 60 | + "metadata": {}, |
| 61 | + "outputs": [], |
| 62 | + "source": [ |
| 63 | + "# Input: List/Array\n", |
| 64 | + "from geocat.comp import dewtemp\n", |
| 65 | + "\n", |
| 66 | + "temp_kelvin = [291.15, 274.14, 360.3, 314] # Kelvin\n", |
| 67 | + "relative_humidity = [46.5, 5, 96.5, 1] # %\n", |
| 68 | + "\n", |
| 69 | + "dewtemp(temp_kelvin, relative_humidity) - 273.15 # Returns in Celsius" |
| 70 | + ] |
| 71 | + }, |
| 72 | + { |
| 73 | + "cell_type": "markdown", |
| 74 | + "metadata": {}, |
| 75 | + "source": [ |
| 76 | + "## daylight_fao56\n", |
| 77 | + "\n", |
| 78 | + "NCL's `daylight_fao56` calculates the maximum number of daylight hours as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 [(Chapter 3, Equation 34)](https://www.fao.org/4/X0490E/x0490e07.htm#chapter%203%20%20%20meteorological%20data) {footcite}`allan_fao_1998`" |
| 79 | + ] |
| 80 | + }, |
| 81 | + { |
| 82 | + "cell_type": "markdown", |
| 83 | + "metadata": {}, |
| 84 | + "source": [ |
| 85 | + "### Grab and Go" |
| 86 | + ] |
| 87 | + }, |
| 88 | + { |
| 89 | + "cell_type": "code", |
| 90 | + "execution_count": null, |
| 91 | + "metadata": {}, |
| 92 | + "outputs": [], |
| 93 | + "source": [ |
| 94 | + "# Input: Single Value\n", |
| 95 | + "from geocat.comp import max_daylight\n", |
| 96 | + "\n", |
| 97 | + "day_of_year = 246 # Sept. 3\n", |
| 98 | + "latitude = -20 # 20 Degrees South\n", |
| 99 | + "\n", |
| 100 | + "max_daylight(day_of_year, latitude)" |
| 101 | + ] |
| 102 | + }, |
| 103 | + { |
| 104 | + "cell_type": "code", |
| 105 | + "execution_count": null, |
| 106 | + "metadata": {}, |
| 107 | + "outputs": [], |
| 108 | + "source": [ |
| 109 | + "# Input: List/Array\n", |
| 110 | + "from geocat.comp import max_daylight\n", |
| 111 | + "\n", |
| 112 | + "# Spring Equinox (March 20), Summer Solstice (June 20), Autumn Equinox (Sept. 22), Winter Solstice (Dec. 21)\n", |
| 113 | + "days_of_year = [79, 171, 265, 355]\n", |
| 114 | + "latitudes = 40 # Boulder\n", |
| 115 | + "\n", |
| 116 | + "max_daylight(days_of_year, latitudes)" |
| 117 | + ] |
| 118 | + }, |
| 119 | + { |
| 120 | + "cell_type": "markdown", |
| 121 | + "metadata": {}, |
| 122 | + "source": [ |
| 123 | + "---" |
| 124 | + ] |
| 125 | + }, |
| 126 | + { |
| 127 | + "cell_type": "markdown", |
| 128 | + "metadata": {}, |
| 129 | + "source": [ |
| 130 | + "## Python Resources\n", |
| 131 | + "- [GeoCAT-comp `dewtemp` documentation](https://geocat-comp.readthedocs.io/en/latest/user_api/generated/geocat.comp.meteorology.dewtemp.html)\n", |
| 132 | + "- [Convert between different temperature scales in SciPy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.constants.convert_temperature.html)\n", |
| 133 | + "- [GeoCAT-comp `max_daylight` Documentation](https://geocat-comp.readthedocs.io/en/latest/user_api/generated/geocat.comp.meteorology.max_daylight.html)\n", |
| 134 | + "\n", |
| 135 | + "## Additional Reading\n", |
| 136 | + "- [NOAA: Dew Point vs. Humidity](https://www.weather.gov/arx/why_dewpoint_vs_humidity)" |
| 137 | + ] |
| 138 | + }, |
| 139 | + { |
| 140 | + "cell_type": "markdown", |
| 141 | + "metadata": {}, |
| 142 | + "source": [ |
| 143 | + "## References:\n", |
| 144 | + "\n", |
| 145 | + "```{footbibliography}\n", |
| 146 | + "```" |
| 147 | + ] |
| 148 | + } |
| 149 | + ], |
| 150 | + "metadata": { |
| 151 | + "kernelspec": { |
| 152 | + "display_name": "Python 3 (ipykernel)", |
| 153 | + "language": "python", |
| 154 | + "name": "python3" |
| 155 | + }, |
| 156 | + "language_info": { |
| 157 | + "codemirror_mode": { |
| 158 | + "name": "ipython", |
| 159 | + "version": 3 |
| 160 | + }, |
| 161 | + "file_extension": ".py", |
| 162 | + "mimetype": "text/x-python", |
| 163 | + "name": "python", |
| 164 | + "nbconvert_exporter": "python", |
| 165 | + "pygments_lexer": "ipython3", |
| 166 | + "version": "3.11.8" |
| 167 | + } |
| 168 | + }, |
| 169 | + "nbformat": 4, |
| 170 | + "nbformat_minor": 4 |
| 171 | +} |
0 commit comments