예제 #1
0
def test_thetae():
    input_p = 925
    input_t = 7
    input_td = 3
    correct_t = 28.864469418729357
    returned_t = thermo.thetae(input_p, input_t, input_td)
    npt.assert_almost_equal(returned_t, correct_t)

    input_p = 950
    input_t = 20
    input_td = 14
    correct_t = 57.68849564698746
    returned_t = thermo.thetae(input_p, input_t, input_td)
    npt.assert_almost_equal(returned_t, correct_t)
예제 #2
0
def test_thetae():
    input_p = 925
    input_t = 7
    input_td = 3
    correct_t = 28.864469418729357
    returned_t = thermo.thetae(input_p, input_t, input_td)
    npt.assert_almost_equal(returned_t, correct_t)

    input_p = 950
    input_t = 20
    input_td = 14
    correct_t = 57.68849564698746
    returned_t = thermo.thetae(input_p, input_t, input_td)
    npt.assert_almost_equal(returned_t, correct_t)
예제 #3
0
 def get_thetae_profile(self):
     '''
         Function to calculate the theta-e profile.
         
         Parameters
         ----------
         None
         
         Returns
         -------
         Array of theta-e profile
         '''
     thetae = ma.empty(self.pres.shape[0])
     for i in range(len(self.v)):
         thetae[i] = thermo.ctok( thermo.thetae(self.pres[i], self.tmpc[i], self.dwpc[i]) )
     thetae[thetae == self.missing] = ma.masked
     thetae.set_fill_value(self.missing)
     return thetae
예제 #4
0
 def get_thetae_profile(self):
     '''
         Function to calculate the theta-e profile.
         
         Parameters
         ----------
         None
         
         Returns
         -------
         Array of theta-e profile
         '''
     thetae = ma.empty(self.pres.shape[0])
     for i in range(len(self.v)):
         thetae[i] = thermo.ctok( thermo.thetae(self.pres[i], self.tmpc[i], self.dwpc[i]) )
     thetae[thetae == self.missing] = ma.masked
     thetae.set_fill_value(self.missing)
     return thetae
예제 #5
0
''' Create the Sounding (Profile) Object '''