Giter Site home page Giter Site logo

cyanidecn / pycinrad Goto Github PK

View Code? Open in Web Editor NEW
347.0 27.0 154.0 40.1 MB

Decode CINRAD (China New Generation Weather Radar) data and visualize.

Home Page: https://pycinrad.readthedocs.io/en/latest/index.html

License: GNU General Public License v3.0

Python 87.82% Batchfile 0.06% C 10.00% Shell 0.04% Cython 2.08%
python meteorology matplotlib radar

pycinrad's Introduction

PyCINRAD

Code style: black Downloads DOI

Decode CINRAD (China New Generation Weather Radar) data and visualize.

中文说明

example folder contains detailed examples!

Installation

PyCINRAD supports Python version 3.5 and higher.

pip install cinrad

You can also download from github page and build from source

python setup.py install

Modules

cinrad.io

Decode CINRAD radar data.

from cinrad.io import CinradReader, StandardData
f = CinradReader(your_radar_file) #Old version data
f = StandardData(your_radar_file) #New standard data
f.get_data(tilt, drange, dtype) #Get data
f.get_raw(tilt, drange, dtype)

The get_raw method returns radar records without other geographic information.

The get_data method returns xarray.Dataset with radar records, geographic coordinates, and all extra attributes. So, all benefits of xarray can be enjoyed.

>>> print(data)
<xarray.Dataset>
Dimensions:    (azimuth: 366, distance: 920)
Coordinates:
  * azimuth    (azimuth) float32 0.14084807 0.15812683 ... 0.12601277 0.14381513
  * distance   (distance) float64 0.25 0.5 0.75 1.0 ... 229.2 229.5 229.8 230.0
Data variables:
    ZDR        (azimuth, distance) float64 nan nan nan nan ... nan nan nan nan
    longitude  (azimuth, distance) float64 120.2 120.2 120.2 ... 120.6 120.6
    latitude   (azimuth, distance) float64 35.99 35.99 36.0 ... 38.04 38.04
    height     (azimuth, distance) float64 0.1771 0.1792 0.1814 ... 5.218 5.227
Attributes:
    elevation:        0.48339844
    range:            230
    scan_time:        2020-05-17 11:00:28
    site_code:        Z9532
    site_name:        青岛
    site_longitude:   120.23028
    site_latitude:    35.98861
    tangential_reso:  0.25
    nyquist_vel:      8.37801
    task:             VCP21D

For example, it's very convenient to save data as netcdf format.

>>> data.to_netcdf('1.nc')

xarray also makes interpolation very convenient.

>>> data.interp(azimuth=np.deg2rad(300), distance=180)
<xarray.Dataset>
Dimensions:    ()
Coordinates:
    azimuth    float64 5.236
    distance   int32 180
Data variables:
    ZDR        float64 0.3553
    longitude  float64 118.5
    latitude   float64 36.8
    height     float64 3.6
Attributes:
    elevation:        0.48339844
    range:            230
    scan_time:        2020-05-17 11:00:28
    site_code:        Z9532
    site_name:        青岛
    site_longitude:   120.23028
    site_latitude:    35.98861
    tangential_reso:  0.25
    nyquist_vel:      8.37801
    task:             VCP21D

For single-tilt data (i.e. files that contain only one elevation angle), cinrad.io.StandardData.merge can merge these files to a file contains full volumetric scan.

Export data to Py-ART defined class

Convert data structure defined in this module into pyart.core.Radar is very simple. cinrad.io.export has a function standard_data_to_pyart, which can take cinrad.io.StandardData as input and return pyart.core.Radar as output.

example folder contains a simple demo about this.

Decode PUP data and SWAN data

cinrad.io.PUP provides functions to decode PUP data. The extracted data can be further used to create PPI.

cinrad.io.SWAN provides similar interface to decode SWAN data.

from cinrad.io import PUP
f = PUP(your_radar_file)
data = f.get_data()

Decode phased array radar data

cinrad.io.PhasedArrayData provides similar interface to decode level 2 data from phased array radar.

from cinrad.io import PhasedArrayData
f = PhasedArrayData(your_radar_file)
data = f.get_data(0, 40, 'REF')

cinrad.utils

This submodule provides some useful algorithms in radar meteorology. All functions only accept numpy.ndarray as input data. This submodule extends the usage of this program, as these functions can accept customized data rather than only the data decoded by cinrad.io.

