Radar I/O and Utilities

Radar I/O

Daisho.read_cfradialFunction
read_cfradial(file::AbstractString) -> Volume

Read 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.

source
Daisho.write_cfradialFunction
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.

source
Daisho.update_cfradialFunction
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.

source
Daisho.validate_specFunction
validate_spec(volume::Volume; strict::Bool=false) -> ValidationReport

Validate volume against the CfRadial 2.1 spec. With strict=true, raises ArgumentError if any errors are found.

source
Daisho.ValidationReportType
ValidationReport(errors::Vector{String}, warnings::Vector{String})

Outcome of validate_spec. errors lists spec violations; warnings lists informational deviations.

source
Daisho.get_radar_orientationFunction
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.

source

Radar Utilities

Daisho.beam_heightFunction
beam_height(slant_range, elevation, radar_height) -> Float64

Beam height above MSL using the 4/3 effective Earth radius standard refraction model. slant_range in meters, elevation in degrees, radar_height in meters.

source
Daisho.dB_to_linearFunction
dB_to_linear(moment) -> Array

Convert a moment array from decibels to linear units element-wise.

source
Daisho.linear_to_dBFunction
linear_to_dB(moment) -> Array

Convert a moment array from linear units to decibels element-wise.

source