Skip to content

Commit

Permalink
added function to compute turbulence using PyTDA
Browse files Browse the repository at this point in the history
  • Loading branch information
fvj committed Sep 30, 2019
1 parent fc354fd commit 5b3f8a7
Show file tree
Hide file tree
Showing 22 changed files with 666 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = src/pyart
url = https://github.com/meteoswiss-mdr/pyart.git
branch = master
[submodule "src/PyTDA"]
path = src/PyTDA
url = https://github.com/meteoswiss-mdr/PyTDA
49 changes: 49 additions & 0 deletions config/processing/cscs_rad4alp_turbulence_PLA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Name of this configuration:
# Will be used in product generation save path
name STRING rad4alp_turbulence_PLA

# ---------------------------------------------------------
# Raw data pathes
# ---------------------------------------------------------

# Base path of the raw data.
# Note: Must have a trailing '/'
# ('<datapath>/<scanname>/<YYYY-MM-DD>/<YYYYMMDDHHMMSS00datatype>.<ext>')
datapath STRING /store/msrad/radar/rad4alp/rawdata/

# Base path for cosmo data
cosmopath STRING /store/msrad/cosmo/cosmo1/

# Loading of saved datasets
loadbasepath STRING /store/msrad/radar/pyrad_products/
loadname STRING rad4alp_turbulence_PLA

# ------------------------------------------------------------
# Auxiliary data pathes
# ------------------------------------------------------------
# Base path for swissmetnet data
smnpath STRING /data/meteo_products/SMNRetrieve/

# Base path for disdrometer data
disdropath STRING /data/scattering/dsd_ts/

# --------------------------------------------
# Output data
# --------------------------------------------
saveimgbasepath STRING /store/msrad/radar/pyrad_products/
# Supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
imgformat STRING png

# --------------------------------------------------------
# configuration files pathes
# --------------------------------------------------------

# Base path of configuration files
configpath STRING $HOME/pyrad/config/

# Configuration of the radar location and approach direction
locationConfigFile STRING $HOME/pyrad/config/processing/rad4alp_turbulence_PLA_loc.txt

# Configuration of the product generation
productConfigFile STRING $HOME/pyrad/config/processing/rad4alp_turbulence_PLA_prod.txt

124 changes: 124 additions & 0 deletions config/processing/rad4alp_turbulence_PLA_loc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# Configuration for PARADISO tests at the airport Payerne

# Number of radars to process
NumRadars INT 1

# Time tolerance when processing multiple radars [s]
TimeTol FLOAT 3600.

# rad4alp radar name
RadarName STRARR 1
A

# rad4alp radar range resolution L:Low H:High
RadarRes STRARR 1
L

# Names of the radar scans in the specified sector
ScanList STRARR 20
001 # masterscan: first scan of a volume
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020


# angles from 001 to 020
# ['-0.2', '0.4', '1.0', '1.6', '2.5', '3.5', '4.5', '5.5', '6.5', '7.5',
# '8.5', '9.5', '11.0', '13.0', '16.0', '20.0', '25.0', '30.0', '35.0', '40.0']


# Repetition time of the scans [min]
ScanPeriod INT 5

# Frequency of cosmo run [h]
CosmoRunFreq INT 3

# hours forecasted in cosmo run [h]
CosmoForecasted INT 7

# radar constant
radconsth FLOAT 71.67
radconstv FLOAT 72.27

# radar constant h, v (20141125)
# A 72.78, 72.98
# D 73.88, 73.88
# L 72.57, 72.12
# P 73.20, 73.23

# radar constant h, v (20150127)
# A 71.67, 72.27
# D 73.23, 73.33
# L 72.53, 72.08
# P 72.68, 72.71

# matching filter losses
mflossh FLOAT 1.
mflossv FLOAT 1.

# gas attenuation coefficient (1-way attenuation)
# the coefficient is actually that of S-band but this is the one used operationally for rad4alp radars
attg FLOAT 0.008

# azimuth tolerance when azimuth may be variable
AzimTol FLOAT 0.4

# Image config
ppiImageConfig STRUCT 8
xsize FLOAT 10. # image size [inches] (default dots per inch (dpi):72)
ysize FLOAT 8. # image size [inches] (default dots per inch (dpi):72)
xmin FLOAT -100.0 # Min distance on horizontal axis [km]
xmax FLOAT 100.0 # Max distance on horizontal axis [km]
ymin FLOAT -100.0 # Min distance on vertical axis [km]
ymax FLOAT 100.0 # Max distance on vertical axis [km]
rngRing FLOAT 20.0 # distance between range rings (0 no range ring) [km]
dpi INT 72 # dots per inch (72 web quality, 300 print quality)

rhiImageConfig STRUCT 7
xsize FLOAT 10. # image size [inches]
ysize FLOAT 5. # image size [inches]
xmin FLOAT 0.0 # Min distance on horizontal axis [km]
xmax FLOAT 100.0 # Max distance on horizontal axis [km]
ymin FLOAT 0.0 # Min distance on vertical axis [km]
ymax FLOAT 12.0 # Max distance on vertical axis [km]
dpi INT 72 # dots per inch (72 web quality, 300 print quality)