cinrad.calc

For direct computation of decoded data, cinrad.calc provides functions that simplify the process of calculation. For functions contained in this submodule, only a list of reflectivity data is required as the argument.

Code to generate the required list:

r_list = [f.get_data(i, 230, 'REF') for i in f.angleindex_r]
# or
r_list = list(f.iter_tilt(230, 'REF'))

VCS

cinrad.calc.VCS provides calculation of vertical cross-section for all variables.

import cinrad
from cinrad.visualize import Section
f = cinrad.io.CinradReader(your_radar_file)
rl = [f.get_data(i, 230, 'REF') for i in f.angleindex_r]
vcs = cinrad.calc.VCS(rl)
sec = vcs.get_section(start_cart=(111, 25.5), end_cart=(112, 26.7)) # pass geographic coordinates (longitude, latitude)
sec = vcs.get_section(start_polar=(115, 350), end_polar=(130, 30)) # pass polar coordinates (distance, azimuth)
fig = Section(sec)
fig('D:\\')

Radar mosaic

cinrad.calc.GridMapper can merge different radar scans into a cartesian grid.

Hydrometeor classification

cinrad.calc.hydro_class uses algorithm suggested by Dolan to classify hydrometeors into 10 categories. (Requires REF, ZDR, RHO, and KDP)

cinrad.correct

This submodule provides algorithms to correct raw radar fields.

cinrad.correct.dealias

This function can unwrap the folded velocity using algorithm originated from pyart. (needs C compiler)

import cinrad
#(some codes omitted)
v = f.get_data(1, 230, 'VEL')
v_corrected = cinrad.correct.dealias(v)

cinrad.visualize

Visualize the data stored in acceptable format (cinrad.datastruct). It also means that you can using customized data to perform visualization, as long as the data is stored as xarray.Dataset and constructed by the same protocol (variables naming conventions, data coordinates and dimensions, etc.) For further information about this method, please see the examples contained in example folder.

from cinrad.visualize import PPI
fig = PPI(R) #Plot PPI
fig('D:\\') #Pass the path to save the fig
from cinrad.visualize import Section
fig = Section(Slice_) #Plot VCS
fig('D:\\')

The path passed into the class can either be the folder path or the file path. Also, if no path is passed, the figure will be saved at the folder named PyCINRAD in the home folder (e.g. C:\Users\tom).

Customize plot settings

The summary of args that can be passed into PPI are listed as follows.

arg function
cmap colormaps used for plotting
norm norm used for plotting
nlabel number of labels on the colorbar
label labels on the colorbar
highlight highlight area of input name
dpi dpi of figure
extent area to plot e.g. extent=[90, 91, 29, 30]
section cross-section data to ppi plot
style control the background color black or white
add_city_names annotate name of city on the plot

Beside args, class PPI has some other auxiliary plotting functions.

PPI.plot_range_rings(self, _range, color='white', linewidth=0.5, **kwargs)

Plot range rings on the PPI plot.

PPI.plot_cross_section(self, data, ymax=None)

Plot VCS section under the PPI plot.

This function is very similar to vcs argument of class PPI, but the range of y-axis can be adjusted only by this function.

PPI.storm_track_info(self, filepath)

Plot PUP STI product on the current PPI map, including past positions, current position, and forecast positions.

Gallery

PPI reflectivity

PPI reflectivity

Phased array radar reflectivity

Phased array radar reflectivity

PPI reflectivity combined with cross-section

PPI reflectivity combined with cross-section

Cross-section

Cross-section

Cross-section other than reflectivity

ZDR cross-section

RHI reflectivity

RHI reflectivity

Citation

If you use PyCINRAD in your paper, please cite PyCINRAD using the DOI below.

DOI

Papers that use plots generated by PyCINRAD

  1. Recognition and Analysis of Biological Echo Using WSR-88D Dual-polarization Weather Radar in Nanhui of Shanghai doi: 10.16765/j.cnki.1673-7148.2019.03.015

Notes

The hydrometeor classfication algorithm comes from Dolan, B., S. A. Rutledge, S. Lim, V. Chandrasekar, and M. Thurai, 2013: A Robust C-Band Hydrometeor Identification Algorithm and Application to a Long-Term Polarimetric Radar Dataset. J. Appl. Meteor. Climatol., 52, 2162–2186, https://doi.org/10.1175/JAMC-D-12-0275.1.

