forked from YvZheng/pycwr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mv read_auto function to io/__init__.py
- Loading branch information
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
from . import SCFile, WSR98DFile, SABFile, CCFile | ||
from .auto_io import read_auto | ||
from .util import radar_format | ||
|
||
__all__ = ["read_auto", "CCFile", "SCFile", "WSR98DFile", "SABFile"] | ||
|
||
def read_auto(filename, station_lon=None, station_lat=None, station_alt=None): | ||
""" | ||
:param filename: radar basedata filename | ||
:param station_lon: radar station longitude //units: degree east | ||
:param station_lat: radar station latitude //units:degree north | ||
:param station_alt: radar station altitude //units: meters | ||
""" | ||
radar_type = radar_format(filename) | ||
if radar_type == "WSR98D": | ||
return WSR98DFile.WSR98D2NRadar(WSR98DFile.WSR98DBaseData(filename, station_lon, station_lat, station_alt)).ToPRD() | ||
elif radar_type == "SAB": | ||
return SABFile.SAB2NRadar(SABFile.SABBaseData(filename, station_lon, station_lat, station_alt)).ToPRD() | ||
elif radar_type == "CC": | ||
return CCFile.CC2NRadar(CCFile.CCBaseData(filename, station_lon, station_lat, station_alt)).ToPRD() | ||
elif radar_type == "SC": | ||
return SCFile.SC2NRadar(SCFile.SCBaseData(filename, station_lon, station_lat, station_alt)).ToPRD() | ||
else: | ||
raise TypeError("unsupported radar type!") |
This file was deleted.
Oops, something went wrong.