Summary of Matlab Routines

Gan, Maldives
Sep-Dec 2011



Almost all routines show examples for use in the source code. This text provides a short summary of each routine.

AntPerf.fig
The antenna performace user interface GUI. Allows directory selection, and lets you choose to save images. Run from a matlab prompt by stating AntPerf

AntPerf.m
The antenna performance code. Plots five graphs showing scanning attributes. Capable of processing multiple scans in a serial fashion. Called through the GUI.

PID_fraction.m
Computes a volume-weighted fraction of Particle ID type. Directly accesses PID data in cfradial format. Integrates over a full scan volume. Capable of processing multiple volumes in a serial fashion. Outputs summary inforamtion to a text file for processing by PID_readback_plot

PID_readback_plot.m
Processes the PID_fraction output file. Includes logic to try to find faulty volumes. Note that you might still review the PID_fraction output file to clean up anything missed by the automatic logic. Processing includes production of a final bar chart for the particle types.

determine_radar_fields.m
A simple function to determine which of the many CfRadial field names correspond to radar parameters. Uses the sizes of the parameters to determine if they are dimensioned by range and time. You must use the function get_hdf5_param_atts before using this routine.

get_and_scale_hdf5_data.m
Recover the requested data values from an HDF5 file. This routine properly scales any scaleable parameters, and reblocks parameters to remove the effect of ragged beams (created originally by truncating data above a certain altitiude). You must use the function get_hdf5_param_atts before using this routine.

get_hdf5_param_atts.m
Recovers all parameter attributes from an hdf5 cfradial file. Uses the matlab high-level h5info command. Packs the returned information into a matlab structure.

get_scan_daysecs.m
Recovers the beam time offsets from a cfradial file, for either hdf5 or netcdf classic convention files. Returns values in the number of seconds from the start of a day. Works only with a single day of data. This routine is used by main_timeline_multi_plot.

get_sorted_file_list.m
The storage convention used by spol data places files in a "scan type" directory, followed by a date subdirectory. Files are typically scatterd in directories of type rhi, sec, sur, and vert, followed by the date. If you wish to process files in a time-sequential order, you need to properly sort the filenames. This routine is used by the main_timeline_multi_plot, and by several other routines..

get_time_from_fname.m
General purpose routine to find the day second offset from the name of a file. Currently supports extraction of time from dorade and cfradial file names. Can be easily extended to other time-stamped files. Used by the main_timeline_multi_plot routine to determine times of DORADE files.

get_unscaled_hdf5_data.m
Gets the requested parameters from an hdf5 file, without applying scaling.

get_unscaled_nc_data.m
Gets the requested parameters from an netcdf classic file, without applying scaling.

label_timeline_axes.m
Re-labels the timeline axis, transforming seconds labels into hh:mm:ss format, and preserves that re-labeling when the axis is resized. This is a very specific routine for the timeline application. This routine is paired with myXtickResize.m

main_bscan.m
A demo application showing how all the various cfradial routines can come together and usefully display data. Note that this routine is not polished or complete, but is a really good example of how to handle CfRadial data using these routines.

main_timeline_multi_plot.m
A very specific application for the S-PolKa data network. This routine is used to compare various datasets, possibly multiple copies on different disks, to ensure that there are no missing or dropped data. This routine is essential for S-Pol data management, and has already proved its value by finding several omissions in S-Pol intra network data transfer.

myXtickResize.m
This is a routine specific to the timeline plot. This code prevents resizing in the vertical when zooming or roaming in a timeline plot.

nc_radar_read.m
Somewhat older code to read netcdf classic file format. Recovers all attributes and parameters, and places the information in named structures.

plot_pointing_info.m
The working code for the antenna performance plots (AntPerf), and is called by those routines. Plots azimuth, elevation and beamnumber data in a series of slightly different plots. Does this on a volume-by-volume basis. This routine

read_pointing_info_h5.m
Does what it says. Uses the high-level matlab routine h5read

run_antenna_plots.m
Permits calling of the plot_pointing_info routine without the use of the AntPerf GUI.

select_files.m
Calls the matlab routine uigetfile to select files, then structures those filenames in an array for use by other routines.

select_params.m
Assists in selecting radar data fields.

start_antenna_plots.m
This is the interface between the AntPerf gui and the plot_pointing_info code. Allows selection of filenames and iteration through the selected files.

zdr_bias_dynamo.m
Computes Zdr bias for a selected vertical pointing data set. If multiple files are selected, produces a single analysis for the sum of the files. Note that this routine is currently configured to perform computations on ZDR_M, the uncorrected ZDR field.

--- Bob Rilling --- / NCAR Earth Observing Laboratory
Created: Wed Sep 28 09:28:26 GMT 2011
Last modified: