1. Brian Emery
  2. hfrp_additions

Wiki

Clone wiki

hfrp_additions / Home

HFRP ADDITIONS

M-code for analysis and processing of ocean current measurements from drifters and (especially) High Frequency Radar. The HF radar programs complement the High Frequency Radar Programs (HFR Progs) toolbox, hence the name hfrp_additions.

main readme info, etc

To add:

  • radial coverage example
  • histogram example
  • STAT file plotting (with plot_struct)
  • cs_plot and other cs tools
  • struct tools

... otherwise, contents.m here for each folder, for example:

% CONTENTS.M - Descriptions of my HFRProgs Additions
%
% FILE READ, WRITE, INITIALIZING
%   ctfReader.m       - Read Codar Table Format files
%   ctfWriter.m       - Write Codar Table Format files
%   read_cs.m         - Read one or all ranges in a Cross Spectra File
%   loadRDLFile.m     - modified HFRP tool, adds ancillary data to OtherMatrixVariables
%
% SPECIFIC TO RADIAL DATA STRUCTURES
%   temporalConcatRadials_exact.m  - like the HFRP tool, but uses exact locations
%   radial_display.m               - make colored radial sector plots like Codar's Radial Display
%   smooth_in_bearing.m            - apply smoothing to radials in bearing
%   radial_comparison.m            - baseline comparisons of radials from 2 sites
%
% OTHER USEFUL TOOLS
%   cosFileNameParts.m    - Parse file name into site, date, file type, etc
%   cos_totals_to_hfrp.m  - Convert Codar total format into HFRP TUV struct
%   interp_to_codar.m     - Get hf derived velocity given position and time arrays
%   lonlat2km_new.m       - Km East and North relative to origin using Vincenty's
%   km2lonlat_new.m       - Convert Km to lon lat from origin using Vincenty's
%
% NOTES
% the /private subfolder contains any mfiles that are used by the above.
%

EXAMPLES

RADIAL COVERAGE MAP

 cd([wkdir 'mgs1/RDLm/2010_08/'])
  flist = dir([pwd '/RDL*']);
  RDL = loadRDLFile({flist.name});
  
  % Concat into a matrix 
  RDL = temporalConcatRadials_exact(RDL);
  
  % Compute percent coverage (for example)
  v = sum(~isnan(RDL.RadComp),2);
  v = v./max(v) * 100;  v(v<2) = NaN;
  
  % Create the figure
  figure
  axis([-120.3751 -119.0017   33.4712   34.5012])
  cbh = radial_display(RDL,v);
  sbchan_map
  caxis([0 100]) %<-- set colorbar axes

Wiki features

This wiki uses the Creole syntax, and is fully compatible with the 1.0 specification.

The wiki itself is actually a mercurial repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.

Go ahead and try:

$ hg clone https://bitbucket.org/emery/hfrp_additions/wiki

Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.

Syntax highlighting

You can also highlight snippets of text, we use the excellent Pygments library.

Here's an example of some Python code:

def wiki_rocks(text):
    formatter = lambda t: "funky"+t
    return formatter(text)

You can check out the source of this page to see how that's done, and make sure to bookmark the vast library of Pygment lexers, we accept the 'short name' or the 'mimetype' of anything in there.

Have fun!

Updated