@@ -10,10 +10,9 import importlib | |||
|
10 | 10 | import itertools |
|
11 | 11 | from multiprocessing import Pool, TimeoutError |
|
12 | 12 | from multiprocessing.pool import ThreadPool |
|
13 | import copy_reg | |
|
14 | import cPickle | |
|
15 | import types | |
|
16 | from functools import partial | |
|
13 | ||
|
14 | ||
|
15 | ||
|
17 | 16 | import time |
|
18 | 17 | #from sklearn.cluster import KMeans |
|
19 | 18 | |
@@ -759,7 +758,7 class PrecipitationProc(Operation): | |||
|
759 | 758 | |
|
760 | 759 | Numerator = ( (4*numpy.pi)**3 * aL**2 * 16 * numpy.log(2) ) |
|
761 | 760 | Denominator = ( Pt * Gt * Gr * Lambda**2 * SPEED_OF_LIGHT * tauW * numpy.pi * ThetaT * ThetaR) |
|
762 |
RadarConstant = |
|
|
761 | RadarConstant = 5e-27 * Numerator / Denominator # | |
|
763 | 762 | print '***' |
|
764 | 763 | print '*** RadarConstant' , RadarConstant, '****' |
|
765 | 764 | print '***' |
@@ -787,7 +786,7 class PrecipitationProc(Operation): | |||
|
787 | 786 | D_range = numpy.zeros([self.Num_Bin,self.Num_Hei]) |
|
788 | 787 | SIGMA = numpy.zeros([self.Num_Bin,self.Num_Hei]) |
|
789 | 788 | N_dist = numpy.zeros([self.Num_Bin,self.Num_Hei]) |
|
790 |
|
|
|
789 | V_mean = numpy.zeros(self.Num_Hei) | |
|
791 | 790 | del_V = numpy.zeros(self.Num_Hei) |
|
792 | 791 | Z = numpy.zeros(self.Num_Hei) |
|
793 | 792 | Ze = numpy.zeros(self.Num_Hei) |
@@ -819,20 +818,23 class PrecipitationProc(Operation): | |||
|
819 | 818 | |
|
820 | 819 | N_dist[:,R] = ETAn[:,R] / SIGMA[:,R] |
|
821 | 820 | |
|
822 |
DMoments = self.Moments(Pr[:,R], |
|
|
821 | DMoments = self.Moments(Pr[:,R], Velrange[0:self.Num_Bin]) | |
|
823 | 822 | |
|
824 | 823 | try: |
|
825 |
popt01,pcov = curve_fit(self.gaus, |
|
|
824 | popt01,pcov = curve_fit(self.gaus, Velrange[0:self.Num_Bin] , Pr[:,R] , p0=DMoments) | |
|
826 | 825 | except: |
|
827 | 826 | popt01=numpy.zeros(3) |
|
828 | 827 | popt01[1]= DMoments[1] |
|
829 |
|
|
|
828 | if popt01[1]<0 or popt01[1]>20: | |
|
829 | popt01[1]=numpy.NaN | |
|
830 | ||
|
831 | V_mean[R]=popt01[1] | |
|
830 | 832 | |
|
831 |
Z[R] = numpy.nansum( N_dist[:,R] * (D_range[:,R])**6 ) |
|
|
833 | Z[R] = numpy.nansum( N_dist[:,R] * (D_range[:,R])**6 )#*10**-18 | |
|
832 | 834 | |
|
833 |
RR[R] = |
|
|
835 | RR[R] = 0.0006*numpy.pi * numpy.nansum( D_range[:,R]**3 * N_dist[:,R] * Velrange[0:self.Num_Bin] ) #Rainfall rate | |
|
834 | 836 | |
|
835 | Ze[R] = (numpy.nansum( ETAn[:,R]) * Lambda**4) / ( numpy.pi**5 * Km) | |
|
837 | Ze[R] = (numpy.nansum( ETAn[:,R]) * Lambda**4) / ( 10**-18*numpy.pi**5 * Km) | |
|
836 | 838 | |
|
837 | 839 | |
|
838 | 840 | |
@@ -848,25 +850,26 class PrecipitationProc(Operation): | |||
|
848 | 850 | dataOut.channelList = [0,1,2] |
|
849 | 851 | |
|
850 | 852 | dataOut.data_param[0]=dBZ |
|
851 |
dataOut.data_param[1]= |
|
|
853 | dataOut.data_param[1]=V_mean | |
|
852 | 854 | dataOut.data_param[2]=RR |
|
853 | 855 | |
|
854 | 856 | #print 'VELRANGE', Velrange |
|
855 | print 'Range', len(Range) | |
|
856 | print 'delv',del_V | |
|
857 |
|
|
|
858 | print 'NOISE', dataOut.noise[0], 10*numpy.log10(dataOut.noise[0]) | |
|
859 | print 'radarconstant', RadarConstant | |
|
860 |
print ' |
|
|
861 |
# print 'ETAn |
|
|
862 |
# print 'ETA |
|
|
863 |
# print ' |
|
|
864 |
print ' |
|
|
865 | print 'dataOut.SPCparam[1]', numpy.nansum(dataOut.SPCparam[1][0], axis=0) | |
|
857 | #print 'Range', len(Range) | |
|
858 | #print 'delv',del_V | |
|
859 | # print 'DRANGE', D_range[:,56] | |
|
860 | # #print 'NOISE', dataOut.noise[0], 10*numpy.log10(dataOut.noise[0]) | |
|
861 | # print 'radarconstant', RadarConstant | |
|
862 | # #print 'ETAn SHAPE', ETAn.shape | |
|
863 | # # print 'ETAn ', numpy.nansum(ETAn, axis=0) | |
|
864 | # # print 'ETAd ', numpy.nansum(ETAd, axis=0) | |
|
865 | # print 'Pr ', numpy.nansum(Pr, axis=0) | |
|
866 | # print 'dataOut.SPCparam[1]', numpy.nansum(dataOut.SPCparam[1][0], axis=0) | |
|
866 | 867 | # print 'Ze ', dBZe |
|
867 |
|
|
|
868 | print 'RR2 ', RR2 | |
|
868 | print 'Z ', dBZ | |
|
869 | # print 'Ndist',N_dist[:,56] | |
|
870 | # #print 'RR2 ', RR2 | |
|
869 | 871 | print 'RR ', RR |
|
872 | print 'Vr', V_mean | |
|
870 | 873 | #print 'RR2 ', dBRR2 |
|
871 | 874 | #print 'D_mean', D_mean |
|
872 | 875 | #print 'del_V', del_V |
@@ -1029,7 +1032,7 class FullSpectralAnalysis(Operation): | |||
|
1029 | 1032 | data_output[1] = numpy.array(velocityY) #self.moving_average(numpy.array(velocityY) , N=1) |
|
1030 | 1033 | data_output[2] = -velocityV#FirstMoment |
|
1031 | 1034 | |
|
1032 |
print ' |
|
|
1035 | print 'data_output', data_output.shape | |
|
1033 | 1036 | #print FirstMoment |
|
1034 | 1037 | # print 'velocityX',numpy.shape(data_output[0]) |
|
1035 | 1038 | # print 'velocityX',data_output[0] |
@@ -1,1 +1,1 | |||
|
1 |
<Project description="Segundo Test" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/ |
|
|
1 | <Project description="Segundo Test" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdataCLAIRE/Extra" /><Parameter format="date" id="191113" name="startDate" value="2018/02/01" /><Parameter format="date" id="191114" name="endDate" value="2018/02/01" /><Parameter format="time" id="191115" name="startTime" value="17:00:00" /><Parameter format="time" id="191116" name="endTime" value="20:00:00" /><Parameter format="int" id="191118" name="online" value="0" /><Parameter format="int" id="191119" name="walk" value="1" /></Operation><Operation id="19112" name="printInfo" priority="2" type="self" /><Operation id="19113" name="printNumberOfBlock" priority="3" type="self" /></ReadUnit><ProcUnit datatype="Parameters" id="1913" inputId="1912" name="ParametersProc"><Operation id="19131" name="run" priority="1" type="self" /><Operation id="19132" name="SpectralFilters" priority="2" type="other"><Parameter format="float" id="191321" name="PositiveLimit" value="1.5" /><Parameter format="float" id="191322" name="NegativeLimit" value="3.5" /></Operation><Operation id="19133" name="PrecipitationProc" priority="3" type="other" /><Operation id="19134" name="ParametersPlot" priority="4" type="other"><Parameter format="int" id="191341" name="id" value="10" /><Parameter format="str" id="191342" name="wintitle" value="First_gg" /><Parameter format="str" id="191343" name="colormap" value="ocean_r" /><Parameter format="int" id="191344" name="zmin" value="00" /><Parameter format="int" id="191345" name="zmax" value="40" /><Parameter format="int" id="191346" name="ymin" value="0" /><Parameter format="int" id="191347" name="ymax" value="11" /><Parameter format="int" id="191348" name="xmin" value="17" /><Parameter format="int" id="191349" name="xmax" value="20" /><Parameter format="int" id="191350" name="save" value="1" /><Parameter format="str" id="191351" name="figpath" value="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdataCLAIRE/Extra" /></Operation><Operation id="19135" name="ParamWriter" priority="5" type="other"><Parameter format="str" id="191351" name="path" value="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdatatest/test1024" /><Parameter format="int" id="191352" name="blocksPerFile" value="100" /><Parameter format="list" id="191353" name="metadataList" value="heightList,timeZone,paramInterval" /><Parameter format="list" id="191354" name="dataList" value="data_output,data_SNR,utctime,utctimeInit" /></Operation></ProcUnit><ProcUnit datatype="SpectraProc" id="1912" inputId="1911" name="SpectraProc"><Operation id="19121" name="run" priority="1" type="self" /><Operation id="19122" name="setRadarFrequency" priority="2" type="self"><Parameter format="float" id="191221" name="frequency" value="445.09e6" /></Operation></ProcUnit></Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now