Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfidan committed Aug 29, 2024
2 parents f0a0328 + 20caef0 commit 1ab71c4
Show file tree
Hide file tree
Showing 68 changed files with 33,731 additions and 24,467 deletions.
3 changes: 0 additions & 3 deletions ci/parse_pyrad_processes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# %%
import pandas as pd
from pathlib import Path
import os
import inspect
import yaml
import re
from pyrad import proc

Expand Down
1 change: 0 additions & 1 deletion ci/parse_pyrad_products.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# %%
import pandas as pd
from pathlib import Path
import os
import re
Expand Down
146 changes: 73 additions & 73 deletions config/pyart/mch_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2429,8 +2429,8 @@
'long_name': 'Radar echo classification',
'labels': ['NC', 'AG', 'CR', 'LR', 'RP', 'RN', 'VI', 'WS', 'MH',
'IH/HDG'],
'ticks': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'boundaries': [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5],
'ticks': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'boundaries': [-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5],
'coordinates': 'elevation azimuth range',
'scale_factor': 1,
'add_offset': 0,
Expand All @@ -2443,8 +2443,8 @@
'long_name': 'Radar echo classification',
'labels': ['NC', 'AG', 'CR', 'LR', 'RP', 'RN', 'VI', 'WS', 'MH',
'IH/HDG'],
'ticks': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'boundaries': [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5],
'ticks': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'boundaries': [-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5],
'coordinates': 'elevation azimuth range',
'scale_factor': 1,
'add_offset': 0,
Expand Down Expand Up @@ -3637,43 +3637,43 @@ def spectrum_width_limit(container=None, selection=0):

