이번에는 대기 경계층 시간에 배운 Monin-Obukhov Similarity Theory Curve를 그려보겠습니다
구체적인 수식은 위키피디아에서 참고했습니다
https://en.wikipedia.org/wiki/Monin%E2%80%93Obukhov_similarity_theory
Monin–Obukhov similarity theory - Wikipedia
From Wikipedia, the free encyclopedia Monin–Obukhov (M–O) similarity theory describes the non-dimensionalized mean flow and mean temperature in the surface layer under non-neutral conditions as a function of the dimensionless height parameter,[1] named
en.wikipedia.org
먼저 참고한 수식입니다
여기서 제타는 z/L로 고도를 Obukhov Length로 나눈 값을 의미합니다
Obukhov Length는 대기가 stable한 상태면 0보다 큰 값을 가지고 unstable한 상태면 0보다 작은 갑을 가집니다
쉽게 말해 위 식은 안정도에 따른 경험적인 수식이라고 할 수 있습니다
이 수식들은 Universal function으로 1968년 Kansas 실험의 결과에 기초하여 수평 평균 흐름과
평균 가상 퍼텐셜 온도에 대하여 위에 수식과 같이 정해집니다
이 켄자스 실험에서는 평평한 밀밭에서 진행했고 32m 높이의 타워에 다양한 높이에 설치된 풍속계로 실험했습니다
이제 본격적으로 그림을 그려보겠습니다
코드입니다
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, IndexLocator, FuncFormatter
from matplotlib.dates import MonthLocator, DateFormatter
zeta = np.arange(-1.99, 1, 0.01)
f_p = []
for i in zeta:
if i > -2 and i < 0:
p = np.power((1 - 15 * i), (-1/4))
f_p.append(p)
elif i == 0:
p = 1
f_p.append(p)
elif i > 0 and i < 1:
p = 1 + 4.7 * i
f_p.append(p)
f_p1 = []
for j in zeta:
if j > -2 and j < 0:
p1 = np.power((1 - 9 * j), (-1/2))
p2 = p1 * 0.74
f_p1.append(p2)
elif j == 0:
p1 = 1
f_p.append(p1)
elif j > 0 and j < 1:
p1 = 0.74 + 4.7 * j
f_p1.append(p1)
fig, ax = plt.subplots(1, 2, figsize = (12, 9))
#
#------------------------------------------------------------------------------
#ax[0] phi m
ax[0].plot(zeta, f_p, color = 'b', lw = 2)
ax[0].set_xlim(-2, 1)
ax[0].set_ylim(0, 6)
ax[0].set_xlabel(r'$\zeta (\frac{z}{L})$', fontsize = 20)
ax[0].set_ylabel(r'$\varphi_{M}$', fontsize = 20)
ax[0].axvline(x = 0, linestyle = '--', color = 'k')
ax[0].xaxis.set_minor_locator(MultipleLocator(0.1))
ax[0].yaxis.set_minor_locator(MultipleLocator(0.2))
#
#------------------------------------------------------------------------------
#ax[1] phi h
ax[1].plot(zeta, f_p1, color = 'b', lw = 2)
ax[1].set_xlim(-2, 1)
ax[1].set_ylim(0, 6)
ax[1].set_xlabel(r'$\zeta (\frac{z}{L})$', fontsize = 20)
ax[1].set_ylabel(r'$\varphi_{H}$', fontsize = 20)
ax[1].axvline(x = 0, linestyle = '--', color = 'k')
ax[1].xaxis.set_minor_locator(MultipleLocator(0.1))
ax[1].yaxis.set_minor_locator(MultipleLocator(0.2))
#
plt.suptitle('Monin-Obukhov Similarity Theory \n Universal functions',
fontsize = 15)
범위가 주어져 있기 때문에 계산을 2번 진행했습니다
결과 그림입니다
아래 그림은 위키피디아에 올라와 있는 그림입니다
제 그린 그림은 빨간색 그림인 것 같습니다
예시 그림에서는 다양한 경험식을 사용해서 그렸기 때문에 총 5가지 그림이 있습니다
'파이썬' 카테고리의 다른 글
데이터 프레임에서 특정 데이터 추출(globals()) (2) | 2023.10.18 |
---|---|
건조공기의 이상기체 방정식 그래프 그리기(대기 열역학) (0) | 2023.09.25 |
WRF-PYTHON 라이브러리로 WRF 결과물 시각화 (getvar, smooth2d) (2) | 2023.09.01 |
작업29: NCL로 시각화한 자료 파이썬으로 gif 만들기2 (0) | 2023.06.25 |
작업28: NCL로 시각화한 자료 파이썬으로 gif 만들기1 (0) | 2023.05.04 |