利用Python绘制TEC地图(详尽版)

在进行某些研究时,需要对电离层的日变化进行分析,以便直观清晰地看到电离层的变化,博主利用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
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

十八与她

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值