def test_max_wind(): agl1 = 0. agl2 = 30000 correct = [73.860581475915609, -13.023613325019747, 175.0] returned = winds.max_wind(prof, agl1, agl2) npt.assert_almost_equal(returned, correct) correct_u = [73.86058147591561, 73.86058147591561] correct_v = [-13.023613325019747, -13.023613325019747] correct_p = [175.0, 172.64] correct = [correct_u, correct_v, correct_p] returned = winds.max_wind(prof, agl1, agl2, all=True) npt.assert_almost_equal(returned, correct)
def get_fire(self): ''' Function to generate different indices and information regarding any fire weather in the sounding. This helps fill the data shown in the FIRE inset. Parameters ---------- None Returns ------- None ''' self.fosberg = fire.fosberg(self) self.ppbl_top = params.pbl_top(self) self.sfc_rh = thermo.relh(self.pres[self.sfc], self.tmpc[self.sfc], self.dwpc[self.sfc]) pres_sfc = self.pres[self.sfc] pres_1km = interp.pres(self, interp.to_msl(self, 1000.)) pbl_h = interp.to_agl(self, interp.hght(self, self.ppbl_top)) self.rh01km = params.mean_relh(self, pbot=pres_sfc, ptop=pres_1km) self.pblrh = params.mean_relh(self, pbot=pres_sfc, ptop=self.ppbl_top) self.meanwind01km = winds.mean_wind(self, pbot=pres_sfc, ptop=pres_1km) self.meanwindpbl = winds.mean_wind(self, pbot=pres_sfc, ptop=self.ppbl_top) self.pblmaxwind = winds.max_wind(self, lower=0, upper=pbl_h) #self.pblmaxwind = [np.ma.masked, np.ma.masked] mulplvals = params.DefineParcel(self, flag=3, pres=500) mupcl = params.cape(self, lplvals=mulplvals) self.bplus_fire = mupcl.bplus
''' Create the Sounding (Profile) Object '''