Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Dimensions {'n_points'} do not exist. when opening cfradial file #188

Closed
aladinor opened this issue Aug 5, 2024 · 5 comments · Fixed by #190
Closed

ValueError: Dimensions {'n_points'} do not exist. when opening cfradial file #188

aladinor opened this issue Aug 5, 2024 · 5 comments · Fixed by #190

Comments

@aladinor
Copy link
Member

aladinor commented Aug 5, 2024

  • xradar version:
  • Python version:
  • Operating System:

Hi everyone,

I am using xradar.io.open_cfradial1_datatree to open the x-radar band files that will be used in the ERAD 2024 short course as follows

import xradar as xd

file_path  = "'/media/alfonso/drive/Laura/ERAD/20240522_MeteoSwiss_ARPA_Lombardia/Data/Xband/DES_VOL_RAW_20240522_1745.nc'"

dt= xd.io.open_cfradial1_datatree(file_path)

and the output is

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[12], line 1
----> 1 dt_erad = xd.io.open_cfradial1_datatree(xband_files[0])

File [~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xradar/io/backends/cfradial1.py:355](http://localhost:8888/lab/tree/2022-esip-kerchunk-tutorial/~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xradar/io/backends/cfradial1.py#line=354), in open_cfradial1_datatree(filename_or_obj, **kwargs)
    349 DataTree(subgroup, name="georeferencing_correction", parent=dtree)
    351 # return datatree with attached sweep child nodes
    352 dtree = _attach_sweep_groups(
    353     dtree,
    354     list(
--> 355         _get_sweep_groups(
    356             ds,
    357             sweep=sweep,
    358             first_dim=first_dim,
    359             optional=optional,
    360             site_coords=site_coords,
    361         ).values()
    362     ),
    363 )
    365 return dtree

File [~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xradar/io/backends/cfradial1.py:174](http://localhost:8888/lab/tree/2022-esip-kerchunk-tutorial/~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xradar/io/backends/cfradial1.py#line=173), in _get_sweep_groups(obj, sweep, first_dim, optional, site_coords)
    172 rslice = slice(0, current_ray_n_gates[0].values.astype(int))
    173 ds = ds.isel(range=rslice)
--> 174 ds = ds.isel(n_points=nslice)
    175 ds = ds.stack(n_points=[dim0, "range"])
    176 ds = ds.unstack("n_points")

File [~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xarray/core/dataset.py:2977](http://localhost:8888/lab/tree/2022-esip-kerchunk-tutorial/~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xarray/core/dataset.py#line=2976), in Dataset.isel(self, indexers, drop, missing_dims, **indexers_kwargs)
   2973     return self._isel_fancy(indexers, drop=drop, missing_dims=missing_dims)
   2975 # Much faster algorithm for when all indexers are ints, slices, one-dimensional
   2976 # lists, or zero or one-dimensional np.ndarray's
-> 2977 indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims)
   2979 variables = {}
   2980 dims: dict[Hashable, int] = {}

File [~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xarray/core/utils.py:824](http://localhost:8888/lab/tree/2022-esip-kerchunk-tutorial/~/mambaforge/envs/kerchunk/lib/python3.12/site-packages/xarray/core/utils.py#line=823), in drop_dims_from_indexers(indexers, dims, missing_dims)
    822     invalid = indexers.keys() - set(dims)
    823     if invalid:
--> 824         raise ValueError(
    825             f"Dimensions {invalid} do not exist. Expected one or more of {dims}"
    826         )
    828     return indexers
    830 elif missing_dims == "warn":
    831     # don't modify input

ValueError: Dimensions {'n_points'} do not exist. Expected one or more of FrozenMappingWarningOnValuesAccess({'azimuth': 360, 'range': 416})

Please let me know your thoughts.

@kmuehlbauer
Copy link
Collaborator

@aladinor Can you post the output of

$ ncdump -h filename

@aladinor
Copy link
Member Author

aladinor commented Aug 5, 2024

netcdf DES_VOL_RAW_20240522_1300 {
dimensions:
	sweep = 8 ;
	time = 2880 ;
	range = 416 ;
	n_points = 1035720 ;
	string_length_8 = 8 ;
	string_length_32 = 32 ;
	status_xml_length = 1 ;
	r_calib = 1 ;
	frequency = 1 ;
variables:
	float fixed_angle(sweep) ;
		fixed_angle:_FillValue = -9999.f ;
		fixed_angle:long_name = "ray_target_fixed_angle" ;
		fixed_angle:units = "degrees" ;
	int sweep_number(sweep) ;
		sweep_number:_FillValue = -9999 ;
		sweep_number:long_name = "sweep_index_number_0_based" ;
		sweep_number:units = "" ;
	int volume_number ;
		volume_number:long_name = "data_volume_index_number" ;
		volume_number:units = "" ;
		volume_number:_FillValue = -9999 ;
	char platform_type(string_length_32) ;
		platform_type:long_name = "platform_type" ;
		platform_type:options = "fixed, vehicle, ship, aircraft_fore, aircraft_aft, aircraft_tail, aircraft_belly, aircraft_roof, aircraft_nose, satellite_orbit, satellite_geostat" ;
	char primary_axis(string_length_32) ;
		primary_axis:long_name = "primary_axis_of_rotation" ;
		primary_axis:options = "axis_z, axis_y, axis_x, axis_z_prime, axis_y_prime, axis_x_prime" ;
	char status_xml(status_xml_length) ;
		status_xml:long_name = "status_of_instrument" ;
	char instrument_type(string_length_32) ;
		instrument_type:long_name = "type_of_instrument" ;
		instrument_type:options = "radar, lidar" ;
		instrument_type:meta_group = "instrument_parameters" ;
	float radar_antenna_gain_h ;
		radar_antenna_gain_h:long_name = "nominal_radar_antenna_gain_h_channel" ;
		radar_antenna_gain_h:units = "db" ;
		radar_antenna_gain_h:_FillValue = -9999.f ;
		radar_antenna_gain_h:meta_group = "radar_parameters" ;
	float radar_antenna_gain_v ;
		radar_antenna_gain_v:long_name = "nominal_radar_antenna_gain_v_channel" ;
		radar_antenna_gain_v:units = "db" ;
		radar_antenna_gain_v:_FillValue = -9999.f ;
		radar_antenna_gain_v:meta_group = "radar_parameters" ;
	float radar_beam_width_h ;
		radar_beam_width_h:long_name = "half_power_radar_beam_width_h_channel" ;
		radar_beam_width_h:units = "degrees" ;
		radar_beam_width_h:_FillValue = -9999.f ;
		radar_beam_width_h:meta_group = "radar_parameters" ;
	float radar_beam_width_v ;
		radar_beam_width_v:long_name = "half_power_radar_beam_width_v_channel" ;
		radar_beam_width_v:units = "degrees" ;
		radar_beam_width_v:_FillValue = -9999.f ;
		radar_beam_width_v:meta_group = "radar_parameters" ;
	float radar_rx_bandwidth ;
		radar_rx_bandwidth:long_name = "radar_receiver_bandwidth" ;
		radar_rx_bandwidth:units = "s-1" ;
		radar_rx_bandwidth:_FillValue = -9999.f ;
		radar_rx_bandwidth:meta_group = "radar_parameters" ;
	char time_coverage_start(string_length_32) ;
		time_coverage_start:long_name = "data_volume_start_time_utc" ;
		time_coverage_start:comment = "ray times are relative to start time in secs" ;
	char time_coverage_end(string_length_32) ;
		time_coverage_end:long_name = "data_volume_end_time_utc" ;
	float frequency(frequency) ;
		frequency:long_name = "transmission_frequency" ;
		frequency:units = "s-1" ;
		frequency:_FillValue = -9999.f ;
		frequency:meta_group = "instrument_parameters" ;
	int grid_mapping ;
		grid_mapping:grid_mapping_name = "radar_lidar_radial_scan" ;
		grid_mapping:longitude_of_projection_origin = 9.1963180527091 ;
		grid_mapping:latitude_of_projection_origin = 45.6272660940886 ;
		grid_mapping:altitude_of_projection_origin = 241. ;
		grid_mapping:false_northing = 0. ;
		grid_mapping:false_easting = 0. ;
	double latitude ;
		latitude:long_name = "latitude" ;
		latitude:units = "degrees_north" ;
		latitude:_FillValue = -9999. ;
	double longitude ;
		longitude:long_name = "longitude" ;
		longitude:units = "degrees_east" ;
		longitude:_FillValue = -9999. ;
	double altitude ;
		altitude:long_name = "altitude" ;
		altitude:units = "meters" ;
		altitude:_FillValue = -9999. ;
		altitude:positive = "up" ;
	double altitude_agl ;
		altitude_agl:long_name = "altitude_above_ground_level" ;
		altitude_agl:units = "meters" ;
		altitude_agl:_FillValue = -9999. ;
		altitude_agl:positive = "up" ;
	char sweep_mode(sweep, string_length_32) ;
		sweep_mode:long_name = "scan_mode_for_sweep" ;
		sweep_mode:options = "sector, coplane, rhi, vertical_pointing, idle, azimuth_surveillance, elevation_surveillance, sunscan, pointing, calibration, manual_ppi, manual_rhi, sunscan_rhi, doppler_beam_swinging, complex_trajectory, electronic_steering" ;
	char polarization_mode(sweep, string_length_32) ;
		polarization_mode:long_name = "polarization_mode_for_sweep" ;
		polarization_mode:options = "horizontal, vertical, hv_alt, hv_sim, circular" ;
		polarization_mode:meta_group = "radar_parameters" ;
	char prt_mode(sweep, string_length_32) ;
		prt_mode:long_name = "transmit_pulse_mode" ;
		prt_mode:options = "fixed, staggered, dual" ;
		prt_mode:meta_group = "radar_parameters" ;
	char follow_mode(sweep, string_length_32) ;
		follow_mode:long_name = "follow_mode_for_scan_strategy" ;
		follow_mode:options = "none, sun, vehicle, aircraft, target, manual" ;
		follow_mode:meta_group = "instrument_parameters" ;
	float target_scan_rate(sweep) ;
		target_scan_rate:long_name = "target_scan_rate_for_sweep" ;
		target_scan_rate:units = "degrees per second" ;
		target_scan_rate:_FillValue = -9999.f ;
	int sweep_start_ray_index(sweep) ;
		sweep_start_ray_index:long_name = "index_of_first_ray_in_sweep" ;
		sweep_start_ray_index:units = "" ;
		sweep_start_ray_index:_FillValue = -9999 ;
	int sweep_end_ray_index(sweep) ;
		sweep_end_ray_index:long_name = "index_of_last_ray_in_sweep" ;
		sweep_end_ray_index:units = "" ;
		sweep_end_ray_index:_FillValue = -9999 ;
	char rays_are_indexed(sweep, string_length_8) ;
		rays_are_indexed:long_name = "flag_for_indexed_rays" ;
	float ray_angle_res(sweep) ;
		ray_angle_res:long_name = "angular_resolution_between_rays" ;
		ray_angle_res:units = "degrees" ;
		ray_angle_res:_FillValue = -9999.f ;
	char r_calib_time(r_calib, string_length_32) ;
		r_calib_time:long_name = "radar_calibration_time_utc" ;
		r_calib_time:meta_group = "radar_calibration" ;
	float r_calib_pulse_width(r_calib) ;
		r_calib_pulse_width:long_name = "radar_calibration_pulse_width" ;
		r_calib_pulse_width:units = "seconds" ;
		r_calib_pulse_width:meta_group = "radar_calibration" ;
		r_calib_pulse_width:_FillValue = -9999.f ;
	float r_calib_xmit_power_h(r_calib) ;
		r_calib_xmit_power_h:long_name = "calibrated_radar_xmit_power_h_channel" ;
		r_calib_xmit_power_h:units = "dBm" ;
		r_calib_xmit_power_h:meta_group = "radar_calibration" ;
		r_calib_xmit_power_h:_FillValue = -9999.f ;
	float r_calib_xmit_power_v(r_calib) ;
		r_calib_xmit_power_v:long_name = "calibrated_radar_xmit_power_v_channel" ;
		r_calib_xmit_power_v:units = "dBm" ;
		r_calib_xmit_power_v:meta_group = "radar_calibration" ;
		r_calib_xmit_power_v:_FillValue = -9999.f ;
	float r_calib_two_way_waveguide_loss_h(r_calib) ;
		r_calib_two_way_waveguide_loss_h:long_name = "radar_calibration_two_way_waveguide_loss_h_channel" ;
		r_calib_two_way_waveguide_loss_h:units = "db" ;
		r_calib_two_way_waveguide_loss_h:meta_group = "radar_calibration" ;
		r_calib_two_way_waveguide_loss_h:_FillValue = -9999.f ;
	float r_calib_two_way_waveguide_loss_v(r_calib) ;
		r_calib_two_way_waveguide_loss_v:long_name = "radar_calibration_two_way_waveguide_loss_v_channel" ;
		r_calib_two_way_waveguide_loss_v:units = "db" ;
		r_calib_two_way_waveguide_loss_v:meta_group = "radar_calibration" ;
		r_calib_two_way_waveguide_loss_v:_FillValue = -9999.f ;
	float r_calib_two_way_radome_loss_h(r_calib) ;
		r_calib_two_way_radome_loss_h:long_name = "radar_calibration_two_way_radome_loss_h_channel" ;
		r_calib_two_way_radome_loss_h:units = "db" ;
		r_calib_two_way_radome_loss_h:meta_group = "radar_calibration" ;
		r_calib_two_way_radome_loss_h:_FillValue = -9999.f ;
	float r_calib_two_way_radome_loss_v(r_calib) ;
		r_calib_two_way_radome_loss_v:long_name = "radar_calibration_two_way_radome_loss_v_channel" ;
		r_calib_two_way_radome_loss_v:units = "db" ;
		r_calib_two_way_radome_loss_v:meta_group = "radar_calibration" ;
		r_calib_two_way_radome_loss_v:_FillValue = -9999.f ;
	float r_calib_receiver_mismatch_loss(r_calib) ;
		r_calib_receiver_mismatch_loss:long_name = "radar_calibration_receiver_mismatch_loss" ;
		r_calib_receiver_mismatch_loss:units = "db" ;
		r_calib_receiver_mismatch_loss:meta_group = "radar_calibration" ;
		r_calib_receiver_mismatch_loss:_FillValue = -9999.f ;
	float r_calib_k_squared_water(r_calib) ;
		r_calib_k_squared_water:long_name = "r_calib_k_squared_water" ;
		r_calib_k_squared_water:units = "" ;
		r_calib_k_squared_water:meta_group = "radar_calibration" ;
		r_calib_k_squared_water:_FillValue = -9999.f ;
	float r_calib_radar_constant_h(r_calib) ;
		r_calib_radar_constant_h:long_name = "calibrated_radar_constant_h_channel" ;
		r_calib_radar_constant_h:units = "db" ;
		r_calib_radar_constant_h:meta_group = "radar_calibration" ;
		r_calib_radar_constant_h:_FillValue = -9999.f ;
	float r_calib_radar_constant_v(r_calib) ;
		r_calib_radar_constant_v:long_name = "calibrated_radar_constant_v_channel" ;
		r_calib_radar_constant_v:units = "db" ;
		r_calib_radar_constant_v:meta_group = "radar_calibration" ;
		r_calib_radar_constant_v:_FillValue = -9999.f ;
	float r_calib_antenna_gain_h(r_calib) ;
		r_calib_antenna_gain_h:long_name = "calibrated_radar_antenna_gain_h_channel" ;
		r_calib_antenna_gain_h:units = "db" ;
		r_calib_antenna_gain_h:meta_group = "radar_calibration" ;
		r_calib_antenna_gain_h:_FillValue = -9999.f ;
	float r_calib_antenna_gain_v(r_calib) ;
		r_calib_antenna_gain_v:long_name = "calibrated_radar_antenna_gain_v_channel" ;
		r_calib_antenna_gain_v:units = "db" ;
		r_calib_antenna_gain_v:meta_group = "radar_calibration" ;
		r_calib_antenna_gain_v:_FillValue = -9999.f ;
	float r_calib_noise_hc(r_calib) ;
		r_calib_noise_hc:long_name = "calibrated_radar_receiver_noise_h_co_polar_channel" ;
		r_calib_noise_hc:units = "dBm" ;
		r_calib_noise_hc:meta_group = "radar_calibration" ;
		r_calib_noise_hc:_FillValue = -9999.f ;
	float r_calib_noise_vc(r_calib) ;
		r_calib_noise_vc:long_name = "calibrated_radar_receiver_noise_v_co_polar_channel" ;
		r_calib_noise_vc:units = "dBm" ;
		r_calib_noise_vc:meta_group = "radar_calibration" ;
		r_calib_noise_vc:_FillValue = -9999.f ;
	float r_calib_noise_hx(r_calib) ;
		r_calib_noise_hx:long_name = "calibrated_radar_receiver_noise_h_cross_polar_channel" ;
		r_calib_noise_hx:units = "dBm" ;
		r_calib_noise_hx:meta_group = "radar_calibration" ;
		r_calib_noise_hx:_FillValue = -9999.f ;
	float r_calib_noise_vx(r_calib) ;
		r_calib_noise_vx:long_name = "calibrated_radar_receiver_noise_v_cross_polar_channel" ;
		r_calib_noise_vx:units = "dBm" ;
		r_calib_noise_vx:meta_group = "radar_calibration" ;
		r_calib_noise_vx:_FillValue = -9999.f ;
	float r_calib_i0_dbm_hc(r_calib) ;
		r_calib_i0_dbm_hc:long_name = "r_calib_i0_dbm_hc" ;
		r_calib_i0_dbm_hc:units = "dBm" ;
		r_calib_i0_dbm_hc:meta_group = "radar_calibration" ;
		r_calib_i0_dbm_hc:_FillValue = -9999.f ;
	float r_calib_i0_dbm_vc(r_calib) ;
		r_calib_i0_dbm_vc:long_name = "r_calib_i0_dbm_vc" ;
		r_calib_i0_dbm_vc:units = "dBm" ;
		r_calib_i0_dbm_vc:meta_group = "radar_calibration" ;
		r_calib_i0_dbm_vc:_FillValue = -9999.f ;
	float r_calib_i0_dbm_hx(r_calib) ;
		r_calib_i0_dbm_hx:long_name = "r_calib_i0_dbm_hx" ;
		r_calib_i0_dbm_hx:units = "dBm" ;
		r_calib_i0_dbm_hx:meta_group = "radar_calibration" ;
		r_calib_i0_dbm_hx:_FillValue = -9999.f ;
	float r_calib_i0_dbm_vx(r_calib) ;
		r_calib_i0_dbm_vx:long_name = "r_calib_i0_dbm_vx" ;
		r_calib_i0_dbm_vx:units = "dBm" ;
		r_calib_i0_dbm_vx:meta_group = "radar_calibration" ;
		r_calib_i0_dbm_vx:_FillValue = -9999.f ;
	float r_calib_receiver_gain_hc(r_calib) ;
		r_calib_receiver_gain_hc:long_name = "calibrated_radar_receiver_gain_h_co_polar_channel" ;
		r_calib_receiver_gain_hc:units = "db" ;
		r_calib_receiver_gain_hc:meta_group = "radar_calibration" ;
		r_calib_receiver_gain_hc:_FillValue = -9999.f ;
	float r_calib_receiver_gain_vc(r_calib) ;
		r_calib_receiver_gain_vc:long_name = "calibrated_radar_receiver_gain_v_co_polar_channel" ;
		r_calib_receiver_gain_vc:units = "db" ;
		r_calib_receiver_gain_vc:meta_group = "radar_calibration" ;
		r_calib_receiver_gain_vc:_FillValue = -9999.f ;
	float r_calib_receiver_gain_hx(r_calib) ;
		r_calib_receiver_gain_hx:long_name = "calibrated_radar_receiver_gain_h_cross_polar_channel" ;
		r_calib_receiver_gain_hx:units = "db" ;
		r_calib_receiver_gain_hx:meta_group = "radar_calibration" ;
		r_calib_receiver_gain_hx:_FillValue = -9999.f ;
	float r_calib_receiver_gain_vx(r_calib) ;
		r_calib_receiver_gain_vx:long_name = "calibrated_radar_receiver_gain_v_cross_polar_channel" ;
		r_calib_receiver_gain_vx:units = "db" ;
		r_calib_receiver_gain_vx:meta_group = "radar_calibration" ;
		r_calib_receiver_gain_vx:_FillValue = -9999.f ;
	float r_calib_receiver_slope_hc(r_calib) ;
		r_calib_receiver_slope_hc:long_name = "calibrated_radar_receiver_slope_h_co_polar_channel" ;
		r_calib_receiver_slope_hc:units = "" ;
		r_calib_receiver_slope_hc:meta_group = "radar_calibration" ;
		r_calib_receiver_slope_hc:_FillValue = -9999.f ;
	float r_calib_receiver_slope_vc(r_calib) ;
		r_calib_receiver_slope_vc:long_name = "calibrated_radar_receiver_slope_v_co_polar_channel" ;
		r_calib_receiver_slope_vc:units = "" ;
		r_calib_receiver_slope_vc:meta_group = "radar_calibration" ;
		r_calib_receiver_slope_vc:_FillValue = -9999.f ;
	float r_calib_receiver_slope_hx(r_calib) ;
		r_calib_receiver_slope_hx:long_name = "calibrated_radar_receiver_slope_h_cross_polar_channel" ;
		r_calib_receiver_slope_hx:units = "" ;
		r_calib_receiver_slope_hx:meta_group = "radar_calibration" ;
		r_calib_receiver_slope_hx:_FillValue = -9999.f ;
	float r_calib_receiver_slope_vx(r_calib) ;
		r_calib_receiver_slope_vx:long_name = "calibrated_radar_receiver_slope_v_cross_polar_channel" ;
		r_calib_receiver_slope_vx:units = "" ;
		r_calib_receiver_slope_vx:meta_group = "radar_calibration" ;
		r_calib_receiver_slope_vx:_FillValue = -9999.f ;
	float r_calib_dynamic_range_db_hc(r_calib) ;
		r_calib_dynamic_range_db_hc:long_name = "r_calib_dynamic_range_db_hc" ;
		r_calib_dynamic_range_db_hc:units = "db" ;
		r_calib_dynamic_range_db_hc:meta_group = "radar_calibration" ;
		r_calib_dynamic_range_db_hc:_FillValue = -9999.f ;
	float r_calib_dynamic_range_db_vc(r_calib) ;
		r_calib_dynamic_range_db_vc:long_name = "r_calib_dynamic_range_db_vc" ;
		r_calib_dynamic_range_db_vc:units = "db" ;
		r_calib_dynamic_range_db_vc:meta_group = "radar_calibration" ;
		r_calib_dynamic_range_db_vc:_FillValue = -9999.f ;
	float r_calib_dynamic_range_db_hx(r_calib) ;
		r_calib_dynamic_range_db_hx:long_name = "r_calib_dynamic_range_db_hx" ;
		r_calib_dynamic_range_db_hx:units = "db" ;
		r_calib_dynamic_range_db_hx:meta_group = "radar_calibration" ;
		r_calib_dynamic_range_db_hx:_FillValue = -9999.f ;
	float r_calib_dynamic_range_db_vx(r_calib) ;
		r_calib_dynamic_range_db_vx:long_name = "r_calib_dynamic_range_db_vx" ;
		r_calib_dynamic_range_db_vx:units = "db" ;
		r_calib_dynamic_range_db_vx:meta_group = "radar_calibration" ;
		r_calib_dynamic_range_db_vx:_FillValue = -9999.f ;
	float r_calib_base_dbz_1km_hc(r_calib) ;
		r_calib_base_dbz_1km_hc:long_name = "radar_reflectivity_at_1km_at_zero_snr_h_co_polar_channel" ;
		r_calib_base_dbz_1km_hc:units = "dBZ" ;
		r_calib_base_dbz_1km_hc:meta_group = "radar_calibration" ;
		r_calib_base_dbz_1km_hc:_FillValue = -9999.f ;
	float r_calib_base_dbz_1km_vc(r_calib) ;
		r_calib_base_dbz_1km_vc:long_name = "radar_reflectivity_at_1km_at_zero_snr_v_co_polar_channel" ;
		r_calib_base_dbz_1km_vc:units = "dBZ" ;
		r_calib_base_dbz_1km_vc:meta_group = "radar_calibration" ;
		r_calib_base_dbz_1km_vc:_FillValue = -9999.f ;
	float r_calib_base_dbz_1km_hx(r_calib) ;
		r_calib_base_dbz_1km_hx:long_name = "radar_reflectivity_at_1km_at_zero_snr_h_cross_polar_channel" ;
		r_calib_base_dbz_1km_hx:units = "dBZ" ;
		r_calib_base_dbz_1km_hx:meta_group = "radar_calibration" ;
		r_calib_base_dbz_1km_hx:_FillValue = -9999.f ;
	float r_calib_base_dbz_1km_vx(r_calib) ;
		r_calib_base_dbz_1km_vx:long_name = "radar_reflectivity_at_1km_at_zero_snr_v_cross_polar_channel" ;
		r_calib_base_dbz_1km_vx:units = "dBZ" ;
		r_calib_base_dbz_1km_vx:meta_group = "radar_calibration" ;
		r_calib_base_dbz_1km_vx:_FillValue = -9999.f ;
	float r_calib_sun_power_hc(r_calib) ;
		r_calib_sun_power_hc:long_name = "calibrated_radar_sun_power_h_co_polar_channel" ;
		r_calib_sun_power_hc:units = "dBm" ;
		r_calib_sun_power_hc:meta_group = "radar_calibration" ;
		r_calib_sun_power_hc:_FillValue = -9999.f ;
	float r_calib_sun_power_vc(r_calib) ;
		r_calib_sun_power_vc:long_name = "calibrated_radar_sun_power_v_co_polar_channel" ;
		r_calib_sun_power_vc:units = "dBm" ;
		r_calib_sun_power_vc:meta_group = "radar_calibration" ;
		r_calib_sun_power_vc:_FillValue = -9999.f ;
	float r_calib_sun_power_hx(r_calib) ;
		r_calib_sun_power_hx:long_name = "calibrated_radar_sun_power_h_cross_polar_channel" ;
		r_calib_sun_power_hx:units = "dBm" ;
		r_calib_sun_power_hx:meta_group = "radar_calibration" ;
		r_calib_sun_power_hx:_FillValue = -9999.f ;
	float r_calib_sun_power_vx(r_calib) ;
		r_calib_sun_power_vx:long_name = "calibrated_radar_sun_power_v_cross_polar_channel" ;
		r_calib_sun_power_vx:units = "dBm" ;
		r_calib_sun_power_vx:meta_group = "radar_calibration" ;
		r_calib_sun_power_vx:_FillValue = -9999.f ;
	float r_calib_noise_source_power_h(r_calib) ;
		r_calib_noise_source_power_h:long_name = "radar_calibration_noise_source_power_h_channel" ;
		r_calib_noise_source_power_h:units = "dBm" ;
		r_calib_noise_source_power_h:meta_group = "radar_calibration" ;
		r_calib_noise_source_power_h:_FillValue = -9999.f ;
	float r_calib_noise_source_power_v(r_calib) ;
		r_calib_noise_source_power_v:long_name = "radar_calibration_noise_source_power_v_channel" ;
		r_calib_noise_source_power_v:units = "dBm" ;
		r_calib_noise_source_power_v:meta_group = "radar_calibration" ;
		r_calib_noise_source_power_v:_FillValue = -9999.f ;
	float r_calib_power_measure_loss_h(r_calib) ;
		r_calib_power_measure_loss_h:long_name = "radar_calibration_power_measurement_loss_h_channel" ;
		r_calib_power_measure_loss_h:units = "db" ;
		r_calib_power_measure_loss_h:meta_group = "radar_calibration" ;
		r_calib_power_measure_loss_h:_FillValue = -9999.f ;
	float r_calib_power_measure_loss_v(r_calib) ;
		r_calib_power_measure_loss_v:long_name = "radar_calibration_power_measurement_loss_v_channel" ;
		r_calib_power_measure_loss_v:units = "db" ;
		r_calib_power_measure_loss_v:meta_group = "radar_calibration" ;
		r_calib_power_measure_loss_v:_FillValue = -9999.f ;
	float r_calib_coupler_forward_loss_h(r_calib) ;
		r_calib_coupler_forward_loss_h:long_name = "radar_calibration_coupler_forward_loss_h_channel" ;
		r_calib_coupler_forward_loss_h:units = "db" ;
		r_calib_coupler_forward_loss_h:meta_group = "radar_calibration" ;
		r_calib_coupler_forward_loss_h:_FillValue = -9999.f ;
	float r_calib_coupler_forward_loss_v(r_calib) ;
		r_calib_coupler_forward_loss_v:long_name = "radar_calibration_coupler_forward_loss_v_channel" ;
		r_calib_coupler_forward_loss_v:units = "db" ;
		r_calib_coupler_forward_loss_v:meta_group = "radar_calibration" ;
		r_calib_coupler_forward_loss_v:_FillValue = -9999.f ;
	float r_calib_dbz_correction(r_calib) ;
		r_calib_dbz_correction:long_name = "calibrated_radar_dbz_correction" ;
		r_calib_dbz_correction:units = "db" ;
		r_calib_dbz_correction:meta_group = "radar_calibration" ;
		r_calib_dbz_correction:_FillValue = -9999.f ;
	float r_calib_zdr_correction(r_calib) ;
		r_calib_zdr_correction:long_name = "calibrated_radar_zdr_correction" ;
		r_calib_zdr_correction:units = "db" ;
		r_calib_zdr_correction:meta_group = "radar_calibration" ;
		r_calib_zdr_correction:_FillValue = -9999.f ;
	float r_calib_ldr_correction_h(r_calib) ;
		r_calib_ldr_correction_h:long_name = "calibrated_radar_ldr_correction_h_channel" ;
		r_calib_ldr_correction_h:units = "db" ;
		r_calib_ldr_correction_h:meta_group = "radar_calibration" ;
		r_calib_ldr_correction_h:_FillValue = -9999.f ;
	float r_calib_ldr_correction_v(r_calib) ;
		r_calib_ldr_correction_v:long_name = "calibrated_radar_ldr_correction_v_channel" ;
		r_calib_ldr_correction_v:units = "db" ;
		r_calib_ldr_correction_v:meta_group = "radar_calibration" ;
		r_calib_ldr_correction_v:_FillValue = -9999.f ;
	float r_calib_system_phidp(r_calib) ;
		r_calib_system_phidp:long_name = "calibrated_radar_system_phidp" ;
		r_calib_system_phidp:units = "degrees" ;
		r_calib_system_phidp:meta_group = "radar_calibration" ;
		r_calib_system_phidp:_FillValue = -9999.f ;
	float r_calib_test_power_h(r_calib) ;
		r_calib_test_power_h:long_name = "radar_calibration_test_power_h_channel" ;
		r_calib_test_power_h:units = "dBm" ;
		r_calib_test_power_h:meta_group = "radar_calibration" ;
		r_calib_test_power_h:_FillValue = -9999.f ;
	float r_calib_test_power_v(r_calib) ;
		r_calib_test_power_v:long_name = "radar_calibration_test_power_v_channel" ;
		r_calib_test_power_v:units = "dBm" ;
		r_calib_test_power_v:meta_group = "radar_calibration" ;
		r_calib_test_power_v:_FillValue = -9999.f ;
	double time(time) ;
		time:standard_name = "time" ;
		time:long_name = "time in seconds since volume start" ;
		time:calendar = "gregorian" ;
		time:units = "seconds since 2024-05-22T13:00:46Z" ;
		time:comment = "times are relative to the volume start_time" ;
	float range(range) ;
		range:long_name = "Range from instrument to center of gate" ;
		range:units = "meters" ;
		range:spacing_is_constant = "true" ;
		range:meters_to_center_of_first_gate = 150.000005960464 ;
		range:meters_between_gates = 300.000011920929 ;
	int ray_n_gates(time) ;
		ray_n_gates:long_name = "number_of_gates" ;
		ray_n_gates:units = "" ;
		ray_n_gates:_FillValue = -9999 ;
	int ray_start_index(time) ;
		ray_start_index:long_name = "array_index_to_start_of_ray" ;
		ray_start_index:units = "" ;
		ray_start_index:_FillValue = -9999 ;
	float ray_start_range(time) ;
		ray_start_range:long_name = "start_range_for_ray" ;
		ray_start_range:units = "meters" ;
		ray_start_range:_FillValue = -9999.f ;
	float ray_gate_spacing(time) ;
		ray_gate_spacing:long_name = "gate_spacing_for_ray" ;
		ray_gate_spacing:units = "meters" ;
		ray_gate_spacing:_FillValue = -9999.f ;
	float azimuth(time) ;
		azimuth:long_name = "ray_azimuth_angle" ;
		azimuth:units = "degrees" ;
		azimuth:_FillValue = -9999.f ;
	float elevation(time) ;
		elevation:long_name = "ray_elevation_angle" ;
		elevation:units = "degrees" ;
		elevation:_FillValue = -9999.f ;
		elevation:positive = "up" ;
	float pulse_width(time) ;
		pulse_width:long_name = "transmitter_pulse_width" ;
		pulse_width:units = "seconds" ;
		pulse_width:_FillValue = -9999.f ;
		pulse_width:meta_group = "instrument_parameters" ;
	float prt(time) ;
		prt:long_name = "pulse_repetition_time" ;
		prt:units = "seconds" ;
		prt:_FillValue = -9999.f ;
		prt:meta_group = "instrument_parameters" ;
	float prt_ratio(time) ;
		prt_ratio:long_name = "pulse_repetition_frequency_ratio" ;
		prt_ratio:units = "seconds" ;
		prt_ratio:_FillValue = -9999.f ;
		prt_ratio:meta_group = "instrument_parameters" ;
	float nyquist_velocity(time) ;
		nyquist_velocity:long_name = "unambiguous_doppler_velocity" ;
		nyquist_velocity:units = "meters per second" ;
		nyquist_velocity:_FillValue = -9999.f ;
		nyquist_velocity:meta_group = "instrument_parameters" ;
	float unambiguous_range(time) ;
		unambiguous_range:long_name = "unambiguous_range" ;
		unambiguous_range:units = "meters" ;
		unambiguous_range:_FillValue = -9999.f ;
		unambiguous_range:meta_group = "instrument_parameters" ;
	byte antenna_transition(time) ;
		antenna_transition:long_name = "antenna_is_in_transition_between_sweeps" ;
		antenna_transition:units = "" ;
		antenna_transition:_FillValue = -128b ;
		antenna_transition:comment = "1 if antenna is in transition, 0 otherwise" ;
	int n_samples(time) ;
		n_samples:long_name = "number_of_samples_used_to_compute_moments" ;
		n_samples:units = "" ;
		n_samples:_FillValue = -9999 ;
		n_samples:meta_group = "instrument_parameters" ;
	int r_calib_index(time) ;
		r_calib_index:long_name = "calibration_data_array_index_per_ray" ;
		r_calib_index:units = "" ;
		r_calib_index:_FillValue = -9999 ;
		r_calib_index:meta_group = "radar_calibration" ;
		r_calib_index:comment = "This is the index for the calibration which applies to this ray" ;
	float measured_transmit_power_h(time) ;
		measured_transmit_power_h:long_name = "measured_radar_transmit_power_h_channel" ;
		measured_transmit_power_h:units = "dBm" ;
		measured_transmit_power_h:_FillValue = -9999.f ;
		measured_transmit_power_h:meta_group = "radar_parameters" ;
	float measured_transmit_power_v(time) ;
		measured_transmit_power_v:long_name = "measured_radar_transmit_power_v_channel" ;
		measured_transmit_power_v:units = "dBm" ;
		measured_transmit_power_v:_FillValue = -9999.f ;
		measured_transmit_power_v:meta_group = "radar_parameters" ;
	float scan_rate(time) ;
		scan_rate:long_name = "antenna_angle_scan_rate" ;
		scan_rate:units = "degrees per second" ;
		scan_rate:_FillValue = -9999.f ;
		scan_rate:meta_group = "instrument_parameters" ;
	short DBZ_TOT(n_points) ;
		DBZ_TOT:units = "dBZ" ;
		DBZ_TOT:sampling_ratio = 1.f ;
		DBZ_TOT:_FillValue = -32768s ;
		DBZ_TOT:scale_factor = 0.01f ;
		DBZ_TOT:add_offset = 0.f ;
		DBZ_TOT:grid_mapping = "grid_mapping" ;
		DBZ_TOT:coordinates = "time range" ;
	short DBZ(n_points) ;
		DBZ:units = "dBZ" ;
		DBZ:sampling_ratio = 1.f ;
		DBZ:_FillValue = -32768s ;
		DBZ:scale_factor = 0.01f ;
		DBZ:add_offset = 0.f ;
		DBZ:grid_mapping = "grid_mapping" ;
		DBZ:coordinates = "time range" ;
		DBZ:maxDBZInRaw = "{\'dbz99\': \'39.6\', \'dbzMax\': \'59.6\'}" ;
	short VEL(n_points) ;
		VEL:units = "m/s" ;
		VEL:sampling_ratio = 1.f ;
		VEL:_FillValue = -32768s ;
		VEL:scale_factor = 0.01f ;
		VEL:add_offset = 0.f ;
		VEL:grid_mapping = "grid_mapping" ;
		VEL:coordinates = "time range" ;
	short WIDTH(n_points) ;
		WIDTH:units = "m/s" ;
		WIDTH:sampling_ratio = 1.f ;
		WIDTH:_FillValue = -32768s ;
		WIDTH:scale_factor = 0.01f ;
		WIDTH:add_offset = 327.68f ;
		WIDTH:grid_mapping = "grid_mapping" ;
		WIDTH:coordinates = "time range" ;
	short ZDR(n_points) ;
		ZDR:units = "dB" ;
		ZDR:sampling_ratio = 1.f ;
		ZDR:_FillValue = -32768s ;
		ZDR:scale_factor = 0.01f ;
		ZDR:add_offset = 0.f ;
		ZDR:grid_mapping = "grid_mapping" ;
		ZDR:coordinates = "time range" ;
	short KDP(n_points) ;
		KDP:units = "deg/km" ;
		KDP:sampling_ratio = 1.f ;
		KDP:_FillValue = -32768s ;
		KDP:scale_factor = 0.01f ;
		KDP:add_offset = 0.f ;
		KDP:grid_mapping = "grid_mapping" ;
		KDP:coordinates = "time range" ;
	short RHOHV(n_points) ;
		RHOHV:units = "" ;
		RHOHV:sampling_ratio = 1.f ;
		RHOHV:_FillValue = -32768s ;
		RHOHV:scale_factor = 1.525949e-05f ;
		RHOHV:add_offset = 0.5000076f ;
		RHOHV:grid_mapping = "grid_mapping" ;
		RHOHV:coordinates = "time range" ;
	short PHIDP(n_points) ;
		PHIDP:units = "deg" ;
		PHIDP:sampling_ratio = 1.f ;
		PHIDP:_FillValue = -32768s ;
		PHIDP:scale_factor = 0.005493332f ;
		PHIDP:add_offset = 180.f ;
		PHIDP:grid_mapping = "grid_mapping" ;
		PHIDP:coordinates = "time range" ;
	short HCLASS(n_points) ;
		HCLASS:units = "" ;
		HCLASS:sampling_ratio = 1.f ;
		HCLASS:_FillValue = -32768s ;
		HCLASS:scale_factor = 1.f ;
		HCLASS:add_offset = 32768.f ;
		HCLASS:grid_mapping = "grid_mapping" ;
		HCLASS:coordinates = "time range" ;
	short MCSSX(n_points) ;
		MCSSX:_FillValue = -32768s ;
		MCSSX:units = "" ;
		MCSSX:grid_mapping = "grid_mapping" ;
		MCSSX:coordinates = "time range" ;
		MCSSX:legend = "{0: \'NoMetClttr\', 1: \'NoMetBioExtd\', 2: \'MetRain\', 3: \'MetWetSnow\', 4: \'MetSnow\', 5: \'MetGraupel\', 6: \'MetHail\'}" ;
		MCSSX:countInRaw = "{\'NoData\': 747333, \'NoMetClttr\': 14711, \'NoMetBioExtd\': 126679, \'MetRain\': 17619, \'MetWetSnow\': 13618, \'MetSnow\': 102587, \'MetGraupel\': 12766, \'MetHail\': 407, \'PercentValidData\': \'27.84\'}" ;

// global attributes:
		:Conventions = "CF-1.7" ;
		:Sub_conventions = "CF-Radial instrument_parameters radar_parameters radar_calibration" ;
		:version = "CF-Radial-1.4" ;
		:title = "VOL_A" ;
		:institution = "" ;
		:references = "Conversion software: Radx::SigmetRadxFile" ;
		:source = "Sigmet IRIS software" ;
		:comment = "" ;
		:original_format = "SIGMETRAW" ;
		:driver = "RadxConvert(NCAR)" ;
		:created = "2024/05/22 13:32:02.801" ;
		:start_datetime = "2024-05-22T13:00:46Z" ;
		:time_coverage_start = "2024-05-22T13:00:46Z" ;
		:start_time = "2024-05-22 13:00:46.849" ;
		:end_datetime = "2024-05-22T13:03:19Z" ;
		:time_coverage_end = "2024-05-22T13:03:19Z" ;
		:end_time = "2024-05-22 13:03:19.983" ;
		:instrument_name = "Desio_Radar" ;
		:site_name = "Desio_Radar" ;
		:scan_name = "VOL_A" ;
		:scan_id = 0 ;
		:platform_is_mobile = "false" ;
		:n_gates_vary = "true" ;
		:ray_times_increase = "true" ;
		:NCO = "netCDF Operators version 4.9.7 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;
		:history = "Wed May 22 13:32:05 2024: ncap2 -Os fixed_angle  (:)={0.7,1.3,3.0,5.0,7.0,10.0,15.0,25.0} /data/out/sigmet/realtime/20240522/DES/VOL/DES_VOL_RAW_20240522_1300.corr.nc /data/out/sigmet/realtime/20240522/DES/VOL/DES_VOL_RAW_20240522_1300.corr2.nc\nWed May 22 13:32:04 2024: ncap2 -Os sweep_number  (:)={0,1,2,3,4,5,6,7} /data/out/sigmet/realtime/20240522/DES/VOL/DES_VOL_RAW_20240522_1300.nc /data/out/sigmet/realtime/20240522/DES/VOL/DES_VOL_RAW_20240522_1300.corr.nc\nSigmet RAW file: ; get_percentile_nc.py: maxDBZInRaw = {\"dbz99\": \"39.6\", \"dbzMax\": \"59.6\"}; get_percentile_nc.py: legend MCSSX= {0: \"NoMetClttr\", 1: \"NoMetBioExtd\", 2: \"MetRain\", 3: \"MetWetSnow\", 4: \"MetSnow\", 5: \"MetGraupel\", 6: \"MetHail\"}; get_percentile_nc.py: countInRaw MCSSX= {\"NoData\": 747333, \"NoMetClttr\": 14711, \"NoMetBioExtd\": 126679, \"MetRain\": 17619, \"MetWetSnow\": 13618, \"MetSnow\": 102587, \"MetGraupel\": 12766, \"MetHail\": 407, \"PercentValidData\": \"27.84\"}; get_percentile_nc.py: meltingLevelMslM = {\'ave\': 2796.5, \'min\': 2700.0, \'max\': 2800.0}" ;
}

@kmuehlbauer
Copy link
Collaborator

@aladinor You've been tripped by a bug here. I'm working on a fix atm.

@kmuehlbauer
Copy link
Collaborator

@aladinor I've added a fix in #190, and release v0.6.1 with this. It should be available in conda-forge soon conda-forge/xradar-feedstock#21.

@aladinor
Copy link
Member Author

aladinor commented Aug 8, 2024

Thanks, @kmuehlbauer. ERAD data is now available in ARCO format. We just need to upload it to the bucket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants