;+ ; 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, destroyvar ; 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 = getenv('SILENT') IF silent EQ '' THEN silent = 2 ELSE silent = fix(silent) ftp = 0 tmp = is_running('/idl -quiet run_map', count=count, silent=silent) IF count GT 1 THEN message, /info, 'not running hourly forecast this time' IF count GT 1 THEN exit nv_prefix_slow = vu_prefix(silent=silent) nv_prefix_fast = vu_prefix('nv3h',/fast,silent=silent) forecast_env, 'slow', /magnetic, bb_prefix_slow, silent=silent forecast_env, 'fast', /magnetic, bb_prefix_fast, silent=silent nocorrelation = getenv( 'NOCORRELATION' ) EQ '1' say, '==== Fast: images for radial and tangential magnetic field', threshold=2, silent=silent n = n_elements(bb_prefix_fast) IF n EQ 0 THEN $ say, 'no magnetic field maps', threshold=2, silent=silent $ ELSE $ FOR i=0,n-1 DO $ forecast, utnow, $ silent = silent , $ /fast , $ /raw_files , $ /magnetic , $ filter = bb_prefix_fast[i] , $ env_filter = 'bb_filter' , $ nocorrelation = nocorrelation say, '==== Fast: images for velocity and density', threshold=2, silent=silent forecast, utnow, $ silent = silent , $ /fast , $ /raw_files , $ filter = nv_prefix_fast , $ ftp = ftp , $ nocorrelation = nocorrelation say, '==== Slow: images for radial and tangential magnetic field', threshold=2, silent=silent destroyvar, utnow n = n_elements(bb_prefix_slow) IF n EQ 0 THEN $ say, 'no magnetic field maps', threshold=2, silent=silent $ ELSE $ FOR i=0,n-1 DO $ forecast, utnow, $ silent = silent , $ /raw_files , $ /magnetic , $ filter = bb_prefix_slow[i] , $ env_filter = 'bb_filter' , $ nocorrelation = nocorrelation say, '==== Slow: images for velocity and density', threshold=2, silent=silent forecast, utnow, $ silent = silent , $ /raw_files , $ filter = nv_prefix_slow , $ ftp = ftp , $ nocorrelation = nocorrelation exit ; Exit IDL