Exemplo n.º 1
0
    def hgt_500mb(self):

        u = self.dataSet.readNCVariable('U')
        v = self.dataSet.readNCVariable('V')
        u_corr = wrf.unstaggerX(u)
        v_corr = wrf.unstaggerY(v)
        height = wrf.unstaggerZ(self.height)
        ref_val = 50000.
        #Switched to Cython
        #self.u10 = wrf.loglinear_interpolate(u_corr, self.press, ref_val)
        #self.v10 = wrf.loglinear_interpolate(v_corr, self.press, ref_val)
        self.u10 = np.array(wrf_cython.loglinear_interpolate(u_corr, self.press, ref_val))
        self.v10 = np.array(wrf_cython.loglinear_interpolate(v_corr, self.press, ref_val))
        #self.var = wrf.hypsometric(height,self.press, ref_val, self.temp)
        self.var = np.array(wrf_cython.hypsometric(height, self.press, ref_val, self.temp))
        self.var2 = self.var
        self.varTitle = "500-mb Geopotential Height (m)\n" + self.dataSet.getTime()
        #Set short variable title for time series
        self.sTitle = "500-mb Geopotential Height (m)"
Exemplo n.º 2
0
 def winds_300mb(self):
     
     u = self.dataSet.readNCVariable('U')
     v = self.dataSet.readNCVariable('V')
     u_corr = wrf.unstaggerX(u)
     v_corr = wrf.unstaggerY(v)
     height = wrf.unstaggerZ(self.height)
     ref_val = 30000.
     #Switched to Cython
     #self.u10 = wrf.loglinear_interpolate(u_corr, self.press, ref_val)
     #self.v10 = wrf.loglinear_interpolate(v_corr, self.press, ref_val)
     self.u10 = np.array(wrf_cython.loglinear_interpolate(u_corr, self.press, ref_val))
     self.v10 = np.array(wrf_cython.loglinear_interpolate(v_corr, self.press, ref_val))
     var1 = wrf.get_bulk_wind(self.u10,self.v10)
     self.var = wrf.convertWind_MStoKT(var1)
     #self.var2 = wrf.hypsometric(height, self.press, ref_val, self.temp)
     self.var2 = np.array(wrf_cython.hypsometric(height, self.press, ref_val, self.temp))
     self.varTitle = "300-mb Wind\n" + self.dataSet.getTime()
     #Set short variable title for time series
     self.sTitle = "300-mb Wind"
Exemplo n.º 3
0
 def temp_500mb(self):
    
     u = self.dataSet.readNCVariable('U')
     v = self.dataSet.readNCVariable('V')
     u_corr = wrf.unstaggerX(u)
     v_corr = wrf.unstaggerY(v)
     height = wrf.unstaggerZ(self.height)
     ref_val = 50000.
     #Switched to Cython
     #var1 = wrf.loglinear_interpolate(self.temp, self.press, ref_val)
     #self.u10 = wrf.loglinear_interpolate(u_corr, self.press, ref_val)
     #self.v10 = wrf.loglinear_interpolate(v_corr, self.press, ref_val)
     var1 = np.array(wrf_cython.loglinear_interpolate(self.temp, self.press, ref_val))
     self.u10 = np.array(wrf_cython.loglinear_interpolate(u_corr, self.press, ref_val))
     self.v10 = np.array(wrf_cython.loglinear_interpolate(v_corr, self.press, ref_val))
     self.var = wrf.convertT_KtoC(var1)
     #self.var2 = wrf.hypsometric(height, self.press, ref_val, self.temp)
     self.var2 = np.array(wrf_cython.hypsometric(height, self.press, ref_val, self.temp))
     self.varTitle = "500-mb Temperature ($^{\circ}$C)\n" + self.dataSet.getTime()
     #Set short variable title for time series
     self.sTitle = "500-mb Temperature ($^{\circ}$C)"
Exemplo n.º 4
0
    def vort_500mb(self):

        u = self.dataSet.readNCVariable('U')
        v = self.dataSet.readNCVariable('V')
        u_corr = wrf.unstaggerX(u)
        v_corr = wrf.unstaggerY(v)
        height = wrf.unstaggerZ(self.height)
        ref_val = 50000.     
        #Switched to Cython
        #self.u10 = wrf.loglinear_interpolate(u_corr, self.press, ref_val)
        #self.v10 = wrf.loglinear_interpolate(v_corr, self.press, ref_val)
        self.u10 = np.array(wrf_cython.loglinear_interpolate(u_corr, self.press, ref_val))
        self.v10 = np.array(wrf_cython.loglinear_interpolate(v_corr, self.press, ref_val))
        self.var = wrf.rel_vort(self.u10, self.v10,
                   self.dataSet.dx[self.dataSet.currentGrid-1],
                   self.dataSet.dy[self.dataSet.currentGrid-1])
        #self.var2 = wrf.hypsometric(height, self.press, ref_val, self.temp)
        self.var2 = np.array(wrf_cython.hypsometric(height, self.press, ref_val, self.temp))
        self.varTitle = "500-mb Relative Vorticity ($10^{-5}$ $s^{-1}$)\n" +\
                         self.dataSet.getTime()
        #Set short variable title for time series
        self.sTitle = "500-mb Relative Vorticity ($10^{-5}$ $s^{-1}$)"