If you are interested in this program, you can join the developers of this program. Any contribution is appreciated!

If you have questions or advise about this program, you can create an issue or email me at [email protected].

pycinrad's People

Contributors

anebrithien avatar bugsuse avatar cyanidecn avatar longtsing avatar pomggmm avatar pysoer avatar shevawen avatar zzysupernova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pycinrad's Issues

添加对CINRAD SC基数据的支持

default
目前没有SC雷达详细的数据说明,所以目前只有尝试可能的数据结构。如果有谁有SC雷达的数据说明,可以的话请上传一下文件,不胜感激。

CAPPI算法

特定高度的CAPPI数据是计算雷达拼图的先决条件,在解决 #7 之前需要先写好CAPPI的计算函数

添加转换为pyart.core.Radar类的函数

转换之后可以方便的利用pyart中的各种计算函数。但是国内双偏振雷达每层径向数不同,不知道如何解决

  • 转换cinrad.io.CinradReader

  • 转换cinrad.io.StandardData

读swan数据时出现问题

在读swan数据时提示
File "/home/rencp/local/miniconda3/envs/PyCINRAD/lib/python3.6/site-packages/cinrad-1.6.1-py3.6.egg/cinrad/io/level3.py", line 221, in init
header["minute"],
ValueError: year 0 is out of range
文件代码如下:
from cinrad.io import SWAN
import os
radar_file_dir='./SWAN/swan_init/radar/taizhou/Z_RADR_I_Z9576_20200828094100_O_DOR_SA_CAP.bin'
f = SWAN(radar_file_dir)
data = f.get_data()
print(data)

Change colormap generator

The present colormap generator form_colormap.py is not comfortable to use. It can't return colors with uneven spacing.

使用PPI绘制PUP基反产品出错

from cinrad.io import PUP
from cinrad.visualize.ppi import PPI

f=PUP('C:\\pyproj\\cinrad\\pupdata\\R\\19\\20170330.084822.01.19.778')
data=f.get_data()
print(data.data.shape)
fig = PPI(data)
fig('C:\\pyproj\\cinrad\\')

编译环境:WIN10+python3.7
库:matplotlib(3.0.3)、cartopy(0.17.0)
雷达信息:河池雷达(Z9778),PUP基本反射率因子产品(R,19)

此时解释器提示

C:\Users\win\Anaconda3\python.exe C:/pyproj/cinrad/pup_ppi.py

Traceback (most recent call last):
  File "C:/pyproj/cinrad/pup_ppi.py", line 8, in <module>
    fig = PPI(data)
  File "C:\Users\win\Anaconda3\lib\site-packages\cinrad\visualize\ppi.py", line 94, in __init__
    self._plot(**kwargs)
  File "C:\Users\win\Anaconda3\lib\site-packages\cinrad\visualize\ppi.py", line 148, in _plot
    self.geoax.pcolormesh(lon, lat, var, norm=pnorm, cmap=pcmap, **kwargs)
  File "C:\Users\win\Anaconda3\lib\site-packages\cartopy\mpl\geoaxes.py", line 1459, in pcolormesh
    result = self._pcolormesh_patched(*args, **kwargs)
  File "C:\Users\win\Anaconda3\lib\site-packages\cartopy\mpl\geoaxes.py", line 1491, in _pcolormesh_patched
    X, Y, C = self._pcolorargs('pcolormesh', *args, allmatch=allmatch)
  File "C:\Users\win\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 5575, in _pcolorargs
    C.shape, Nx, Ny, funcname))
TypeError: Dimensions of C (366, 230) are incompatible with X (366) and/or Y (230); see help(pcolormesh)

Process finished with exit code 1

后来我输出了data.lon、data.lat以及data.data的shape
发现是由于data.data的shape是(366, 230)
而data.lon和data.lat则是(230, 366)
初步判断是绘图时X,Y和C的数组形状不一样

于是尝试对\cinrad\visualize\ppi.py的第148行进行修改,将var进行转置
self.geoax.pcolormesh(lon, lat, var.T, norm=pnorm, cmap=pcmap, **kwargs)
修改之后程序可以正常运行,但是雷达图像不是正确的

产品号37(组合反射率) 文件读取错误求助

