Skip to content

Commit

Permalink
Merge pull request #132 from kirknorth/iss119
Browse files Browse the repository at this point in the history
ENH: Dealias using 4DD using previous radar volumes.
  • Loading branch information
jjhelmus committed Apr 7, 2014
2 parents 6d3575a + 98b8b60 commit 0ea921d
Show file tree
Hide file tree
Showing 7 changed files with 2,466 additions and 1,991 deletions.
7 changes: 4 additions & 3 deletions examples/correct/plot_dealias.py
Expand Up @@ -4,7 +4,7 @@
=====================================================
In this example doppler velocities are dealiased using the Univ. of
Washington FourDD algorithm implemented in Py-ART. Sonde data is
Washington FourDD algorithm implemented in Py-ART. Sounding data is
used for the initial condition of the dealiasing.
"""
Expand All @@ -30,8 +30,9 @@
height, speed, direction = t

# perform dealiasing
dealias_data = pyart.correct.dealias_fourdd(radar, height * 1000.0, speed,
direction, target)
dealias_data = pyart.correct.dealias_fourdd(
radar, sounding_heights=height * 1000.0, sounding_wind_speeds=speed,
sounding_wind_direction=direction)
radar.add_field('corrected_velocity', dealias_data)

# create a plot of the first and sixth sweeps
Expand Down
41 changes: 38 additions & 3 deletions pyart/correct/_fourdd_h.pxd
@@ -1,13 +1,36 @@
""" Cython wrapper around NASA TRMM RSL Library """
"""
Cython wrapper around University of Washington 4DD code.
"""

# data structures
cimport pyart.io._rsl_h as _rsl_h


cdef extern from "FourDD.h":

cdef int MAXRAYS
cdef int MAXBINS
cdef float HIGHDZBTHRESHOLD
cdef int VERBOSE
cdef int PROXIMITY
cdef float COMPTHRESH
cdef float COMPTHRESH2
cdef float THRESH
cdef int MINGOOD
cdef float STDTHRESH
cdef float LOWDBZ
cdef float HIGHDBZ
cdef int NODBZRMRV
cdef int RM
cdef int PASS2
cdef int DELNUM
cdef float CKVAL
cdef int SIGN
cdef int MAXCOUNT
cdef float MAXSHEAR

void firstGuess(_rsl_h.Volume* soundVolume, float missingVal,
char* sounding_name, int VAD_time,
unsigned short* sounding)

void firstGuessNoRead(_rsl_h.Volume* soundVolume, float missingVal,
float *height_array, float *speed_array,
float *direction_array, int nlevels, int VAD_time,
Expand All @@ -19,3 +42,15 @@ cdef extern from "FourDD.h":

void prepVolume(_rsl_h.Volume* DBZVolume, _rsl_h.Volume* rvVolume,
float missingVal)

float window(_rsl_h.Volume* rvVolume, int sweepIndex, int startray,
int endray, int firstbin, int lastbin, float* std,
float missingVal, unsigned short* success)

int findRay(_rsl_h.Volume* rvVolume1, _rsl_h.Volume* rvVolume2,
int sweepIndex1, int sweepIndex2, int currIndex1,
float missingVal)

float previousVal(_rsl_h.Volume* rvVolume, _rsl_h.Volume* lastVolume,
int sweepIndex, int currIndex, int rangeIndex,
float missingVal)

0 comments on commit 0ea921d

Please sign in to comment.