Radar I/O and Utilities
Radar I/O
Daisho.read_cfradial — Function
read_cfradial(file::AbstractString) -> VolumeRead a CfRadial 1.4 or 2.1 NetCDF file and return a Volume. Format is auto-detected from the presence of a root-level sweep_group_name variable (v2) vs flat top-level field arrays (v1).
The reader is lenient about optional fields and absorbs non-spec attributes into extra_attrs / extra_vars. Required spec fields raise ArgumentError naming the file and missing field.
Daisho.write_cfradial — Function
write_cfradial(volume::Volume, file::AbstractString; write_extras::Bool=false)Write volume to file as a spec-canonical CfRadial 2.1 NetCDF4 file. Drops non-spec attributes from extra_attrs / extra_vars unless write_extras=true, in which case they are emitted alongside spec content.
Daisho.update_cfradial — Function
update_cfradial(input_file, output_file, volume::Volume; fields=nothing)Format-preserving in-place update. Copies input_file to output_file and overwrites/adds field variables from volume. The ray layout in volume must match the file's existing layout; otherwise raises an error.
fields selects a subset of field names to write. If nothing, every field in volume.sweeps[*].fields is written.
Daisho.validate_spec — Function
validate_spec(volume::Volume; strict::Bool=false) -> ValidationReportValidate volume against the CfRadial 2.1 spec. With strict=true, raises ArgumentError if any errors are found.
Daisho.ValidationReport — Type
ValidationReport(errors::Vector{String}, warnings::Vector{String})Outcome of validate_spec. errors lists spec violations; warnings lists informational deviations.
Daisho.get_radar_orientation — Function
get_radar_orientation(file) -> Matrix{Float64}Read heading, pitch, and roll arrays from a CfRadial NetCDF file. Returns an (n_rays, 3) matrix; columns missing in the file are filled with NaN.
Radar Utilities
Daisho.beam_height — Function
beam_height(slant_range, elevation, radar_height) -> Float64Beam height above MSL using the 4/3 effective Earth radius standard refraction model. slant_range in meters, elevation in degrees, radar_height in meters.
Daisho.dB_to_linear — Function
dB_to_linear(moment) -> ArrayConvert a moment array from decibels to linear units element-wise.
Daisho.linear_to_dB — Function
linear_to_dB(moment) -> ArrayConvert a moment array from linear units to decibels element-wise.
Daisho.dB_to_linear! — Function
dB_to_linear!(moment)In-place dB → linear conversion.
Daisho.linear_to_dB! — Function
linear_to_dB!(moment)In-place linear → dB conversion.