;+ ; NAME: ; run_map ; PURPOSE: ; IDL main program to update the IPS forecast Web pages. ; Run on Linux as a cron job. ; CATEGORY: ; WWW ; CALLING SEQUENCE: ; idl run_map ; INPUTS: ; (none) ; OUTPUTS: ; (none) ; CALLS: ; forecast, IsType, TimeSystem, TimeUnit, TimeOp ; vu_prefix, forecast_env, is_running ; RESTRICTIONS: ; Can onLy be run on Linux ; idl_startup.pro needs to be run. This requires that the environment ; variable IDL_STARTUP is set. ; PROCEDURE: ; After completion IDL exits again. ; MODIFICATION HISTORY: ; MAR-2000, Paul Hick (UCSD/CASS) ; SEP-2002, Paul Hick (UCSD/CASS) ; Added processing of magnetic field for corotating tomography ; JUL-2003, Paul Hick (UCSD/CASS) ; Write file $TUB/run_map.txt to indicate that a copy of run_map ; is already running. The file is deleted on completion. ; This prevents multiple copies of run_map to run when the hourly ; forecasts take more than an hour to complete. ; JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Introduced function vu_prefix and forecast_env for better ; external control of input files. ;- silent = 1 ftp = 0 tmp = is_running('/idl -quiet run_map', count=count) IF count GT 1 THEN message, /info, 'not running hourly forecast this time' IF count GT 1 THEN exit nv_prefix_slow = vu_prefix() nv_prefix_fast = vu_prefix(/fast) forecast_env, 'slow', /magnetic, bb_prefix_slow forecast_env, 'fast', /magnetic, bb_prefix_fast T1 = TimeSystem(/silent) print print print message, /info, 'Fast maps: radial and tangential magnetic field' print n = n_elements(bb_prefix_fast) FOR i=0,n-1 DO $ forecast, silent=silent, filter=bb_prefix_fast[i], $ /fast, /magnetic, env_filter='bb_filter' IF n EQ 0 THEN message, /info, 'no magnetic field maps' print print print message, /info, 'Fast maps: velocity and density' print forecast, ftp=ftp, silent=silent, filter=nv_prefix_fast, /fast print print print message, /info, 'Slow maps: radial and tangential magnetic field' print n = n_elements(bb_prefix_slow) FOR i=0,n-1 DO $ forecast, silent=silent, filter=bb_prefix_slow[i], $ /magnetic, env_filter='bb_filter' IF n EQ 0 THEN message, /info, 'no magnetic field maps' print print print print, 'Slow maps: velocity and density' print forecast, ftp=ftp, silent=silent, filter=nv_prefix_slow T2 = TimeSystem(/silent) print print message, /info, 'done in'+ strcompress(TimeOp(/subtract,T2,T1, TimeUnit(/minute)))+ ' minutes' EXIT ; Exit IDL