pro omni_hro_load,type,files=files,trange=trange,verbose=verbose,downloadonly=downloadonly, $
varformat=varformat,datatype=datatype, $
res5min=res5min,res1min=res1min, $
addmaster=addmaster,data_source=data_source, $
tplotnames=tn,source_options=source
istp_init
if not keyword_set(source) then source = !istp
rstrings = ['1min','5min']
rstr = rstrings[ keyword_set(res5min) ]
pathformat = 'omni/omni_cdaweb/hro_'+rstr+'/YYYY/omni_hro_'+rstr+'_YYYYMM01_v01.cdf
relpathnames = file_dailynames(file_format=pathformat,trange=trange,/unique)
files = file_retrieve(relpathnames, _extra=source)
if keyword_set(downloadonly) then return
prefix = 'OMNI_HRO_'+rstr+'_'
cdf2tplot,file=files,varformat=varformat,verbose=verbose,prefix=prefix ,tplotnames=tn
if keyword_set(trange)then begin
if (N_ELEMENTS(trange) eq 2) and (tn[0] gt '') then begin
time_clip, tn, trange[0], trange[1], replace=1, error=error
endif
endif
dprint,dlevel=3,'tplotnames: ',tn
options,/def,tn+'',/lazy_ytitle
options,/def,strfilter(tn,'*_T',delim=' ') , max_value=5e6
swvel_datt = {units: 'km/s', coord_sys: 'gse', st_type: 'none', observatory: 'OMNI', instrument: 'OMNI'}
swpos_datt = {units: 'Re', coord_sys: 'gse', st_type: 'pos', observatory: 'OMNI', instrument: 'OMNI'}
swBgse_datt = {units: 'nT', coord_sys: 'gse', st_type: 'none', observatory: 'OMNI', instrument: 'OMNI'}
swBgsm_datt = {units: 'nT', coord_sys: 'gsm', st_type: 'none', observatory: 'OMNI', instrument: 'OMNI'}
options, /def, strfilter(tn, '*_flow_speed'), 'data_att', swvel_datt
options, /def, strfilter(tn, '*_V?'), 'data_att', swvel_datt
options, /def, strfilter(tn, '*_?min_x'), 'data_att', swpos_datt
options, /def, strfilter(tn, '*_?min_y'), 'data_att', swpos_datt
options, /def, strfilter(tn, '*_?min_z'), 'data_att', swpos_datt
options, /def, strfilter(tn, '*_B?_GSE'), 'data_att', swBgse_datt
options, /def, strfilter(tn, '*_B?_GSM'), 'data_att', swBgsm_datt
end