Path: blob/main/latex-templates/templates/atmospheric-science/radiative_transfer.tex
75 views
unlisted
\documentclass[11pt,a4paper]{article}1\usepackage[utf8]{inputenc}2\usepackage[T1]{fontenc}3\usepackage{amsmath,amssymb}4\usepackage{graphicx}5\usepackage{booktabs}6\usepackage{siunitx}7\usepackage{geometry}8\geometry{margin=1in}9\usepackage{pythontex}10\usepackage{hyperref}11\usepackage{float}1213\title{Radiative Transfer\\Beer-Lambert Law and Greenhouse Effect}14\author{Climate Science Division}15\date{\today}1617\begin{document}18\maketitle1920\begin{abstract}21Analysis of radiative transfer in the atmosphere including absorption, scattering, and the greenhouse effect.22\end{abstract}232425\section{Introduction}2627Radiative transfer describes how electromagnetic radiation propagates through the atmosphere.2829\begin{pycode}30import numpy as np31import matplotlib.pyplot as plt32plt.rcParams['text.usetex'] = True33plt.rcParams['font.family'] = 'serif'3435sigma_sb = 5.67e-8 # Stefan-Boltzmann constant36\end{pycode}3738\section{Beer-Lambert Law}3940$I(z) = I_0 e^{-\tau}$4142\begin{pycode}43tau = np.linspace(0, 5, 100)44I_I0 = np.exp(-tau)4546fig, ax = plt.subplots(figsize=(10, 6))47ax.plot(tau, I_I0, 'b-', linewidth=2)48ax.set_xlabel('Optical Depth $\\tau$')49ax.set_ylabel('$I/I_0$')50ax.set_title('Beer-Lambert Transmission')51ax.grid(True, alpha=0.3)52ax.set_ylim([0, 1])53plt.tight_layout()54plt.savefig('beer_lambert.pdf', dpi=150, bbox_inches='tight')55plt.close()56\end{pycode}5758\begin{figure}[H]59\centering60\includegraphics[width=0.85\textwidth]{beer_lambert.pdf}61\caption{Transmission as function of optical depth.}62\end{figure}6364\section{Planck Function}6566\begin{pycode}67h = 6.626e-3468c = 3e869k = 1.381e-237071wavelength = np.linspace(0.1, 50, 500) * 1e-6 # meters7273def planck(lam, T):74return 2*h*c**2/lam**5 / (np.exp(h*c/(lam*k*T)) - 1)7576fig, ax = plt.subplots(figsize=(10, 6))77for T in [5800, 300, 255]:78B = planck(wavelength, T)79if T == 5800:80B = B / 1e7 # Scale for visibility81ax.semilogy(wavelength*1e6, B, label=f'T = {T} K', linewidth=1.5)82ax.set_xlabel('Wavelength ($\\mu$m)')83ax.set_ylabel('Spectral Radiance')84ax.set_title('Planck Function')85ax.legend()86ax.grid(True, alpha=0.3, which='both')87ax.set_xlim([0, 50])88plt.tight_layout()89plt.savefig('planck_function.pdf', dpi=150, bbox_inches='tight')90plt.close()91\end{pycode}9293\begin{figure}[H]94\centering95\includegraphics[width=0.85\textwidth]{planck_function.pdf}96\caption{Planck blackbody spectra at different temperatures.}97\end{figure}9899\section{Atmospheric Absorption}100101\begin{pycode}102lam = np.linspace(0.3, 30, 1000)103104# Simplified absorption spectrum105transmission = np.ones_like(lam)106# O3 absorption (UV)107transmission *= 1 - 0.99 * np.exp(-(lam - 0.25)**2/0.01)108# H2O absorption109for center in [1.4, 1.9, 2.7, 6.3]:110transmission *= 1 - 0.8 * np.exp(-(lam - center)**2/0.1)111# CO2 absorption112for center in [4.3, 15]:113transmission *= 1 - 0.9 * np.exp(-(lam - center)**2/0.5)114115fig, ax = plt.subplots(figsize=(12, 5))116ax.fill_between(lam, 0, transmission, alpha=0.5, color='blue')117ax.plot(lam, transmission, 'b-', linewidth=1)118ax.set_xlabel('Wavelength ($\\mu$m)')119ax.set_ylabel('Transmission')120ax.set_title('Atmospheric Transmission Spectrum')121ax.grid(True, alpha=0.3)122ax.set_xlim([0, 30])123plt.tight_layout()124plt.savefig('atmospheric_transmission.pdf', dpi=150, bbox_inches='tight')125plt.close()126\end{pycode}127128\begin{figure}[H]129\centering130\includegraphics[width=0.95\textwidth]{atmospheric_transmission.pdf}131\caption{Atmospheric transmission showing absorption bands.}132\end{figure}133134\section{Greenhouse Effect}135136\begin{pycode}137# Simple greenhouse model138S = 1361 # Solar constant W/m^2139albedo = 0.3140epsilon = np.linspace(0, 1, 100) # Atmospheric emissivity141142T_surface = ((S * (1 - albedo) / 4) / (sigma_sb * (1 - epsilon/2)))**0.25143144fig, ax = plt.subplots(figsize=(10, 6))145ax.plot(epsilon, T_surface - 273.15, 'b-', linewidth=2)146ax.axhline(y=15, color='r', linestyle='--', label='Current Earth')147ax.set_xlabel('Atmospheric Emissivity $\\epsilon$')148ax.set_ylabel('Surface Temperature ($^\\circ$C)')149ax.set_title('Greenhouse Effect')150ax.legend()151ax.grid(True, alpha=0.3)152plt.tight_layout()153plt.savefig('greenhouse_effect.pdf', dpi=150, bbox_inches='tight')154plt.close()155\end{pycode}156157\begin{figure}[H]158\centering159\includegraphics[width=0.85\textwidth]{greenhouse_effect.pdf}160\caption{Surface temperature vs atmospheric emissivity.}161\end{figure}162163\section{Radiative Forcing}164165\begin{pycode}166CO2 = np.linspace(280, 800, 100) # ppm167RF = 5.35 * np.log(CO2 / 280) # W/m^2168169fig, ax = plt.subplots(figsize=(10, 6))170ax.plot(CO2, RF, 'b-', linewidth=2)171ax.axvline(x=420, color='r', linestyle='--', label='Current (2023)')172ax.set_xlabel('CO$_2$ Concentration (ppm)')173ax.set_ylabel('Radiative Forcing (W/m$^2$)')174ax.set_title('CO$_2$ Radiative Forcing')175ax.legend()176ax.grid(True, alpha=0.3)177plt.tight_layout()178plt.savefig('radiative_forcing.pdf', dpi=150, bbox_inches='tight')179plt.close()180\end{pycode}181182\begin{figure}[H]183\centering184\includegraphics[width=0.85\textwidth]{radiative_forcing.pdf}185\caption{Radiative forcing from CO$_2$ increase.}186\end{figure}187188\section{Scattering}189190\begin{pycode}191# Rayleigh scattering192lam_scat = np.linspace(0.3, 0.8, 100)193sigma_rayleigh = 1 / lam_scat**4194sigma_rayleigh = sigma_rayleigh / sigma_rayleigh[0]195196# Mie scattering (simplified)197sigma_mie = np.ones_like(lam_scat) * 0.3198199fig, ax = plt.subplots(figsize=(10, 6))200ax.plot(lam_scat, sigma_rayleigh, 'b-', linewidth=2, label='Rayleigh')201ax.plot(lam_scat, sigma_mie, 'r-', linewidth=2, label='Mie')202ax.set_xlabel('Wavelength ($\\mu$m)')203ax.set_ylabel('Relative Scattering Cross-section')204ax.set_title('Atmospheric Scattering')205ax.legend()206ax.grid(True, alpha=0.3)207plt.tight_layout()208plt.savefig('scattering.pdf', dpi=150, bbox_inches='tight')209plt.close()210\end{pycode}211212\begin{figure}[H]213\centering214\includegraphics[width=0.85\textwidth]{scattering.pdf}215\caption{Wavelength dependence of atmospheric scattering.}216\end{figure}217218\section{Results}219220\begin{pycode}221T_no_atm = (S * (1 - albedo) / (4 * sigma_sb))**0.25222T_with_atm = 288 # K223greenhouse_warming = T_with_atm - T_no_atm224225print(r'\begin{table}[H]')226print(r'\centering')227print(r'\caption{Earth Energy Balance}')228print(r'\begin{tabular}{@{}lc@{}}')229print(r'\toprule')230print(r'Parameter & Value \\')231print(r'\midrule')232print(f'Solar constant & {S} W/m$^2$ \\\\')233print(f'Planetary albedo & {albedo} \\\\')234print(f'Effective temperature & {T_no_atm:.0f} K \\\\')235print(f'Greenhouse warming & {greenhouse_warming:.0f} K \\\\')236print(r'\bottomrule')237print(r'\end{tabular}')238print(r'\end{table}')239\end{pycode}240241\section{Conclusions}242243Radiative transfer processes control Earth's energy balance and climate.244245246\end{document}247248249