This repository has been archived on 2026-10-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
KNZ_GeoTrackLab/plot/Trocor.py
T
KenanZhu111 f29614d834 Update:
1.KNZ_Calculate: modified some mistake and
optimize the use experience.
2.KNZ_Plot: more selective options and more united
style of GUI
2024-10-09 11:15:22 +08:00

24 lines
699 B
Python

##Tro correct-Hopfield
import math
def def_tro_cor(H, ma):
P0 = 1013.25
e0 = 11.69
T0 = 288.15
p = P0 * pow((1.0 - 0.0068 / T0 / H) , 5)
T = 288.15 - 0.0068 * H
if H > 11000:
e = 0
if H <= 11000:
e = e0 * pow( (1.0 - 0.0068 * H / T0) , 4)
deltaSd = 0.00001552 * p * (40136 + 148.72 * (T - 273.16) - H) / T
deltaSw = 0.0746512 * e * (11000 - H) / pow(T , 2)
#Dry
dtropd = deltaSd / math.sqrt( math.sin( math.radians( math.degrees( pow(math.radians(ma) , 2) ) + 6.25) ) )
#Wet
dtropw = deltaSw / math.sqrt( math.sin( math.radians( math.degrees( pow(math.radians(ma) , 2) ) + 6.25) ) )
dtrop = dtropw + dtropd
return dtrop