Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ok-landscape
GitHub Repository: Ok-landscape/computational-pipeline
Path: blob/main/latex-templates/templates/atmospheric-science/radiative_transfer.tex
75 views
unlisted
1
\documentclass[11pt,a4paper]{article}
2
\usepackage[utf8]{inputenc}
3
\usepackage[T1]{fontenc}
4
\usepackage{amsmath,amssymb}
5
\usepackage{graphicx}
6
\usepackage{booktabs}
7
\usepackage{siunitx}
8
\usepackage{geometry}
9
\geometry{margin=1in}
10
\usepackage{pythontex}
11
\usepackage{hyperref}
12
\usepackage{float}
13
14
\title{Radiative Transfer\\Beer-Lambert Law and Greenhouse Effect}
15
\author{Climate Science Division}
16
\date{\today}
17
18
\begin{document}
19
\maketitle
20
21
\begin{abstract}
22
Analysis of radiative transfer in the atmosphere including absorption, scattering, and the greenhouse effect.
23
\end{abstract}
24
25
26
\section{Introduction}
27
28
Radiative transfer describes how electromagnetic radiation propagates through the atmosphere.
29
30
\begin{pycode}
31
import numpy as np
32
import matplotlib.pyplot as plt
33
plt.rcParams['text.usetex'] = True
34
plt.rcParams['font.family'] = 'serif'
35
36
sigma_sb = 5.67e-8 # Stefan-Boltzmann constant
37
\end{pycode}
38
39
\section{Beer-Lambert Law}
40
41
$I(z) = I_0 e^{-\tau}$
42
43
\begin{pycode}
44
tau = np.linspace(0, 5, 100)
45
I_I0 = np.exp(-tau)
46
47
fig, ax = plt.subplots(figsize=(10, 6))
48
ax.plot(tau, I_I0, 'b-', linewidth=2)
49
ax.set_xlabel('Optical Depth $\\tau$')
50
ax.set_ylabel('$I/I_0$')
51
ax.set_title('Beer-Lambert Transmission')
52
ax.grid(True, alpha=0.3)
53
ax.set_ylim([0, 1])
54
plt.tight_layout()
55
plt.savefig('beer_lambert.pdf', dpi=150, bbox_inches='tight')
56
plt.close()
57
\end{pycode}
58
59
\begin{figure}[H]
60
\centering
61
\includegraphics[width=0.85\textwidth]{beer_lambert.pdf}
62
\caption{Transmission as function of optical depth.}
63
\end{figure}
64
65
\section{Planck Function}
66
67
\begin{pycode}
68
h = 6.626e-34
69
c = 3e8
70
k = 1.381e-23
71
72
wavelength = np.linspace(0.1, 50, 500) * 1e-6 # meters
73
74
def planck(lam, T):
75
return 2*h*c**2/lam**5 / (np.exp(h*c/(lam*k*T)) - 1)
76
77
fig, ax = plt.subplots(figsize=(10, 6))
78
for T in [5800, 300, 255]:
79
B = planck(wavelength, T)
80
if T == 5800:
81
B = B / 1e7 # Scale for visibility
82
ax.semilogy(wavelength*1e6, B, label=f'T = {T} K', linewidth=1.5)
83
ax.set_xlabel('Wavelength ($\\mu$m)')
84
ax.set_ylabel('Spectral Radiance')
85
ax.set_title('Planck Function')
86
ax.legend()
87
ax.grid(True, alpha=0.3, which='both')
88
ax.set_xlim([0, 50])
89
plt.tight_layout()
90
plt.savefig('planck_function.pdf', dpi=150, bbox_inches='tight')
91
plt.close()
92
\end{pycode}
93
94
\begin{figure}[H]
95
\centering
96
\includegraphics[width=0.85\textwidth]{planck_function.pdf}
97
\caption{Planck blackbody spectra at different temperatures.}
98
\end{figure}
99
100
\section{Atmospheric Absorption}
101
102
\begin{pycode}
103
lam = np.linspace(0.3, 30, 1000)
104
105
# Simplified absorption spectrum
106
transmission = np.ones_like(lam)
107
# O3 absorption (UV)
108
transmission *= 1 - 0.99 * np.exp(-(lam - 0.25)**2/0.01)
109
# H2O absorption
110
for center in [1.4, 1.9, 2.7, 6.3]:
111
transmission *= 1 - 0.8 * np.exp(-(lam - center)**2/0.1)
112
# CO2 absorption
113
for center in [4.3, 15]:
114
transmission *= 1 - 0.9 * np.exp(-(lam - center)**2/0.5)
115
116
fig, ax = plt.subplots(figsize=(12, 5))
117
ax.fill_between(lam, 0, transmission, alpha=0.5, color='blue')
118
ax.plot(lam, transmission, 'b-', linewidth=1)
119
ax.set_xlabel('Wavelength ($\\mu$m)')
120
ax.set_ylabel('Transmission')
121
ax.set_title('Atmospheric Transmission Spectrum')
122
ax.grid(True, alpha=0.3)
123
ax.set_xlim([0, 30])
124
plt.tight_layout()
125
plt.savefig('atmospheric_transmission.pdf', dpi=150, bbox_inches='tight')
126
plt.close()
127
\end{pycode}
128
129
\begin{figure}[H]
130
\centering
131
\includegraphics[width=0.95\textwidth]{atmospheric_transmission.pdf}
132
\caption{Atmospheric transmission showing absorption bands.}
133
\end{figure}
134
135
\section{Greenhouse Effect}
136
137
\begin{pycode}
138
# Simple greenhouse model
139
S = 1361 # Solar constant W/m^2
140
albedo = 0.3
141
epsilon = np.linspace(0, 1, 100) # Atmospheric emissivity
142
143
T_surface = ((S * (1 - albedo) / 4) / (sigma_sb * (1 - epsilon/2)))**0.25
144
145
fig, ax = plt.subplots(figsize=(10, 6))
146
ax.plot(epsilon, T_surface - 273.15, 'b-', linewidth=2)
147
ax.axhline(y=15, color='r', linestyle='--', label='Current Earth')
148
ax.set_xlabel('Atmospheric Emissivity $\\epsilon$')
149
ax.set_ylabel('Surface Temperature ($^\\circ$C)')
150
ax.set_title('Greenhouse Effect')
151
ax.legend()
152
ax.grid(True, alpha=0.3)
153
plt.tight_layout()
154
plt.savefig('greenhouse_effect.pdf', dpi=150, bbox_inches='tight')
155
plt.close()
156
\end{pycode}
157
158
\begin{figure}[H]
159
\centering
160
\includegraphics[width=0.85\textwidth]{greenhouse_effect.pdf}
161
\caption{Surface temperature vs atmospheric emissivity.}
162
\end{figure}
163
164
\section{Radiative Forcing}
165
166
\begin{pycode}
167
CO2 = np.linspace(280, 800, 100) # ppm
168
RF = 5.35 * np.log(CO2 / 280) # W/m^2
169
170
fig, ax = plt.subplots(figsize=(10, 6))
171
ax.plot(CO2, RF, 'b-', linewidth=2)
172
ax.axvline(x=420, color='r', linestyle='--', label='Current (2023)')
173
ax.set_xlabel('CO$_2$ Concentration (ppm)')
174
ax.set_ylabel('Radiative Forcing (W/m$^2$)')
175
ax.set_title('CO$_2$ Radiative Forcing')
176
ax.legend()
177
ax.grid(True, alpha=0.3)
178
plt.tight_layout()
179
plt.savefig('radiative_forcing.pdf', dpi=150, bbox_inches='tight')
180
plt.close()
181
\end{pycode}
182
183
\begin{figure}[H]
184
\centering
185
\includegraphics[width=0.85\textwidth]{radiative_forcing.pdf}
186
\caption{Radiative forcing from CO$_2$ increase.}
187
\end{figure}
188
189
\section{Scattering}
190
191
\begin{pycode}
192
# Rayleigh scattering
193
lam_scat = np.linspace(0.3, 0.8, 100)
194
sigma_rayleigh = 1 / lam_scat**4
195
sigma_rayleigh = sigma_rayleigh / sigma_rayleigh[0]
196
197
# Mie scattering (simplified)
198
sigma_mie = np.ones_like(lam_scat) * 0.3
199
200
fig, ax = plt.subplots(figsize=(10, 6))
201
ax.plot(lam_scat, sigma_rayleigh, 'b-', linewidth=2, label='Rayleigh')
202
ax.plot(lam_scat, sigma_mie, 'r-', linewidth=2, label='Mie')
203
ax.set_xlabel('Wavelength ($\\mu$m)')
204
ax.set_ylabel('Relative Scattering Cross-section')
205
ax.set_title('Atmospheric Scattering')
206
ax.legend()
207
ax.grid(True, alpha=0.3)
208
plt.tight_layout()
209
plt.savefig('scattering.pdf', dpi=150, bbox_inches='tight')
210
plt.close()
211
\end{pycode}
212
213
\begin{figure}[H]
214
\centering
215
\includegraphics[width=0.85\textwidth]{scattering.pdf}
216
\caption{Wavelength dependence of atmospheric scattering.}
217
\end{figure}
218
219
\section{Results}
220
221
\begin{pycode}
222
T_no_atm = (S * (1 - albedo) / (4 * sigma_sb))**0.25
223
T_with_atm = 288 # K
224
greenhouse_warming = T_with_atm - T_no_atm
225
226
print(r'\begin{table}[H]')
227
print(r'\centering')
228
print(r'\caption{Earth Energy Balance}')
229
print(r'\begin{tabular}{@{}lc@{}}')
230
print(r'\toprule')
231
print(r'Parameter & Value \\')
232
print(r'\midrule')
233
print(f'Solar constant & {S} W/m$^2$ \\\\')
234
print(f'Planetary albedo & {albedo} \\\\')
235
print(f'Effective temperature & {T_no_atm:.0f} K \\\\')
236
print(f'Greenhouse warming & {greenhouse_warming:.0f} K \\\\')
237
print(r'\bottomrule')
238
print(r'\end{tabular}')
239
print(r'\end{table}')
240
\end{pycode}
241
242
\section{Conclusions}
243
244
Radiative transfer processes control Earth's energy balance and climate.
245
246
247
\end{document}
248
249