Skip to content

Commit

Permalink
ENH: adapt config files to new pyrad version
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfidan committed Aug 20, 2024
1 parent 4fc1948 commit 9e00dd5
Show file tree
Hide file tree
Showing 719 changed files with 441 additions and 210,527 deletions.
19 changes: 19 additions & 0 deletions data/Visibility/test_dem_read.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#%%
from pyrad.io.read_data_dem import read_geotiff_data
f = read_geotiff_data('swisstopo_DEM.tif')

#%%
def _proj4_str_to_dict(proj4str):
# COnverts proj4 string to dict as can be used by part
return dict(item.split("=") for item in proj4str.strip(' ').split("+")
if len(item.split('=')) == 2)

from osgeo import gdal, osr
raster = gdal.Open('swisstopo_DEM.tif')
prj = raster.GetProjection()
try:
srs = osr.SpatialReference(wkt=prj)
except RuntimeError:
pass
projparams = _proj4_str_to_dict(srs.ExportToProj4())

14 changes: 11 additions & 3 deletions pyrad_config/00_plot_vol/jma_plot_vol_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ ScanList STRARR 14
ScanPeriod INT 5

# identifier of each data type in file name
DataTypeID STRUCT 7
DataTypeIDInFiles STRUCT 7
dBZ STRING DBZH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH

DataTypeIDInFilenames STRUCT 7
dBZ STRING ref
ZDR STRING zdr
RhoHV STRING rhv
Expand All @@ -49,7 +58,6 @@ DataTypeID STRUCT 7
V STRING vel
W STRING vsw


# Image config
ppiImageConfig STRUCT 6
xsize FLOAT 10. # image size [inches] (default dots per inch (dpi):72)
Expand Down Expand Up @@ -79,4 +87,4 @@ ppiMapImageConfig STRUCT 8
mapres STRING 10m
maps STRARR 2
countries
coastlines
coastlines
26 changes: 13 additions & 13 deletions pyrad_config/00_plot_vol/jma_plot_vol_prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# List of datasets to generate.
# The detailed specification of each dataset is given below.
dataSetList STRARR 1
dataSetList STRARR 2
dBZ

RhoHV
# dBZ
# ZDR
# RhoHV
Expand All @@ -22,7 +22,7 @@ dataSetList STRARR 1
# ============================================================================
dBZ STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
products STRUCT 8
PPI_EL00 STRUCT 3
type STRING PPI_IMAGE
Expand Down Expand Up @@ -63,7 +63,7 @@ dBZ STRUCT 3

ZDR STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:ZDR,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:ZDR,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 5
type STRING PPI_IMAGE
Expand Down Expand Up @@ -96,7 +96,7 @@ ZDR STRUCT 3

RhoHV STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 5
type STRING PPI_IMAGE
Expand Down Expand Up @@ -128,7 +128,7 @@ RhoHV STRUCT 3

PhiDP STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:PhiDP,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:PhiDP,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 3
type STRING PPI_IMAGE
Expand All @@ -153,7 +153,7 @@ PhiDP STRUCT 3

KDP STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:KDP,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:KDP,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 3
type STRING PPI_IMAGE
Expand All @@ -178,7 +178,7 @@ KDP STRUCT 3

V STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:V,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:V,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 5
type STRING PPI_IMAGE
Expand Down Expand Up @@ -209,7 +209,7 @@ V STRUCT 3

W STRUCT 3
type STRING RAW
datatype STRING MFCFRADIAL:W,D{}-F{%Y%m%d%H%M%S}
datatype STRING CFRADIAL:W,D{}-F{%Y%m%d%H%M%S}
products STRUCT 5
PPI_EL00 STRUCT 5
type STRING PPI_IMAGE
Expand Down Expand Up @@ -247,8 +247,8 @@ W STRUCT 3
dBZ_ZDR STRUCT 3
type STRING RAW
datatype STRARR 2
MFCFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
MFCFRADIAL:ZDR,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:ZDR,D{}-F{%Y%m%d%H%M%S}
products STRUCT 2
PPI_EL00 STRUCT 5
type STRING PPI_CONTOUR_OVERPLOT
Expand All @@ -269,8 +269,8 @@ dBZ_ZDR STRUCT 3
dBZ_RhoHV STRUCT 3
type STRING RAW
datatype STRARR 2
MFCFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
MFCFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
products STRUCT 2
PPI_EL00 STRUCT 5
type STRING PPI_CONTOUR_OVERPLOT
Expand Down
18 changes: 9 additions & 9 deletions pyrad_config/01_grid/jma_grid_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ ScanList STRARR 14
ScanPeriod INT 5

# identifier of each data type in file name
DataTypeID STRUCT 7
dBZ STRING ref
ZDR STRING zdr
RhoHV STRING rhv
PhiDP STRING psd
KDP STRING kdp
V STRING vel
W STRING vsw
DataTypeIDInFiles STRUCT 7
dBZ STRING DBZH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH


# Image config
Expand Down Expand Up @@ -77,4 +77,4 @@ gridMapImageConfig STRUCT 9
mapres STRING 10m
maps STRARR 2
countries
coastlines
coastlines
4 changes: 2 additions & 2 deletions pyrad_config/01_grid/jma_grid_prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dataSetList STRARR 4
grid STRUCT 12
type STRING VOL2GRID
datatype STRARR 2
MFCFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
MFCFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:dBZ,D{}-F{%Y%m%d%H%M%S}
CFRADIAL:RhoHV,D{}-F{%Y%m%d%H%M%S}
xmin FLOAT -30000
xmax FLOAT 80000
ymin FLOAT -30000
Expand Down
11 changes: 11 additions & 0 deletions pyrad_config/02_clutter_filter/mf_pam_mtcy_filter_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ ScanList STRARR 1
# Repetition time of the scans [min]
ScanPeriod INT 15

path_convention STRING ODIM

DataTypeIDInFiles STRUCT 7
dBuZ STRING TH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH


# Image config
ppiImageConfig STRUCT 6
Expand Down
20 changes: 10 additions & 10 deletions pyrad_config/02_clutter_filter/mf_pam_mtcy_filter_prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ dataSetList STRARR 6
echoID STRUCT 4
type STRING SAN
datatype STRARR 4
MFCFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MAKE_GLOBAL INT 1
products STRUCT 1
PPI_EL00_A STRUCT 3
Expand All @@ -32,11 +32,11 @@ echoID STRUCT 4
echoFilter STRUCT 3
type STRING ECHO_FILTER
datatype STRARR 5
MFCFRADIAL:echoID,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:echoID,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MAKE_GLOBAL INT 1


Expand Down Expand Up @@ -77,4 +77,4 @@ PhiDPc STRUCT 3
PPI_EL00_A STRUCT 3
type STRING PPI_IMAGE
voltype STRING PhiDPc
anglenr INT 0
anglenr INT 0
12 changes: 12 additions & 0 deletions pyrad_config/03_phidp_kdp/mf_pam_mtcy_kdp_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ ScanList STRARR 1
# Radar frequency
frequency FLOAT 5.6E9

path_convention STRING ODIM

DataTypeIDInFiles STRUCT 7
dBuZ STRING TH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH


# scan strategy
# cycle 1: 90/5 /2.2/1.2/0.7/0.4
# cycle 2: 7/3.9/2.2/1.2/0.7/0.4
Expand Down
20 changes: 10 additions & 10 deletions pyrad_config/03_phidp_kdp/mf_pam_mtcy_kdp_prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dataSetList STRARR 9
# GRIB format as reference value
H_ISO0_GRIB STRUCT 3
type STRING ISO0_GRIB
datatype STRING MFCFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
datatype STRING CFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MAKE_GLOBAL INT 1
products STRUCT 1
PPI_EL00_A STRUCT 5
Expand All @@ -40,20 +40,20 @@ H_ISO0_GRIB STRUCT 3
echoID STRUCT 3
type STRING SAN
datatype STRARR 4
MFCFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MAKE_GLOBAL INT 1

echoFilter STRUCT 3
type STRING ECHO_FILTER
datatype STRARR 5
MFCFRADIAL:echoID,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MFCFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:echoID,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:dBuZ,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:uPhiDP,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:RhoHV,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:ZDR,D{%Y-%m-%d}-F{%Y%m%d%H%M}
MAKE_GLOBAL INT 1


Expand Down
10 changes: 10 additions & 0 deletions pyrad_config/04_hydroclass/mf_odim_coll_hydro_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ CosmoForecasted INT 24
radar_beam_width_h FLOAT 1.25
frequency FLOAT 2.81e9

path_convention STRING ODIM

DataTypeIDInFiles STRUCT 7
dBuZ STRING TH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH

# Image config
ppiImageConfig STRUCT 7
Expand Down
11 changes: 11 additions & 0 deletions pyrad_config/05_ml/mf_odim_coll_ml_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ CosmoForecasted INT 24
radar_beam_width_h FLOAT 1.25
frequency FLOAT 2.81e9

path_convention STRING ODIM

DataTypeIDInFiles STRUCT 7
dBuZ STRING TH
ZDR STRING ZDR
RhoHV STRING RHOHV
uPhiDP STRING PHIDP
KDP STRING KDP
V STRING VEL
W STRING WIDTH


# Image config
ppiImageConfig STRUCT 7
Expand Down
6 changes: 6 additions & 0 deletions pyrad_config/07_VAD/mf_pag_mtcy_doppler_loc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ ScanList STRARR 1
# Repetition time of the scans [min]
ScanPeriod INT 15

path_convention STRING ODIM

DataTypeIDInFiles STRUCT 1
V STRING VRAD


# Image config
ppiImageConfig STRUCT 6
xsize FLOAT 10. # image size [inches] (default dots per inch (dpi):72)
Expand Down
2 changes: 1 addition & 1 deletion pyrad_config/07_VAD/mf_pag_mtcy_doppler_prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dataSetList STRARR 1
VAD STRUCT 3
type STRING VAD
datatype STRARR 1
MFCFRADIAL:V,D{%Y-%m-%d}-F{%Y%m%d%H%M}
CFRADIAL:V,D{%Y-%m-%d}-F{%Y%m%d%H%M}
products STRUCT 1
profile STRUCT 6
type STRING WIND_PROFILE
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit 9e00dd5

Please sign in to comment.