;+ ;Procedure: WI_LOAD_MFI ; ;Purpose: Loads THEMIS fluxgate magnetometer data ; ;keywords: ; TRANGE= (Optional) Time range of interest (2 element array). ; /VERBOSE : set to output some useful info ; /ALL : get all All SKY keogram stations ;Example: ; thg_load_fgm,/all ;Notes: ; This routine is (should be) platform independent. ; ; ; $LastChangedBy: davin-win $ ; $LastChangedDate: $ ; $LastChangedRevision: $ ; $URL $ ;- pro wi_load_mfi,type,all=all,files=files,trange=trange,verbose=verbose,downloadonly=downloadonly, $ cdf_data=cdf_data,get_support_data=get_support_data wind_init res = 3600l*24 ; one day resolution in the files tr = timerange(trange) n = ceil((tr[1]-tr[0])/res) > 1 times = dindgen(n)*res + tr[0] ;s = path_sep() ;boc = -62167132800d if not keyword_set(type) then type = 'h0' case type of 'k0': relpath = 'istp/wind/mfi/YYYY/wi_k0_mfi_YYYYMMDD_v0?.cdf' 'h0': relpath = 'istp/wind/mfi_h0/YYYY/wi_h0_mfi_YYYYMMDD_v0?.cdf' endcase source = !wind source.remote_data_dir = 'ftp://cdaweb.gsfc.nasa.gov/pub/' if keyword_set(verbose) then source.verbose >= verbose relpathnames = time_string(times,tformat=relpath) files = file_retrieve(relpathnames, _extra=source) if arg_present(cdf_data) then begin cdf_data = cdf_load_vars(files,varnames=varnames,verbose=verbose,/all) return endif if keyword_set(downloadonly) then return cdf2tplot,file=files,all=all,varnames=varnames,verbose=verbose,prefix='wi_' ; load data into tplot variables end