DEFAULT_FIELD_COLORMAP = {
# field name : colormap
reflectivity: 'pyart_NWSRef',
corrected_reflectivity: 'pyart_NWSRef',
total_power: 'pyart_NWSRef',
unfiltered_reflectivity: 'pyart_NWSRef',
corrected_unfiltered_reflectivity: 'pyart_NWSRef',
reflectivity_vv: 'pyart_NWSRef',
corrected_reflectivity_vv: 'pyart_NWSRef',
unfiltered_reflectivity_vv: 'pyart_NWSRef',
reflectivity_bias: 'pyart_NWSRef',
signal_power_hh: 'pyart_NWSRef',
signal_power_vv: 'pyart_NWSRef',
volumetric_reflectivity: 'pyart_NWSRef',
volumetric_reflectivity_vv: 'pyart_NWSRef',
bird_density: 'pyart_NWSRef',
bird_reflectivity: 'pyart_NWSRef',
radar_cross_section_hh: 'pyart_NWSRef',
radar_cross_section_vv: 'pyart_NWSRef',
spectral_reflectivity_hh: 'pyart_NWSRef',
spectral_reflectivity_vv: 'pyart_NWSRef',
unfiltered_spectral_reflectivity_hh: 'pyart_NWSRef',
unfiltered_spectral_reflectivity_vv: 'pyart_NWSRef',
avg_reflectivity: 'pyart_NWSRef',
quant05_reflectivity: 'pyart_NWSRef',
quant10_reflectivity: 'pyart_NWSRef',
quant20_reflectivity: 'pyart_NWSRef',
quant50_reflectivity: 'pyart_NWSRef',
quant80_reflectivity: 'pyart_NWSRef',
quant90_reflectivity: 'pyart_NWSRef',
quant95_reflectivity: 'pyart_NWSRef',
reflectivity: 'pyart_ChaseSpectral',
corrected_reflectivity: 'pyart_ChaseSpectral',
total_power: 'pyart_ChaseSpectral',
unfiltered_reflectivity: 'pyart_ChaseSpectral',
corrected_unfiltered_reflectivity: 'pyart_ChaseSpectral',
reflectivity_vv: 'pyart_ChaseSpectral',
corrected_reflectivity_vv: 'pyart_ChaseSpectral',
unfiltered_reflectivity_vv: 'pyart_ChaseSpectral',
reflectivity_bias: 'pyart_ChaseSpectral',
signal_power_hh: 'pyart_ChaseSpectral',
signal_power_vv: 'pyart_ChaseSpectral',
volumetric_reflectivity: 'pyart_ChaseSpectral',
volumetric_reflectivity_vv: 'pyart_ChaseSpectral',
bird_density: 'pyart_ChaseSpectral',
bird_reflectivity: 'pyart_ChaseSpectral',
radar_cross_section_hh: 'pyart_ChaseSpectral',
radar_cross_section_vv: 'pyart_ChaseSpectral',
spectral_reflectivity_hh: 'pyart_ChaseSpectral',
spectral_reflectivity_vv: 'pyart_ChaseSpectral',
unfiltered_spectral_reflectivity_hh: 'pyart_ChaseSpectral',
unfiltered_spectral_reflectivity_vv: 'pyart_ChaseSpectral',
avg_reflectivity: 'pyart_ChaseSpectral',
quant05_reflectivity: 'pyart_ChaseSpectral',
quant10_reflectivity: 'pyart_ChaseSpectral',
quant20_reflectivity: 'pyart_ChaseSpectral',
quant50_reflectivity: 'pyart_ChaseSpectral',
quant80_reflectivity: 'pyart_ChaseSpectral',
quant90_reflectivity: 'pyart_ChaseSpectral',
quant95_reflectivity: 'pyart_ChaseSpectral',
noisedBm_hh: 'viridis',
noisedBm_vv: 'viridis',
noisedBZ_hh: 'pyart_NWSRef',
noisedBZ_vv: 'pyart_NWSRef',
noisedBADU_hh: 'pyart_NWSRef',
noisedBADU_vv: 'pyart_NWSRef',
noiseADU_hh: 'pyart_NWSRef',
noiseADU_vv: 'pyart_NWSRef',
noisedBZ_hh: 'pyart_ChaseSpectral',
noisedBZ_vv: 'pyart_ChaseSpectral',
noisedBADU_hh: 'pyart_ChaseSpectral',
noisedBADU_vv: 'pyart_ChaseSpectral',
noiseADU_hh: 'pyart_ChaseSpectral',
noiseADU_vv: 'pyart_ChaseSpectral',
noise_pos_h: 'pyart_LangRainbow12',
noise_pos_v: 'pyart_LangRainbow12',

Expand All @@ -3687,22 +3687,22 @@ def spectrum_width_limit(container=None, selection=0):
frequency_of_occurrence: 'pyart_Carbone17',
occurrence: 'pyart_Carbone17',

noisedBZ_hh: 'pyart_NWSRef',
noisedBZ_vv: 'pyart_NWSRef',
stat_test_lag1: 'pyart_NWSRef',
stat_test_lag2: 'pyart_NWSRef',
wide_band_noise: 'pyart_NWSRef',
noisedBZ_hh: 'pyart_ChaseSpectral',
noisedBZ_vv: 'pyart_ChaseSpectral',
stat_test_lag1: 'pyart_ChaseSpectral',
stat_test_lag2: 'pyart_ChaseSpectral',
wide_band_noise: 'pyart_ChaseSpectral',
fields_difference: 'pyart_BuDRd18',
field_mask: 'Greys_r',
field_texture: 'Greys_r',

sun_hit_power_h: 'pyart_NWSRef',
sun_hit_power_v: 'pyart_NWSRef',
sun_hit_power_h: 'pyart_ChaseSpectral',
sun_hit_power_v: 'pyart_ChaseSpectral',

sun_hit_differential_reflectivity: 'pyart_RefDiff',

sun_est_power_h: 'pyart_NWSRef',
sun_est_power_v: 'pyart_NWSRef',
sun_est_power_h: 'pyart_ChaseSpectral',
sun_est_power_v: 'pyart_ChaseSpectral',

sun_est_differential_reflectivity: 'pyart_RefDiff',

Expand All @@ -3720,9 +3720,9 @@ def spectrum_width_limit(container=None, selection=0):
azimuthal_horizontal_wind_component: 'pyart_BuDRd18',
vertical_wind_shear: 'pyart_BuDRd18',
retrieved_velocity: 'pyart_BuDRd18',
retrieved_velocity_std: 'pyart_NWSRef',
retrieved_velocity_std: 'pyart_ChaseSpectral',
velocity_difference: 'pyart_BuDRd18',
wind_speed: 'pyart_NWSRef',
wind_speed: 'pyart_ChaseSpectral',
wind_direction: 'pyart_Wild25',
avg_velocity: 'pyart_BuDRd18',
quant05_velocity: 'pyart_BuDRd18',
Expand Down Expand Up @@ -3854,8 +3854,8 @@ def spectrum_width_limit(container=None, selection=0):
# doppler_spectrum_mean_error:

atmospherical_structures_type: 'pyart_LangRainbow12',
relative_beta: 'pyart_NWSRef',
absolute_beta: 'pyart_NWSRef',
relative_beta: 'pyart_ChaseSpectral',
absolute_beta: 'pyart_ChaseSpectral',
cnr: 'pyart_Carbone17',

# appropriate colors are matplotlib Greys, gray, etc.
Expand All @@ -3864,35 +3864,35 @@ def spectrum_width_limit(container=None, selection=0):
VIS008: 'Greys_r', # 'pyart_Gray9',
IR_016: 'Greys_r', # 'pyart_Gray9_r',

IR_039: 'pyart_NWSRef',
WV_062: 'pyart_NWSRef',
WV_073: 'pyart_NWSRef',
IR_087: 'pyart_NWSRef',
IR_097: 'pyart_NWSRef',
IR_108: 'pyart_NWSRef',
IR_120: 'pyart_NWSRef',
IR_134: 'pyart_NWSRef',
IR_039: 'pyart_ChaseSpectral',
WV_062: 'pyart_ChaseSpectral',
WV_073: 'pyart_ChaseSpectral',
IR_087: 'pyart_ChaseSpectral',
IR_097: 'pyart_ChaseSpectral',
IR_108: 'pyart_ChaseSpectral',
IR_120: 'pyart_ChaseSpectral',
IR_134: 'pyart_ChaseSpectral',

CTH: 'pyart_NWSRef',
CTH: 'pyart_ChaseSpectral',

HRV_norm: 'Greys_r', # 'pyart_Gray9',
VIS006_norm: 'Greys_r', # 'pyart_Gray9',
VIS008_norm: 'Greys_r', # 'pyart_Gray9',
IR_016_norm: 'Greys_r', # 'pyart_Gray9_r',

# Additional reflectivity like fields
'CZ': 'pyart_NWSRef',
'DZ': 'pyart_NWSRef',
'AZ': 'pyart_NWSRef',
'Z': 'pyart_NWSRef',
'dbz': 'pyart_NWSRef',
'DBZ': 'pyart_NWSRef',
'dBZ': 'pyart_NWSRef',
'DBZH': 'pyart_NWSRef',
'DBZ_S': 'pyart_NWSRef',
'DBZ_K': 'pyart_NWSRef',
'reflectivity_horizontal': 'pyart_NWSRef',
'corr_reflectivity': 'pyart_NWSRef',
'CZ': 'pyart_ChaseSpectral',
'DZ': 'pyart_ChaseSpectral',
'AZ': 'pyart_ChaseSpectral',
'Z': 'pyart_ChaseSpectral',
'dbz': 'pyart_ChaseSpectral',
'DBZ': 'pyart_ChaseSpectral',
'dBZ': 'pyart_ChaseSpectral',
'DBZH': 'pyart_ChaseSpectral',
'DBZ_S': 'pyart_ChaseSpectral',
'DBZ_K': 'pyart_ChaseSpectral',
'reflectivity_horizontal': 'pyart_ChaseSpectral',
'corr_reflectivity': 'pyart_ChaseSpectral',
}

