;+ ; NAME: ; forecast ; PURPOSE: ; Updates all the plots and synoptic maps for the IPS forecast Web pages ; using the output files from the last run of the tomography program. ; CATEGORY: ; pro/tool ; CALLING SEQUENCE: PRO forecast, utnow, nosave=nosave, daily=daily, ftp=ftp, fast=fast, $ filter=filter, magnetic=magnetic, gif=gif, png=png, $ silent=silent, env_filter=env_filter, _extra=_extra ; OPTIONAL INPUT PARAMETERS: ; filter=filter scalar; type: string ; either 'nv3d' or 'nv3f'; ; overrides prefix value set by href=vu_type_insitu= ; /nosave suppresses output of graphics as GIF files ; (used for debugging) ; ; /fast processes maps for time-dependent tomography ; (by default the corotating tomography files are processed) ; /magnetic process magnetic field, instead of plasma ; density and velocity ; /png, /gif sets image format for output images (png is the default) ; OUTPUTS: ; (GIF files; HTML files) ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar, IsType, Carrington, TimeSet ; TimeGet, TimeUnit, TimeOp, TimeSystem, vu_localskymap ; vu_synopticmap, destroyvar, forecast_info, forecast_ftp ; vu_earthskymap, vu_remoteview, hide_env, vu_insitu ; vu_select, vu_type_insitu, vu_type_skymap, vu_get ; vu_gettime, vu_prefix, forecast_cfg ; PROCEDURE: ; The tomography data should be located in $NAGOYAslow. Output files ; (GIF files and updated HTML files) are written to $NAGOYA/slow/image ; MODIFICATION HISTORY: ; MAR-2000, Paul Hick (UCSD/CASS) ; JUL-2002, Paul Hick (UCSD/CASS) ; Suppressed time axis on synoptic map when time-dependent tomography ; files are processed. ; Fixed a couple of problems related to processing of output from time- ; dependent tomography. The identification of the time of the last ; tomography run was wrong. The correlation plots now use e3 instead of ; ea files. ; SEP-2002, Paul Hick (UCSD/CASS) ; Adapted to accept magnetic field 'bb3d' files ; Added /forcecd keyword to vu_select ; NOV-2002, Paul Hick (UCSD/CASS) ; Added keyword /nowrap to one call of vu_gettime (calculating the 3D matrices ; for corotating tomography displays) ; APR-2003, Paul Hick (UCSD/CASS) ; Completed switch to png files (gif still available through keyword /gif) ; JUL-2003, Paul Hick (UCSD/CASS) ; Removed calculation of correlations from ea* and e3* files (this produced ; the cast_insitu_****_v_c_n_c.gif images) ; AUG-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Introduced Carrington calls (replacing arg_time) ;- InitVar, silent , 0 InitVar, fast , /key InitVar, ftp , /key InitVar, daily , /key InitVar, nosave , /key InitVar, magnetic , /key InitVar, gif , /key InitVar, png , /key png = png or 1-gif speed = 1-magnetic density = 1-magnetic brad = magnetic btang = magnetic kind = (['slow','fast'])[fast] dump = 1-nosave local2ut= forecast_cfg(/local2ut) maxelo = forecast_cfg(/maxelo, /degrees) upto = forecast_cfg(/round_time) rounds = round(forecast_cfg(/round_time, /mmsec))/1000 scale = forecast_cfg(/scale_skymap) fmt_rot = forecast_cfg(/crformat) delt = forecast_cfg(/insitu_delt) trange = forecast_cfg(/insitu_trange) tstep = forecast_cfg(/insitu_tstep) volsize = forecast_cfg(/remote_volsize) ngrid = forecast_cfg(/remote_ngrid) fovsize = forecast_cfg(/remote_fovsize) color_v = forecast_cfg(/remote_color_v) color_n = forecast_cfg(/remote_color_n) range_v = forecast_cfg(kind, /remote_range_v) range_n = forecast_cfg(kind, /remote_range_n) opa_v = forecast_cfg(kind, /remote_opacity_v) opa_n = forecast_cfg(kind, /remote_opacity_n) power_v = forecast_cfg(kind, /remote_opacity_power_v) power_n = forecast_cfg(kind, /remote_opacity_power_n) ; raw_dir: directory where raw tomography files are located ; dat_dir: directory where tomography files for images are stored ; img_dir: ouput dir where gifs and html files are written by IDL ; sav_dir: output dir for backup of gif files (the images are put in subdirs) ; htm_dir: WWW dir. Gifs and html files are copied from img_dir to htm_dir. nagoya = forecast_cfg(/root) root = filepath(root=nagoya, subdir=kind, '') raw_dir = filepath(root=root, subdir='raw', '') dat_dir = (['final','raw'])[daily] dat_dir = filepath(root=root, subdir=dat_dir, '') img_dir = filepath(root=root, subdir='image', '') sav_dir = filepath(root=root, subdir='image', '') htm_dir = filepath(root=forecast_cfg(/html), subdir=kind,'current') ; If destination doesn't exist then output is to the terminal IF dump THEN destination = [img_dir, sav_dir] ; Get forecast time from input, or use system time. CASE IsType(utnow,/defined) OF 0: utnow = TimeSystem(local2ut,/silent) 1: utnow = Carrington(utnow,/get_time) ENDCASE utnow = TimeGet(utnow, TimeUnit(/sec), roundt=rounds) ; Round to nearest hour utm4 = TimeOp(/add, utnow, TimeSet(day=forecast_cfg(/disk_dtime))) utm4 = TimeGet(utm4, TimeUnit(/sec), roundt=rounds) location = forecast_cfg(utnow, /remote_location) message, /info, 'now is '+TimeGet(utnow, /ymd, upto=TimeUnit(/minute))+ $ ' ('+string(Carrington(utnow),format=fmt_rot)+')' ; Check when last email from Nagoya arrived mail = filepath(root=getenv('DAT'), subdir=['nagoya','daily'], 'logmail.ips') uday = TimeUnit(/day) ; Type of data (nv or bb) to be read InitVar, filter, vu_prefix(magnetic=magnetic,/silent) IF IsType(env_filter,/defined) THEN BEGIN setenv, env_filter+'='+filter add2label = filter ENDIF IF strpos(filter,'*') EQ -1 THEN filter = filter+'*.*' ; First find the time of the last tomography run preceding utnow by checking ; the files present in raw_dir. This time is needed (even if the final files ; are used to construct the images) for the construction of the skysweep ; maps and to update the html explanations. ; For the corotating tomography we could extract the times from the file names, ; but not for the time-dependent tomography. So we read the headers. ; The vu_select call sorts entries into chronological order. For time-dependent ; tomography all files for the same times (from different runs) are also sorted ; on marker value. trun = vu_select(path=raw_dir, filter=filter, count=cnt, marker=fast, $ rots=times, imark=imark, /forcecd) IF cnt EQ 0 THEN BEGIN message, /info, 'no raw files '+hide_env(filepath(root=raw_dir, filter)) RETURN ENDIF files = vu_get(trun, /file) ; File names trun = vu_get(trun, /forecast_time) ; Forecast times tmp = TimeGet(TimeOp(/subtract,trun,utnow),/diff,/full,uday) tmp = where(tmp le 0) ; Times preceeding forecast time utnow IF tmp[0] EQ -1 THEN BEGIN message, /info, 'runs beween '+TimeGet(trun[0],/ymd)+' and '+TimeGet(trun[cnt-1],/ymd) message, /info, 'no run before '+TimeGet(utnow,/ymd) RETURN ENDIF cnt = n_elements(tmp)-1 ; For corotating tomography 'cnt' refers to the last run before utnow. ; For time-dependent tomography 'cnt' points to the last time step of ; the last run before utnow. The entire time-dependent run is identified ; by the marker value 'mark' (and the same forecast time). utlast = trun[cnt] ; Time of last run IF IsType(imark, /defined) THEN imark = imark[cnt] message, /info, 'last run: '+ $ TimeGet(utlast, /ymd, upto=TimeUnit(/minute))+ $ ' ('+string(Carrington(utlast),format=fmt_rot)+')'+ $ ' ~'+strmid(files[cnt],strlen(nagoya)) ; Now go get the file(s) from dat_dir needed to construct all images. CASE daily OF 0: begin ; The final data are averages based on the raw tomography output ; calculated at regular time intervals. For the corotating tomography ; the files are currently (July 2002) created at 2-hour intervals. ; For the time-dependent tomography they exactly match the time steps ; output by the tomography itself: currently (July 2002) at 6-hour ; intervals. ; Get the times from the file names; don't read the headers yet. ; The array contains Carrington variables for a regular sequence ; of times at the whole hour. destroyvar, files times = vu_select(files, path=dat_dir, filter=filter, /nohdr, count=cnt, rounds=1800) IF cnt NE 0 AND magnetic THEN BEGIN times_nv = vu_select(files_nv, path=dat_dir, filter='nv3*', /nohdr, rounds=1800) tmp = where_common( TimeGet(TimeOp(/subtract,times ,times[0]),/diff,/full,uday), $ TimeGet(TimeOp(/subtract,times_nv,times[0]),/diff,/full,uday), inref=inref, count=cnt) IF cnt EQ 0 THEN BEGIN message, /info, 'no common plasma and magnetic data files' RETURN ENDIF times = times[tmp] files = files[tmp] files_nv = files_nv[inref] ENDIF ; Select all files within 15 days of utnow. We need these files ; to construct the insitu times series for the time-dependent tomography IF cnt NE 0 THEN BEGIN tmp = TimeGet(TimeOp(/subtract,times,utnow),/diff,/full,uday) tmp = where( -15 LE tmp AND tmp LE 15, cnt) ENDIF IF cnt EQ 0 THEN BEGIN message, /info, 'no final files within 15 days of '+TimeGet(utnow,/ymd) RETURN ENDIF times = times[tmp] files = files[tmp] IF magnetic THEN files_nv = files_nv[tmp] END 1: BEGIN ; If we are working from the raw data (/daily set) we already have the ; necessary information: we use the last tomography run. For corotating ; tomography only a single file is involved. tmp = where( TimeGet(TimeOp(/subtract,trun,utlast),/diff,/full,uday) EQ 0, cnt) ; Collect the last run times = times[tmp] ; File names and times for the last run files = files[tmp] IF magnetic THEN BEGIN files_nv = file_search( filepath(root=raw_dir, 'nv3*.*_'+string(format='(I5.5)',imark, count=cnt_nv) ) ) if cnt_nv ne cnt then message, 'now what ?????????' ENDIF END ENDCASE ;=========== ; KLUDGE: ; Offset the region of interest (shifting westward). ; This should reduce the amount of bad data in the shifted ROI somewhat. roi_offset = forecast_cfg(/roi_offset)*(1-fast) ; END KLUDGE ;=========== ; For corotating tomography find the two files that bracket utnow. ; Only read these two files (this is not strictly necessary; it just cuts ; down on the number of files to be read by vu_select). tmp = vu_gettime(times, ut=utnow, bracket=bracket) IF NOT fast THEN BEGIN times = times[bracket] files = files[bracket] IF magnetic THEN files_nv = files_nv[bracket] bracket = indgen(n_elements(bracket)) ENDIF hdr = vu_select(files, count=cnt, /read, /get_roi, ff=ff, roi_offset=roi_offset, silent=silent, /check, /forcecd) IF magnetic THEN BEGIN ; The following arrays are only used for the remote views for magnetic data ; (showing the plasma data with the current sheet embedded). ; The remote views require data at time utnow only. Extract the bracketed magnetic data ; from hdr and ff, and read the matching bracketed plasma data. ; Then interpolate to time utnow. hdr_bb = hdr[ bracket] ff_bb = ff [*,*,*,*,bracket] hdr_nv = vu_select(files_nv[bracket], /read, /get_roi, ff=ff_nv, roi_offset=roi_offset, silent=silent, /check, /forcecd) ; Note that keyword /nowrap is NOT included. tmp = ff_bb hdr_bb = vu_gettime(hdr_nv, tmp, ut=utnow, ff_ut=ff_bb) tmp = ff_nv hdr_nv = vu_gettime(hdr_nv, tmp, ut=utnow, ff_ut=ff_nv) ENDIF IF NOT fast THEN BEGIN ; For corotating tomography find the matrix at time utnow by interpolation. ; Note that keyword /nowrap is present. tmp = ff hdr = vu_gettime(hdr, tmp, ut=utnow, count=cnt, ff_ut=ff, /nowrap) ENDIF IF cnt EQ 0 THEN RETURN ; No data read ; Make the plots print print message, /info, 'Synoptic maps' print print type = vu_type_insitu('synoptic', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_synopticmap, hdr, ff, ut0=utnow, type=type, destination=destination, png=png, gif=gif, $ upto=upto, /earth, /forecast, nmajor=5, timeaxis=1-fast, silent=silent info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto print print message, /info, 'Solar disk maps' print print type = vu_type_insitu('earth_solardisk', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_solardisk, hdr, ff, ut0=utm4, type=type, destination=destination, png=png, gif=gif, $ upto=upto, silent=silent print info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto print print message, /info, 'Ecliptic cross section' print print type = vu_type_insitu('planarcut', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) body = [jpl_body(/earth,/string),jpl_body(/mars,/string)]+'&' vu_planarcut, hdr, ff, ut0=utnow, type=type, destination=destination, png=png, gif=gif, $ upto=upto, silent=silent, $ /from_centered_ecliptic, /heliocentric, body=body, radius=2 print info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto ; Time series at Earth in comparison with ACE data print print message, /info, 'Time series' print print tm_label = (['corotating','time-dependent'])[fast]+ $ (['',' ('+strupcase(strmid(filter,0,3))+'/NOAA)'])[magnetic] source = (['acesw','aceb'])[magnetic] type = vu_type_insitu('earth_insitu', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_insitu, hdr, ff, ut0=utnow, type=type[0], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ ts_range=trange, ts_step=tstep, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, tm_label=tm_label,$ silent=silent, digits=3*speed+3*brad vu_insitu, hdr, ff, ut0=utnow, type=type[1], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ ts_range=trange, ts_step=tstep, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, tm_label=tm_label,$ silent=silent, digits=3*density+3*btang print info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto ; Time series at planets ; To make sure these use the same input data as the ; Earth time series, keep this block of code here!) body = [ $ jpl_body(/mercury,/string), $ jpl_body(/venus ,/string), $ jpl_body(/mars ,/string), $ big_body('Ulysses' ), $ big_body('Stereo A' ), $ big_body('Stereo B' )] FOR nbody=0,n_elements(body)-1 DO BEGIN print print message, /info, 'Time series @ '+body[nbody] print print tm_label = (['corotating','time-dependent'])[fast] destroyvar, source ; vu_insitu decides on source string_id = strlowcase( body[nbody] )+'_insitu' type = vu_type_insitu(string_id, _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_insitu, hdr, ff, ut0=utnow, type=type[0], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ ts_range=trange, ts_step=tstep, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, tm_label=tm_label,$ silent=silent, digits=3*speed+3*brad, body=body[nbody] vu_insitu, hdr, ff, ut0=utnow, type=type[1], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ ts_range=trange, ts_step=tstep, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, tm_label=tm_label,$ silent=silent, digits=3*density+3*btang, body=body[nbody] info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto ENDFOR ; Skymaps and skysweeps are skipped for magnetic field data IF NOT magnetic THEN BEGIN print print print, 'Sky snapshots' print print type1 = vu_type_skymap('earth_skysnap', /ips_speed ) type2 = vu_type_skymap('earth_skysnap', /ips_glevel) vu_earthskymap, hdr, ff, ut0=utnow, type=type1, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=-1, silent=silent, /legend, /strictlabels, /compass vu_earthskymap, hdr, ff, ut0=utnow, type=type1, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=maxelo, /degrees, scale=scale, silent=silent, /legend, /strictlabels, /compass vu_earthskymap, hdr, ff, ut0=utnow, type=type2, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=-1, silent=silent, /legend, /strictlabels, /compass vu_earthskymap, hdr, ff, ut0=utnow, type=type2, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=maxelo, /degrees, scale=scale, silent=silent, /legend, /strictlabels, /compass print info = type1.display+'_'+kind+type1.label+type2.label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type1.display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto print print print, 'Sky sweeps' print print type1 = vu_type_skymap('earth_skysweep', /ips_speed) type2 = vu_type_skymap('earth_skysweep', /ips_glevel) vu_localskymap, hdr, ff, ut0=utlast, type=type1, destination=destination, png=png, gif=gif, upto=upto, $ utnoon=utnoon, silent=silent, /legend, /compass vu_localskymap, hdr, ff, ut0=utlast, type=type1, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=maxelo, /degrees, scale=scale, silent=silent, /legend, /compass vu_localskymap, hdr, ff, ut0=utlast, type=type2, destination=destination, png=png, gif=gif, upto=upto, $ silent=silent, /legend, /compass vu_localskymap, hdr, ff, ut0=utlast, type=type2, destination=destination, png=png, gif=gif, upto=upto, $ maxelo=maxelo, /degrees, scale=scale, silent=silent, /legend, /compass print ; Argument utnoon is output from vu_localskymap, ; so the forecast_info call must stay here info = type1.display+'_'+kind+type1.label+type2.label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, utnoon=utnoon, upto=upto info = type1.display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, utnoon=utnoon, upto=upto ENDIF ; For magnetic data the hcs is added to the density/velocity remote views. print print print, 'Remote view from behind Earth' print print type = vu_type_insitu('earth_remoteview',/speed, /density, _extra=_extra) CASE magnetic OF 0: BEGIN vu_remoteview, hdr, ff, ut0=utnow, type_ff=type[0], $ destination=destination, png=png, gif=gif, view_time=utnow, location=location, $ /ecliptic, ngrid=ngrid, /eqangle, fovsize=fovsize, volsize=volsize, $ full_color=color_v, full_range=range_v, full_opa=opa_v, $ charsize=type[0].charsize, upto=upto, silent=silent vu_remoteview, hdr, ff, ut0=utnow, type_ff=type[1], $ destination=destination, png=png, gif=gif, view_time=utnow, location=location, $ /ecliptic, ngrid=ngrid, /eqangle, fovsize=fovsize, volsize=volsize, $ full_color=color_n, full_range=range_n, full_opa=opa_n, $ charsize=type[1].charsize, upto=upto, silent=silent print info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto print print print, 'Remote view from ecliptic north' print print ; The '&' symbol adds orbits. body = [jpl_body(/mercury,/string), $ jpl_body(/venus ,/string), $ jpl_body(/mars ,/string), $ big_body('Ulysses')]+'&' ; add stereo, but not the orbits. body = [body, big_body('Stereo A'), big_body('Stereo B')] vu_remoteview, hdr, ff, ut0=utnow, type_ff=type[1], $ destination=destination[0], png=png, gif=gif, view_time=utnow, location=[BadValue(1.0d0),!dpi/2,3.0d0], $ /ecliptic, ngrid=ngrid, /eqangle, fovsize=fovsize, volsize=volsize, $ full_color=color_n, full_range=range_n, full_opa=opa_n, $ voxel=-2, body=body, xysize=275, module='polar_splash';, thick=2 ;, silent=silent END 1: BEGIN type_bb = vu_type_insitu('earth_remoteview', /brad, add2label=add2label, _extra=_extra) vu_remoteview, hdr_nv, ff_nv, ut0=utnow, type_ff=type[0], $ destination=destination, png=png, gif=gif, view_time=utnow, location=location, /ecliptic, $ ngrid=ngrid, /eqangle, fovsize=fovsize, volsize=volsize, $ full_color=color_v, full_range=range_v, full_opa=opa_v, $ charsize=type[0].charsize, /meshhcs, hdr_bb=hdr_bb, bb=ff_bb, $ type_bb=type_bb, upto=upto, silent=silent type_bb = vu_type_insitu('earth_remoteview', /btang, add2label=add2label, _extra=_extra) vu_remoteview, hdr_nv, ff_nv, ut0=utnow, type_ff=type[1], $ destination=destination, png=png, gif=gif, view_time=utnow, location=location, /ecliptic, $ ngrid=ngrid, /eqangle, fovsize=fovsize, volsize=volsize, $ full_color=color_n, full_range=range_n, full_opa=opa_n, $ charsize=type[1].charsize, /meshhcs, hdr_bb=hdr_bb, bb=ff_bb, $ type_bb=type_bb, upto=upto, silent=silent type = vu_type_insitu('earth_remoteview',/brad, /btang, add2label=add2label) info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto END ENDCASE ; One day forecast at Earth; need to read new data, so destroy hdr and ff destroyvar, hdr, ff print print print, 'One-day forecast correlation' print print type = vu_type_insitu('cast_correlation', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) source = (['acesw','aceb'])[magnetic] vu_insitu_raw, hdr, ff, ut0=utnow, type=type[0], $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, $ silent=silent, cast_offset=1d0, ntrail=30, $ path=raw_dir, filter=filter, /forcecd print print vu_insitu_raw, hdr, ff, ut0=utnow, type=type[1], $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, $ silent=silent, cast_offset=1d0, ntrail=30, $ path=raw_dir, filter=filter, /forcecd ; Five-day aftcast at Earth; need to read new data ; For the corotating tomography fore- and aftcast are based on the same ; files so read new data only for time-dependent tomography. print print print, 'Five-day aftcast correlation' print print IF fast THEN destroyvar, hdr, ff type = vu_type_insitu('cast_correlation', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang ) vu_insitu_raw, hdr, ff, ut0=utnow, type=type[0], $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, $ silent=silent, cast_offset=-5d0, ntrail=30, $ path=raw_dir, filter=filter, /forcecd print print vu_insitu_raw, hdr, ff, ut0=utnow, type=type[1], $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, $ silent=silent, cast_offset=-5d0, ntrail=30, $ path=raw_dir, filter=filter, /forcecd print info = type[0].display+'_'+kind+type[0].label+'_c'+type[1].label+'_c' forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto ; Plot comparison of raw timeseries and spacecraft data. ; We need to read raw data files, so destroy hdr and ff destroyvar, hdr, ff print print print, 'Raw vs. insitu correlation' print print type = vu_type_insitu('raw_correlation', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_insitu_raw, hdr, ff, ut0=utnow, type=type[0], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, $ silent=silent, /last_raw, path=raw_dir, filter=filter, /forcecd print print vu_insitu_raw, hdr, ff, ut0=utnow, type=type[1], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /correlation, delt=delt, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, $ silent=silent, /last_raw, path=raw_dir, filter=filter, /forcecd print print print, 'Raw vs insitu time series' print print type = vu_type_insitu('raw_timeseries', _extra=_extra, add2label=add2label, $ speed=speed, density=density, brad=brad, btang=btang) vu_insitu_raw, hdr, ff, ut0=utnow, type=type[0], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ chars=type[0].charsize, thick=type[0].thick, upto=upto, $ silent=silent, /last_raw, path=raw_dir, filter=filter, /forcecd print print vu_insitu_raw, hdr, ff, ut0=utnow, type=type[1], /forecast, $ destination=destination, png=png, gif=gif, source=source, /nofuture, /timeseries, delt=delt, $ chars=type[1].charsize, thick=type[1].thick, upto=upto, $ silent=silent, /last_raw, path=raw_dir, filter=filter, /forcecd info = type[0].display+'_'+kind+type[0].label+type[1].label forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto info = type[0].display+'_'+kind forecast_info, kind, img_dir, info, filter=filter, utnow=utnow, time=utlast, upto=upto ; Copy images (png or gif) and html files to html directory ; Ftp to cassfos02 is requested (/ftp set) img_type = '*.'+(['png','gif'])[0*png+1*gif] spawn, 'cp '+filepath(root=img_dir,'*.*')+' '+htm_dir IF ftp THEN forecast_ftp, kind, filepath(root=img_dir,img_type), $ filepath(root=img_dir,'*.html'), silent=silent RETURN & END