在进行某些研究时,需要对电离层的日变化进行分析,以便直观清晰地看到电离层的变化,博主利用CDDIS的电离层格网数据,基于Python编写了电离层地图绘制函数
一天TEC效果图
以下是一天之内的电离层变化地图及源码




一天TEC源码
# -*- coding: utf-8 -*-
# @Time : 2022/1/3 14:21
# @Author : xymeng
# @FileName: 001.py 绘制TEC等值线专用程序
# @Software: PyCharm
import os
import numpy as np
import matplotlib.pyplot as plt
'''
store the lat,lon,and,TEC value
'''
lat = []
lon = []
TEC0 = []
TEC = []
TEC2D = np.zeros(shape=(71,73))
picnum = 1
timenum = 1
folder = r'F:\i-File\2021'
'''
Search for each ionex file
'''
for ifile in os.listdir(folder):
'''
num: Record the count of the region
count: Record the count of the Map
'''
num = 1
count = 1
timenum = 0
path = os.path.join(folder,ifile)
print(path)
with open(path) as ionex:
icontent0 = ionex.readlines()
for i in range(len(icontent0)):
'''
Turn list including other symbol into list only consisting of character
'''
icontent1 = icontent0[i].split(' ')
for x in range(icontent1.count('')):
icontent1.remove('')
if len(icontent1) >= 5:
if icontent1[-1] == 'LAT/LON1/LON2/DLON/H\n' and num <= 71 and count <= 13:
Lon0 = -180.0
Lat0 = 90
deltla = 2.5
deltlo = 5
Lat0 = Lat0 - (deltla * num)
lat.append(Lat0)
num = num + 1
'''
Begin putting TEC value into TSC list
'''
ynum = 0
for y in range(1,6):
tecvalue1 = icontent0[i+y].split

最低0.47元/天 解锁文章
1595

被折叠的 条评论
为什么被折叠?



