Skip to content

Commit

Permalink
add pip install pycwr and modified README
Browse files Browse the repository at this point in the history
  • Loading branch information
YvZheng committed Dec 2, 2019
1 parent 093274d commit c4ce620
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ Project development plan

Install pycwr Library
----------
### The easiest route to installing pycwr is through pip and conda:

if you haven't install cartopy, For all platforms installing cartopy can be done with:

```
conda install -c conda-forge cartopy
```
and you can install pycwr with pip:
```
pip install pycwr
```

### Also, you can install from source code:

```
git clone https://github.com/YvZheng/pycwr.git
Expand All @@ -41,7 +54,7 @@ Read Radar Basedata to PRD (Polarimetry Radar Data) class or Py-ART Radar class
from pycwr.io.auto_io import radar_io
file = r"./Z_RADR_I_Z9898_20190828192401_O_DOR_SAD_CAP_FMT.bin.bz2"
data = radar_io(file)
PRD = data.ToPRD()
PRD = data.ToPRD(withlatlon=True)
print(PRD.scan_info)
print(PRD.fields)
PyartRadar = data.ToPyartRadar()
Expand Down
15 changes: 14 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@

安装pycwr库
----------
### 可以使用conda和pip来安装pycwr库

如果你没安装 cartopy, 推荐使用conda来安装cartopy:

```
conda install -c conda-forge cartopy
```
然后, 可以使用以下pip命令安装:
```
pip install pycwr
```

### 当然你也可以通过源码安装:

```
git clone https://github.com/YvZheng/pycwr.git
Expand All @@ -44,7 +57,7 @@ python setup.py install
from pycwr.io.auto_io import radar_io
file = r"./Z_RADR_I_Z9898_20190828192401_O_DOR_SAD_CAP_FMT.bin.bz2"
data = radar_io(file)
PRD = data.ToPRD()
PRD = data.ToPRD(withlatlon=True)
print(PRD.scan_info)
print(PRD.fields)
PyartRadar = data.ToPyartRadar()
Expand Down
2 changes: 1 addition & 1 deletion pycwr/data/default_opendir.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"lastOpenDir": "E:/RadarBaseData/CINRAD_SC_old"}
{"lastOpenDir": "C:/Users/zy/Desktop"}
4 changes: 2 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#file = r"E:\RadarBaseData\CINRAD-SA\温州\2015080816.59A"
#file = r"E:\RadarBaseData\CINRAD-CC\2016070817.03V"
file = r"E:\RadarBaseData\CINRAD_SC_old\Z_RADR_I_Z9831_20190427200200_O_DOR_SC_CAP.bin"
file = r"C:\Users\zy\Desktop\2016070817.48V"
#radar = SCBaseData(file)
Radar = radar_io(file)
NRadar = Radar.ToPRD(withlatlon=False)
NRadar = Radar.ToPRD(withlatlon=True)
PyartRadar = Radar.ToPyartRadar()

#dbz = NRadar.fields[0]["dBZ"]
Expand Down

0 comments on commit c4ce620

Please sign in to comment.