D:\Python37>python.exe
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import cinrad
f = cinrad.io.level3.StandardPUP('Z_20200727093842Z_CR_00_37')
Traceback (most recent call last):
File "", line 1, in
File "D:\Python37\lib\site-packages\cinrad\io\level3.py", line 428, in init
self._parse()
File "D:\Python37\lib\site-packages\cinrad\io\level3.py", line 456, in _parse
params = get_product_param(ptype, self.f.read(64))
File "D:\Python37\lib\site-packages\cinrad\io\level3.py", line 415, in get_product_param
return _ProductParams(ptype, param_bytes).params
File "D:\Python37\lib\site-packages\cinrad\io\level3.py", line 398, in init
map_funcptype
KeyError: 18

文件如下:
Z_20200727093842Z_CR_00_37.zip

沈阳雷达数据格式

default
在**气象数据网上看到沈阳雷达是SC雷达,但是用THREDDS读取时提示为SA雷达。
default
但是这个雷达的参数并不符合SA雷达的参数,在以SA雷达读取时没有报错但是读出来的数据完全不对。
(此雷达库长250m,库数1000个)

请问CINRAD版本问题

您好!请问这个项目的源代码是对应 [天气雷达基数据标准格式(试用)] 2015-10版本的吗?

天气雷达组网产品数据格式更新

根据**气象局预报与网络司,从10月8日开始组网产品NetCDF标准格式数据的试用。cinrad.io模块需要改动,同时分发格点化之后的数据也可以解决 #7#8 的问题。
default
default

Add mapping function

Your repository supports many types of radars now, but doesn't have the mapping function like this. You can find the original link of pyart here.

小白预报员请教

您好,非常感谢你的这个雷达库,请问您这个python库的RHI图案例怎么画,看readme没有看懂。。。。

双偏振27号速度产品数据读取错误及ppi绘图问题

