//h-----------------------------------------------------------------------------
//h .root/data_access/ndar.cdip
//h
//h NDAR is a utility for accessing data from CDIP's netcdf data files. It
//h serves station data in traditional CDIP formats, as well handling newer
//h formats and wavecdf datasets from any source. Output options are explained 
//h below. NOTE: Currently only-single point datasets are served by ndar, not 
//h multi-point or grid datasets.
//h
//h Cmd-line args:  1 - the 3- or 5-digit station/stream id or the 
//h                       netcdf file name, with path under .WNC/WNC_DATA
//h                 2 - the output format: mp, st, gp, etc; see below.
//h                 3 - the start-end datestrings (YYYYMMDDHHMM, or portion 
//h                       thereof) or integer days before present (e.g. 3-0).
//h                      End date presumed to be now if not included.
//h                      Single record (within 24hrs) closest to start time
//h                       given if string prefix is 'c' (e.g. c201508231245)
//h                 4 - 'h' to include a header with the output, or 'n'
//h                     to include non-qc'ed data 
//h
//h Output formats: mp - bulk parameters from spectral processing
//h                 pm - 'classic' pm format, wave data only
//h                 st - full spectra
//h                 sm - spectral moments (FEMA project request)
//h                 up, ut, um - unshoaled versions of above (FEMA project 
//h                        request; available only with OWI spectral layouts)
//h                 ss, ss## - sea/swell output, ## threshold in secs
//h                 fp, ft, fs - forecast (NCEP-driven) predictions of above
//h                 9e - 9-band energy
//h                 9d - 9-band direction
//h                 9c - 9-band combined energy and direction
//h                 dt - legacy databank SST, 0.1 deg formatting
//h                 te - SST, 0.01 deg formatting
//h                 at - CAT4 air temperature
//h                 cf - check factor summary
//h                 gp - GPS positions
//h                 ac - acoustic current meter
//h                 xy - displacement data, xy file format 
//h                 xz - displacement data, Mk3/Mk4 format
//h                 we - wave power format (Hmo, Te)
//h                 ux - upcross format (Hmax, H1/10, H1/3)
//h                 hx - zcross hmax format (ZCROSS input)
//h                 zx - zcross wave-by-wave format (ZCROSS input)
//h                 qp - spread format (peak spread, Qp)
//h
//h Examples: % ndar?071+9e+1                 : Stn 071 9-band energy, latest day
//h           % ndar?071+st+c0                : Stn 071 most recent spectrum
//h           % ndar?071+ss12+7+h             : sea/swell 12s w/header, last week
//h           % ndar?100+mp+201201+h          : Stn 100 params w/header, Jan 2012
//h           % ndar?045+st+19980131-19980201 : Stn 045 spectra, 2 days
//h           % ndar?029p1+gp+2000-2009       : Stn 029 GPS w/header, 10 years
//h           % ndar?166+xy+201212192000      : Stn 166 displacements, 1 hr
//h           % ndar?029+te+c201212192145+h   : Stn 029 SST, single closest rec.
//h           % ndar?181+dt+201301+n          : Stn 181 SST, non-public
//h           % ndar?MODELS/MOP_alongshore/D0513_hindcast+st+201501
//h                                           : MOP full spectra, 1 month
//h-----------------------------------------------------------------------------