ppiMapImageConfig STRUCT 10
rngRing FLOAT 20.0 # distance between range rings (0 no range ring) [km]
xsize FLOAT 7. # image size [inches] (default dots per inch (dpi):72)
ysize FLOAT 7. # image size [inches] (default dots per inch (dpi):72)
lonmin FLOAT 9. # Min longitude [deg]
lonmax FLOAT 10. # Max longitude [deg]
latmin FLOAT 46. # Min latitude [deg]
latmax FLOAT 49. # Max latitude [deg]
mapres STRING 10m # map resolution (10m, 50m, 110m)
dpi INT 72 # dots per inch (72 web quality, 300 print quality)
maps STRARR 11 # maps to overplot
relief
countries
provinces
urban_areas
roads
railroads
coastlines
lakes
lakes_europe
rivers
rivers_europe
63 changes: 63 additions & 0 deletions config/processing/rad4alp_turbulence_PLA_prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# Product generation configuration
#

# List of datasets to generate.
# The detailed specification of each dataset is given below.
dataSetList STRARR 3
l0:dBZ
l0:W
l0:EDR


# ==========================================================================================
# raw data processing
# ==========================================================================================
dBZ STRUCT 3
type STRING RAW
datatype STRING RAD4ALP:dBZ
products STRUCT 2
EL001 STRUCT 3
type STRING PPI_IMAGE
anglenr INT 2
voltype STRING dBZ
AZ093 STRUCT 4
type STRING PSEUDORHI_IMAGE
angle FLOAT 93.
AziTol FLOAT 1.
voltype STRING dBZ

W STRUCT 3
type STRING RAW
datatype STRING RAD4ALP:W
products STRUCT 2
EL001 STRUCT 3
type STRING PPI_IMAGE
anglenr INT 2
voltype STRING W
AZ093 STRUCT 4
type STRING PSEUDORHI_IMAGE
angle FLOAT 93.
AziTol FLOAT 1.
voltype STRING W


# ==========================================================================================
# turbulence retrieval
# ==========================================================================================
EDR STRUCT 4
type STRING TURBULENCE
datatype STRARR 2
RAD4ALP:dBZ
RAD4ALP:W
verbose INT 0
products STRUCT 2
EL001 STRUCT 3
type STRING PPI_IMAGE
anglenr INT 2
voltype STRING EDR
AZ093 STRUCT 4
type STRING PSEUDORHI_IMAGE
angle FLOAT 93.
AziTol FLOAT 1.
voltype STRING EDR
11 changes: 11 additions & 0 deletions config/pyart/mch_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
unfiltered_spectrum_width_vv = 'unfiltered_spectrum_width_vv'
spectrum_width_vv = 'spectrum_width_vv'

turbulence = 'turbulence'

# Differential reflectivity fields, ZDR
differential_reflectivity = 'differential_reflectivity'
corrected_differential_reflectivity = 'corrected_differential_reflectivity'
Expand Down Expand Up @@ -411,6 +413,7 @@
'unfiltered_spectrum_width': unfiltered_spectrum_width,
'spectrum_width_vv': spectrum_width_vv,
'unfiltered_spectrum_width_vv': unfiltered_spectrum_width_vv,
'turbulence': turbulence,
'differential_reflectivity': differential_reflectivity,
'corrected_differential_reflectivity': corrected_differential_reflectivity,
'unfiltered_differential_reflectivity': (
Expand Down Expand Up @@ -1130,6 +1133,12 @@
'long_name': 'Unfiltered Doppler spectrum width',
'coordinates': 'elevation azimuth range'},

turbulence: {
'units': 'm^2/3 s^-1',
'standard_name': 'EDR^1/3',
'long_name': 'Cubic Root of Eddy Dissipation Rate',
'coordinates': 'elevation azimuth range'},

# Dual-polarization fields
differential_reflectivity: {
'units': 'dB',
Expand Down Expand Up @@ -2799,6 +2808,7 @@ def spectrum_width_limit(container=None, selection=0):
unfiltered_spectrum_width: 'pyart_NWS_SPW',
spectrum_width_vv: 'pyart_NWS_SPW',
unfiltered_spectrum_width_vv: 'pyart_NWS_SPW',
turbulence: 'pyart_NWS_SPW',

normalized_coherent_power: 'pyart_Carbone17',

Expand Down Expand Up @@ -2965,6 +2975,7 @@ def spectrum_width_limit(container=None, selection=0):
unfiltered_spectrum_width: spectrum_width_limit,
spectrum_width_vv: spectrum_width_limit,
unfiltered_spectrum_width_vv: spectrum_width_limit,
turbulence: (0., 0.2),

normalized_coherent_power: (0., 1.),

Expand Down
Binary file modified doc/pyrad_library_reference_dev.pdf
Binary file not shown.
Binary file modified doc/pyrad_library_reference_users.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/_modules/pyrad/io/io_aux.html
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,8 @@ <h1>Source code for pyrad.io.io_aux</h1><div class="highlight"><pre>
<span class="n">field_name</span> <span class="o">=</span> <span class="s1">&#39;wind_speed&#39;</span>
<span class="k">elif</span> <span class="n">datatype</span> <span class="o">==</span> <span class="s1">&#39;WIND_DIRECTION&#39;</span><span class="p">:</span>
<span class="n">field_name</span> <span class="o">=</span> <span class="s1">&#39;wind_direction&#39;</span>
<span class="k">elif</span> <span class="n">datatype</span> <span class="o">==</span> <span class="s1">&#39;EDR&#39;</span><span class="p">:</span>
<span class="n">field_name</span> <span class="o">=</span> <span class="s1">&#39;turbulence&#39;</span>

<span class="k">elif</span> <span class="n">datatype</span> <span class="o">==</span> <span class="s1">&#39;Ah&#39;</span><span class="p">:</span>
<span class="n">field_name</span> <span class="o">=</span> <span class="s1">&#39;specific_attenuation&#39;</span>
Expand Down
Loading

0 comments on commit 5b3f8a7

Please sign in to comment.