pro lanl_mpa_load,type,files=files,trange=trange,verbose=verbose,downloadonly=downloadonly, $
varformat=varformat,datatype=datatype, $
probe=probe, $
addmaster=addmaster,tplotnames=tn,source_options=source
if not keyword_set(probe) then probe = '97'
datatype = 'k0'
istp_init
if not keyword_set(source) then source = !istp
dprint,dlevel=2,verbose=source.verbose,'Loading LANL ',probe,' MPA data'
if datatype eq 'k0' then begin
case probe of
'02': pathformat = 'lanl/02a_mpa/YYYY/a2_k0_mpa_YYYYMMDD_v02.cdf'
'01': pathformat = 'lanl/01a_mpa/YYYY/a1_k0_mpa_YYYYMMDD_v02.cdf'
'97': pathformat = 'lanl/97_mpa/YYYY/l7_k0_mpa_YYYYMMDD_v02.cdf'
'94': pathformat = 'lanl/94_mpa/YYYY/l4_k0_mpa_YYYYMMDD_v02.cdf'
'91': pathformat = 'lanl/91_mpa/YYYY/l1_k0_mpa_YYYYMMDD_v02.cdf'
'90': pathformat = 'lanl/90_mpa/YYYY/l0_k0_mpa_YYYYMMDD_v02.cdf'
'89': pathformat = 'lanl/89_mpa/YYYY/l9_k0_mpa_YYYYMMDD_v02.cdf'
endcase
endif
if not keyword_set(varformat) then begin
varformat = '*'
endif
relpathnames = file_dailynames(file_format=pathformat,trange=trange,addmaster=addmaster)
files = file_retrieve(relpathnames, _extra=source, /last_version)
if keyword_set(downloadonly) then return
prefix = 'lanl_'+probe+'_mpa_'
cdf2tplot,file=files,varformat=varformat,verbose=source.verbose,prefix=prefix ,tplotnames=tn
dprint,dlevel=3,verbose=source.verbose,'tplotnames: ',tn
del_data,strfilter(tn,'*PB5')
end