两个问题求助:
1、双偏振27号速度产品数据读取错误 ,其他产品读取正常
f=cinrad.io.level3.StandardPUP('Z9716_20200925083000Z_PPI_01_27')
data = f.get_data()
ValueError:Could not convert tuple of form (dims, data[, attrs, encoding]): (['azimuth', 'distance'], masked_array(data=[--, 2.0, -14.0, -9.5, -5.5, 8.5, 3.5, -11.5, -7.5............
Z9716_20200925083000Z_PPI_01_27.zip
2、ppi绘制的图片0°方向有缺失
f=cinrad.io.level3.StandardPUP('Z9716_20200909100600Z_PPI_01_158')
data = f.get_data()
fig = PPI(data ,dpi=150, add_city_names=True,plot_labels=True,style='black')
Z9716_20200909100600Z_PPI_01_158.zip
ppi

CC雷达读取BUG

在实际测试CC雷达读取中发现该模块存在bug,通过对比MICAPS的结果发现以下问题代码:

stop_angle = np.where(param["usAngle"] < param["usAngle"][0])[0][0]
这么判断结束仰角并不合适,从网上搜索的原始C代码可以发现这么来做会更好一些。

stop_angle = header['ucScanMode'][0] - 100

cinrad.error.RadarDecodeError: Unrecognized data

Cython is not installed, velocity dealias function cannot be used
Traceback (most recent call last):
  File "draft.py", line 61, in <module>
    main()
  File "draft.py", line 56, in main
    draft02()
  File "draft.py", line 45, in draft02
    f = cinrad.io.CinradReader("Z_RADR_I_Z9431_20190723074431_O_DOR_CC_CAP.bin.bz2")
  File "/home/ubuntu/venv35/lib/python3.5/site-packages/cinrad/io/level2.py", line 130, in __init__
    raise RadarDecodeError('Unrecognized data')
cinrad.error.RadarDecodeError: Unrecognized data

读取的azimuth和实际的ray的数目并不一致!

读取了这个文件:
Z_RADR_I_Z9002_20190930143600_O_DOR_SA_CAP.bin.bz2

fn = 'Z_RADR_I_Z9002_20190930143600_O_DOR_SA_CAP.bin.bz2'
udata = CinradReader(fn)
azimuth = udata.azimuth
rays_num = [udata.data.get(i)['REF'].shape[0] for i in udata.data]
print(azimuth.size)
print(sum(rays_num))

azimuth是4404,rays_num的和为4403.
不太一致,请问这是为什么呢?

绘制PUP基本速度产品时单位错误

雷达信息:河池雷达(Z9778),PUP基本速度产品(V,26)

使用PyCINRAD的PUP接口绘制基本速度时,发现和PUP中的不一致,后来发现是单位没有转换的问题,文件里边数据的单位是节(knots)。

Z9778_20170330093021_1 5_115 0_VEL

PUP

我也遇到了cinrad.calc.VCS(ref)没有任何反应的情况

我安装的cinrad的版本是1.6的。
数据读取后画PPI图是正常的,但是画剖面图的时候,
ref = [f.get_data(i, 230, 'REF') for i in f.angleindex_r]
vcs = cinrad.calc.VCS(ref)
sec = vcs.get_section(start_cart=(113.4, 23.1), end_cart=(113.5, 23.2))
print(sec)
fig = cinrad.visualize.PPI(ref[0])
fig.plot_cross_section(sec)
fig('D:\CINRAD_SA_Data')
到了第二行那里就没有任何反应了,也没有错误提示信息,也没有图出来,很久也不会自动停下来。

Radar type undefined

Traceback (most recent call last):
File "qzppi.py", line 45, in
f = CinradReader(sa_radar_file[nFiles]) #老版本数据
File "C:\Anaconda3\lib\site-packages\cinrad\io\level2.py", line 124, in init
self.code, radartype = _detect_radartype(f, filename, type_assert=radar_type)
File "C:\Anaconda3\lib\site-packages\cinrad\io\level2.py", line 71, in _detect_radartype
raise RadarDecodeError('Radar type undefined')
cinrad.error.RadarDecodeError: Radar type undefined

雷达数据格点化的问题

目前的思路是使用scipy.interpolate.griddata来进行3维插值,我在_grid()里也进行了尝试,但是插值出来的格点除了第一层其他完全不符。

Proj

command: /srv/conda/envs/notebook/bin/python /srv/conda/envs/notebook/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp2lgtr35q
cwd: /tmp/pip-install-oedtv90z/cartopy
Complete output (3 lines):
setup.py:171: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
'.'.join(str(v) for v in GEOS_MIN_VERSION), ))
Proj 4.9.0 must be installed.

import cinrad时报错

import cinrad时报如下错误:
Traceback (most recent call last):
File "C:/Users/niecq/PycharmProjects/test/read_pup.py", line 5, in
from cinrad.io import PUP
File "C:\ProgramData\Miniconda3\lib\site-packages\cinrad-1.5-py3.7.egg\cinrad_init_.py", line 5, in
from . import visualize
File "C:\ProgramData\Miniconda3\lib\site-packages\cinrad-1.5-py3.7.egg\cinrad\visualize_init_.py", line 8, in
from cinrad.visualize.ppi import *
File "C:\ProgramData\Miniconda3\lib\site-packages\cinrad-1.5-py3.7.egg\cinrad\visualize\ppi.py", line 14, in
from cinrad.visualize.utils import (
File "C:\ProgramData\Miniconda3\lib\site-packages\cinrad-1.5-py3.7.egg\cinrad\visualize\utils.py", line 124, in
class ShpReader(shapereader.BasicReader):
AttributeError: module 'cartopy.io.shapereader' has no attribute 'BasicReader'
请问如何解决呢,之前是合适的

pyshp升级版本之后读取shp报错

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\27455\AppData\Local\Programs\Python\Python36\lib\site-packages\cartopy\io\shapereader.py", line 188, in __init__
    self._reader = reader = shapefile.Reader(filename)
  File "C:\Users\27455\AppData\Local\Programs\Python\Python36\lib\site-packages\shapefile.py", line 517, in __init__
    self.load(args[0])
  File "C:\Users\27455\AppData\Local\Programs\Python\Python36\lib\site-packages\shapefile.py", line 616, in load
    self.__dbfHeader()
  File "C:\Users\27455\AppData\Local\Programs\Python\Python36\lib\site-packages\shapefile.py", line 859, in __dbfHeader
    fieldDesc[name] = u(fieldDesc[name], "ascii")
  File "C:\Users\27455\AppData\Local\Programs\Python\Python36\lib\site-packages\shapefile.py", line 104, in u
    return v.decode(encoding, encodingErrors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xca in position 4: ordinal not in range(128)

在pyshp2.0.1会报错,切换回1.2.12则没有此问题

ModuleNotFoundError: No module named 'cinrad.io._radar_struct'

File "test.py", line 1, in
from cinrad.io import CinradReader
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/cinrad-1.2-py3.6.egg/cinrad/init.py", line 1, in
from . import io
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/cinrad-1.2-py3.6.egg/cinrad/io/init.py", line 1, in
from .io import *
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/cinrad-1.2-py3.6.egg/cinrad/io/io.py", line 18, in
from ._dtype import SAB_dtype, CAB_dtype, CC_param, CC_data, CC_header
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/cinrad-1.2-py3.6.egg/cinrad/io/_dtype.py", line 10, in
CC_param, CC_header, CC_data = gen_CC()
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/cinrad-1.2-py3.6.egg/cinrad/io/_dtype.py", line 7, in gen_CC
from ._radar_struct.CC import scan_param_dtype, header_dtype, data_dtype
ModuleNotFoundError: No module named 'cinrad.io._radar_struct'

PUP文件读取错误求助

报错截图
1

数据文件

Z_20200727094405Z_CAPPI_00_110.zip

from cinrad.io import PUP 这一句可以正常执行
f=PUP('Z_20200727094405Z_CAPPI_00_110') 执行一句时总是报错, 在python3.7 python3.8 都试了

报错信息如下:
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): M
ax retries exceeded with url: /Unidata/MetPy/v0.12.1/staticdata/sfstns.tbl (Caused by NewConnectionE
rror('<urllib3.connection.HTTPSConnection object at 0x0000000014F19248>: Failed to establish a new c
onnection: [Errno 11004] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "D:\Python37\lib\site-packages\cinrad\io\level3.py", line 41, in init
from metpy.io.nexrad import Level3File
File "D:\Python37\lib\site-packages\metpy\io_init_.py", line 12, in
from .metar import * # noqa: F403
File "D:\Python37\lib\site-packages\metpy\io\metar.py", line 15, in
from .station_data import station_info
File "D:\Python37\lib\site-packages\metpy\io\station_data.py", line 140, in
station_info = StationLookup()
File "D:\Python37\lib\site-packages\metpy\io\station_data.py", line 128, in init
self._sources = [dict(_read_station_table()), dict(_read_master_text_file()),
File "D:\Python37\lib\site-packages\metpy\io\station_data.py", line 35, in _read_station_table
input_file = get_test_data('sfstns.tbl', as_file_obj=False)
File "D:\Python37\lib\site-packages\metpy\cbook.py", line 33, in get_test_data
path = POOCH.fetch(fname)
File "D:\Python37\lib\site-packages\pooch\core.py", line 579, in fetch
stream_download(url, full_path, known_hash, downloader, pooch=self)
File "D:\Python37\lib\site-packages\pooch\core.py", line 747, in stream_download
downloader(url, tmp, pooch)
File "D:\Python37\lib\site-packages\pooch\downloaders.py", line 167, in call
response = requests.get(url, **kwargs)
File "D:\Python37\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "D:\Python37\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "D:\Python37\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "D:\Python37\lib\site-packages\requests\sessions.py", line 665, in send
history = [resp for resp in gen]
File "D:\Python37\lib\site-packages\requests\sessions.py", line 665, in
history = [resp for resp in gen]
File "D:\Python37\lib\site-packages\requests\sessions.py", line 245, in resolve_redirects
**adapter_kwargs
File "D:\Python37\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "D:\Python37\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443)
: Max retries exceeded with url: /Unidata/MetPy/v0.12.1/staticdata/sfstns.tbl (Caused by NewConnecti
onError('<urllib3.connection.HTTPSConnection object at 0x0000000014F19248>: Failed to establish a ne
w connection: [Errno 11004] getaddrinfo failed'))

问题请教

您好,看您的pycinrad里面有合成雷达拼图的函数,我自己看源码 easycalc的GridMapper类,没有理解。。。不知道这个怎样传参数才能处理拼图,我用的是“Z_RADR_I_Z9576_20190810000600_O_DOR_SA_CAP.bin.bz2”这样的数据,新手小白,照着您的文档一步一步来学,请多指教,或给一个雷达拼图绘图的demo,感激不尽!

重构程序

计划将程序分为三部分:

  • 雷达数据读取 (io)

  • 衍生产品计算

  • 数据可视化

双偏振雷达数据问题

大神,使用双偏振雷达基数据生成组合反射率时,圆圈外面会出现红色边缘,正好凑成一个方形,是双偏振数据不一样导致的吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.