;==================================================================== ; ; MFEXAMPLE.PRO ; Example of interface level 2 to MAGNETOMETER DATA ; ; A.Fedorov, Dec. 21, 1998 ;==================================================================== STime = '1996045220000000' ; Start Time of requested interval ; 1996 year, Feb. 15 (DDday = 045) ; 22:00:00:000 TInt = '0000000000100000' ; Time interval in the same format DefSize = 2000 ; Default size of returned array BGSE = fltarr(3,DefSize) ; Returned array of vector B in GSE BGSM = fltarr(3,DefSize) ; Returned array of vector B in GSM Flag = intarr(DefSize) ; Returned flag of ATTITUDES ; 1 - ATTITUDES are valid ; 0 - ATTITUDES are not valid Time = dblarr(DefSize) ; Array allocated for Time ID = Long(-1) ; Set ID as -1 means the CORALL database is ; not open and DD_Server has to open it. ; The call returns right ID of open databse. Instrument = 1 ; 0 - FM3, 1 - MIF DDLIB = getenv('DDLIB') ; Get environment variable to find right path ; to procedure ; Call returns the real size of obtained data Less or Equel Size RetSize=call_external(DDLIB + 'fmsc_idl.so', $ 'GetIBALLfm3gsem',$ ID, $ BGSE,$ BGSM,$ Flag,$ Time,$ DefSize,$ STime,$ TInt, $ Instrument) ; Close the DataBase error = call_external(DDLIB+'DD_idl.so','CloseID',ID) print, 'Returned Size of data : ',RetSize ;Converting double time to the string time and print data print, 'Time, UT Bx, By, Bz GSM' for i = 0, RetSize -1 do begin TimeString = call_external('DD_idl.so','GetTime',Time(i), /S_VALUE) print, TimeString, BGSM(*,i), Flag(i) endfor end ;================================================================