# map each field to a limit or a limit function
Expand Down
8 changes: 4 additions & 4 deletions config/pyart/mf_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2672,8 +2672,8 @@
'long_name': 'Radar echo classification',
'labels': ['NC', 'AG', 'CR', 'LR', 'RP', 'RN', 'VI', 'WS', 'MH',
'IH/HDG'],
'ticks': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'boundaries': [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5],
'ticks': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'boundaries': [-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5],
'coordinates': 'elevation azimuth range',
'scale_factor': 1,
'add_offset': 0,
Expand All @@ -2686,8 +2686,8 @@
'long_name': 'Radar echo classification',
'labels': ['NC', 'AG', 'CR', 'LR', 'RP', 'RN', 'VI', 'WS', 'MH',
'IH/HDG'],
'ticks': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'boundaries': [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5],
'ticks': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
'boundaries': [-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5],
'coordinates': 'elevation azimuth range',
'scale_factor': 1,
'add_offset': 0,
Expand Down
3 changes: 0 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#
import pyrad
import os
import sys
from pathlib import Path

# cwd = Path.cwd().resolve()
# sys.path.insert(0, os.path.abspath('../../pyart'))
Expand All @@ -34,7 +32,6 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
import os
import re

extensions = [
Expand Down
3 changes: 2 additions & 1 deletion doc/source/overview/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dempath STRING OPTIONAL. Base directory of the Digital Elevation
smnpath STRING OPTIONAL. Base directory of the SwissMetNet stations data. Used in the comparison between radar data and rain gauges (Optional).
disdropath STRING OPTIONAL. Base directory of the disdrometer data. Used in the comparison between radar data and disdrometers (Optional).
solarfluxpath STRING OPTIONAL. Base directory of the solar flux data. Used to plot the calibration bias based on sun monitoring (Optional).
cosmopath STRING OPTIONAL. Base directory of the COSMO data files.
iconpath STRING OPTIONAL. Base directory of the ICON (NWP model) data files.
==================== ======= =======================================================================================


6 changes: 6 additions & 0 deletions src/make_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# script to build pyrad, pyart and PyTDA
# fvj 30.09.2019

if [[ -z "${PYRAD_PATH}" ]]; then
read -p "Enter the path to your pyrad main directory [default: $HOME/pyrad/]: " PYRAD_PATH
PYRAD_PATH=${PYRAD_PATH:-$HOME/pyrad/}
export PYRAD_PATH=$PYRAD_PATH
fi

echo 'Building Pyart...'
./make_pyart.sh

Expand Down
7 changes: 6 additions & 1 deletion src/make_pyart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ pyvers=${py:7:3}

# remove previous built
echo 'Removing previous built...'
if [[ -z "${PYRAD_PATH}" ]]; then
read -p "Enter the path to your pyrad main directory [default: $HOME/pyrad/]: " PYRAD_PATH
PYRAD_PATH=${PYRAD_PATH:-$HOME/pyrad/}
export PYRAD_PATH=$PYRAD_PATH
fi

rm -r $HOME/.local/lib/python${pyvers}/site-packages/pyart
rm $HOME/.local/lib/python${pyvers}/site-packages/arm_pyart-*

# recompile
echo 'compiling'
cd $HOME/pyrad/src/pyart
cd $PYRAD_PATH/src/pyart
python setup.py install --user
12 changes: 9 additions & 3 deletions src/make_pyrad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ echo 'Removing previous built...'
rm -r $HOME/.local/lib/python${pyvers}/site-packages/pyrad
rm -r $HOME/.local/lib/python${pyvers}/site-packages/mch_pyrad-*

if [[ -z "${PYRAD_PATH}" ]]; then
read -p "Enter the path to your pyrad main directory [default: $HOME/pyrad/]: " PYRAD_PATH
PYRAD_PATH=${PYRAD_PATH:-$HOME/pyrad/}
export PYRAD_PATH=$PYRAD_PATH
fi

# clean pyrad
echo 'icleaning build..'
cd $HOME/pyrad/src/pyrad_proc
cd $PYRAD_PATH/src/pyrad_proc
python setup.py clean --all

# recompile
echo 'compiling...'
cd $HOME/pyrad/src/pyrad_proc
python setup.py install --user
cd $PYRAD_PATH/src/pyrad_proc
python setup.py install --user
8 changes: 7 additions & 1 deletion src/make_pytda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
# remove previous built
echo 'Removing previous built...'

cd $HOME/pyrad/src/PyTDA
if [[ -z "${PYRAD_PATH}" ]]; then
read -p "Enter the path to your pyrad main directory [default: $HOME/pyrad/]: " PYRAD_PATH
PYRAD_PATH=${PYRAD_PATH:-$HOME/pyrad/}
export PYRAD_PATH=$PYRAD_PATH
fi

cd $PYRAD_PATH/src/PyTDA
python setup.py clean --all

# recompile
Expand Down
2 changes: 1 addition & 1 deletion src/pyart
Submodule pyart updated 204 files
18 changes: 11 additions & 7 deletions src/pyrad_proc/pyrad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
=====================================
"""

# Detect if we're being called as part of Pyrad's setup procedure
try:
__PYRAD_SETUP__
Expand All @@ -11,24 +12,27 @@

if __PYRAD_SETUP__:
import sys as _sys

_sys.stderr.write("Running from Pyrad source directory.\n")
del _sys
else:

# Make sure that deprecation warnings get printed by default
import warnings as _warnings

_warnings.simplefilter("always", DeprecationWarning)

# print out helpful message if build fails or importing from source tree
# fvj built not checked for the moment
# from . import __check_build

# import subpackages
from . import graph #noqa
from . import io #noqa
from . import proc #noqa
from . import prod #noqa
from . import util #noqa
from . import flow #noqa
from . import graph # noqa
from . import io # noqa
from . import proc # noqa
from . import prod # noqa
from . import util # noqa
from . import flow # noqa

# root level functions
# non at the moment
Loading

0 comments on commit 1ab71c4

Please sign in to comment.