#!/bin/bash # # Start with CR3 = the MJD, and S3R=-1. # After a completed run SR3 will be ise. # $ips_dir : directory where tomography program is run # (i.e. this is where the ea*.*, t3d*.* files end up) # $ea_dir : directory where ea*.* files are collected # $nagoya_dir : directory where yearly ips data files are located ipsd_dir=$temp ea_dir=$temp/new_ipsn360 nagoya_dir=/home/sunspot/dat/nagoya/yearly # Safety belt: clean out directory where ea*.* files are collected rm $ea_dir/ea_*.* # The tomography can be run anywhere, except the directory where the # ea*.* files are collected. We run it in $ipsd_dir. cd $ipsd_dir # Safety belt: the $ipsd_dir directory can't contain any ea*.* files # (the move command for the ea*.* file below would fail) rm ea_*.* rm *.say # The main loop: let ise=30 while [ "$isv" != "$ise" ] do $myfor/ipsn360forecastin # Pick up the modified values of isv isv=$(cat ~/LOGFIL.TXT | grep "SYM=S3R=" | cut -c 9,10) echo Now at: ISV=$isv # Make a file name for the screen output of ipsdn360 based on the # current values of isv. screen_output0="$ea_dir/ipsn360forecast"$isv".say" # ipsdn360 writes screen output to the 'screen_output0' file. # It also creates an ea file for Earth in the $ipsdir directory. # This will be moved (and renamed) to $ea_dir echo Now at: ISV=$isv > $screen_output0 $myfor/ipsdn360n nagoya=nagoya,$nagoya_dir < $temp/ipsn360f.input >> $screen_output0 # ipsdn360 creates one output file: an ea* file. # Rename both to make room for the next run of ipsdn360. ea_file="$ea_dir/ea_MJD."$isv"" rm t3*.* mv ea*.* $ea_file done # Runs an IDL program to analyze EA files # The IDL main program looks for ea*.* files in current directory export ea_dir screen_output1="$ea_dir/comparen360forecast.say" dt_offset="-5.0" instrument="wind" export dt_offset instrument idl -demo $mypro/run_forecast_insitu.pro > $screen_output1 dt_offset="1.0" instrument="wind" export dt_offset instrument idl -demo $mypro/run_forecast_insitu.pro >> $screen_output1 dt_offset="-5.0" instrument="acesw" export dt_offset instrument idl -demo $mypro/run_forecast_insitu.pro > $screen_output1 dt_offset="1.0" instrument="acesw" export dt_offset instrument idl -demo $mypro/run_forecast_insitu.pro >> $screen_output1 exit