;+ ;Procedure: THM_LOAD_MOM ; ;Purpose: Loads THEMIS moments data ; ;keywords: ; probe = Probe name. The default is 'all', i.e., load all available probes. ; This can be an array of strings, e.g., ['a', 'b'] or a ; single string delimited by spaces, e.g., 'a b' ; datatype = The type of data to be loaded, for this case, there is only ; one option, the default value of 'fgm', so this is a ; placeholder should there be more that one data type. 'all' ; can be passed in also, to get all variables. ; TRANGE= (Optional) Time range of interest (2 element array), if ; this is not set, the default is to prompt the user. Note ; that if the input time range is not a full day, a full ; day's data is loaded ; level = the level of the data, the default is 'l1', or level-1 ; data. A string (e.g., 'l2') or an integer can be used. 'all' ; can be passed in also, to get all levels. ; CDF_DATA: named variable in which to return cdf data structure: only works ; for a single spacecraft and datafile name. ; VARNAMES: names of variables to load from cdf: default is all. ; /GET_SUPPORT_DATA: load support_data variables as well as data variables ; into tplot variables. ; /DOWNLOADONLY: download file but don't read it. ; /valid_names, if set, then this routine will return the valid probe, datatype ; and/or level options in named variables supplied as ; arguments to the corresponding keywords. ; files named varible for output of pathnames of local files. ; /VERBOSE set to output some useful info ;Example: ; thg_load_mom,/get_suppport_data,probe=['a', 'b'] ;Notes: ; Written by D. Larson Jan 2007. ; Updated keywords KRB Feb 2007 ; ; $LastChangedBy$ ; $LastChangedDate$ ; $LastChangedRevision$ ; $URL$ ;- ; processing to be performed on tplot variables pro thm_load_mom_post, sname=probe, _extra=_extra get_data,'th'+probe+'_mom',ptr=p get_data,'th'+probe+'_mom_pot',ptr=p_pot if keyword_set(p) then begin ; cluges *p.y = long(*p.y) *p_pot.y = fix(*p_pot.y) if ((*p.x)[0] lt 946684800) then begin delt = 978307200 *p.x += delt endif endif end pro thm_load_mom,probe=probe, datatype=datatype, trange=trange, $ level=level, verbose=verbose, downloadonly=downloadonly, $ cdf_data=cdf_data,get_support_data=get_support_data, $ varnames=varnames, valid_names = valid_names, files=files thm_load_xxx,sname=probe, datatype=datatype, trange=trange, $ level=level, verbose=verbose, downloadonly=downloadonly, $ cdf_data=cdf_data,get_cdf_data=arg_present(cdf_data), $ get_support_data=get_support_data, $ varnames=varnames, valid_names = valid_names, files=files, $ vsnames = 'a b c d e', $ type_sname = 'probe', $ vdatatypes = 'mom', $ vlevels = 'l1 l2', $ deflevel = 'l1', $ version = 'v01', $ /addmaster, $ post_process_proc = 'thm_load_mom_post', $ _extra = _extra end