Example #1
0
 def _interpolate_to_cloudnet_grid():
     wl_band = utils.get_wl_band(data['radar'].radar_frequency)
     data['model'].interpolate_to_common_height(wl_band)
     data['model'].interpolate_to_grid(time, height)
     data['mwr'].rebin_to_grid(time)
     data['radar'].rebin_to_grid(time)
     data['lidar'].rebin_to_grid(time, height)
Example #2
0
 def __init__(self, categorize_file):
     super().__init__(categorize_file)
     self.wl_band = utils.get_wl_band(self.getvar('radar_frequency'))
     self.spec_liq_atten = self._get_approximate_specific_liquid_atten()
     self.coeffs = self._get_iwc_coeffs()
     self.z_factor = self._get_z_factor()
     self.temperature = self._get_temperature_field(categorize_file)
     self.mean_temperature = self._get_mean_temperature()
Example #3
0
 def __init__(self, radar_file):
     super().__init__(radar_file, radar=True)
     self.radar_frequency = float(
         self.getvar('radar_frequency', 'frequency'))
     self.wl_band = utils.get_wl_band(self.radar_frequency)
     self.folding_velocity = self._get_folding_velocity()
     self.sequence_indices = self._get_sequence_indices()
     self.location = getattr(self.dataset, 'location', '')
     self.type = getattr(self.dataset, 'source', '')
     self._netcdf_to_cloudnet(('v', 'width', 'ldr'))
     self._unknown_to_cloudnet(('Zh', 'Zv', 'Ze'), 'Z', units='dBZ')
     self._init_sigma_v()
Example #4
0
 def _interpolate_to_cloudnet_grid() -> list:
     wl_band = utils.get_wl_band(data["radar"].radar_frequency)
     data["model"].interpolate_to_common_height(wl_band)
     data["model"].interpolate_to_grid(time, height)
     data["mwr"].rebin_to_grid(time)
     radar_data_gap_indices = data["radar"].rebin_to_grid(time)
     lidar_data_gap_indices = data["lidar"].interpolate_to_grid(
         time, height)
     bad_time_indices = list(
         set(radar_data_gap_indices + lidar_data_gap_indices))
     valid_ind = [
         ind for ind in range(len(time)) if ind not in bad_time_indices
     ]
     return valid_ind
Example #5
0
def test_get_wl_band(frequency, band):
    assert utils.get_wl_band(frequency) == band
Example #6
0
 def __init__(self, categorize_file: str):
     super().__init__(categorize_file)
     self.wl_band = utils.get_wl_band(float(self.getvar("radar_frequency")))
     self.coeffs = self._get_iwc_coeffs()
     self.z_factor = self._get_z_factor()
     self.temperature = self._get_temperature(categorize_file)
Example #7
0
 def _get_wl_band(self):
     """Returns string corresponding the radar frequency."""
     radar_frequency = self.getvar('radar_frequency')
     wl_band = utils.get_wl_band(radar_frequency)
     return '35' if wl_band == 0 else '94'
Example #8
0
 def _get_wl_band(self):
     """Returns string corresponding the radar frequency."""
     radar_frequency = float(self.getvar("radar_frequency"))
     wl_band = utils.get_wl_band(radar_frequency)
     return "35" if wl_band == 0 else "94"