-
Notifications
You must be signed in to change notification settings - Fork 0
/
G8_calc.csh
executable file
·72 lines (42 loc) · 3.62 KB
/
G8_calc.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/tcsh -f
set SPACE_Wdir=/data/mta4/space_weather
set WEBdir=/data/mta4/www
#set today=`date '+%y%m%d'`
# 01/14/02 BDS -SEC data problems, changed to ftp2.sec.noaa.gov
# old links marked with #sec
#sec #set file = gopher://solar.sec.noaa.gov:70/00/lists/particle/G8part_5m
set file = gopher://ftp2.sec.noaa.gov:70/00/lists/particle/G8part_5m
/opt/local/bin/lynx -source $file >! $SPACE_Wdir/G8returned1
#debug /opt/local/bin/lynx -source $file
tail -25 $SPACE_Wdir/G8returned1 | head -24 >! $SPACE_Wdir/G8returned
#run nawkscript to calculate averages and mins
nawk -F" " -f $SPACE_Wdir/G8_process.nawk $SPACE_Wdir/G8returned >! $SPACE_Wdir/G8data
#go collect the image
#sec #/opt/local/bin/lynx -source http://solar.sec.noaa.gov/rt_plots/satenvBL.html | tail -14 | head -1 >! $SPACE_Wdir/G8tmp
/opt/local/bin/lynx -source http://ftp2.sec.noaa.gov/rt_plots/satenvBL.html | tail -14 | head -1 >! $SPACE_Wdir/G8tmp
#remove the junk
sed s/'<center><img src="'/''/1 $SPACE_Wdir/G8tmp | sed s/'"><'/' '/1 | sed s/'\/center>'/' '/1 >! $SPACE_Wdir/G8imagename
#create the line for the link
set image_var=`cat $SPACE_Wdir/G8imagename`
#####################################################################
#go collect the second image image
#sec #/opt/local/bin/lynx -source http://solar.sec.noaa.gov/rt_plots/pro_3d.html | tail -11 | head -1 >! $SPACE_Wdir/G8tmp2
/opt/local/bin/lynx -source http://ftp2.sec.noaa.gov/rt_plots/pro_3d.html | tail -11 | head -1 >! $SPACE_Wdir/G8tmp2
#remove the junk
sed s/'<center><img src="'/''/1 $SPACE_Wdir/G8tmp2 | sed s/'"><'/' '/1 | sed s/'\/center>'/' '/1 >! $SPACE_Wdir/G8imagename2
#create the line for the link
set image_var2=`cat $SPACE_Wdir/G8imagename2`
#####################################################################
#sec #echo '<HR><CENTER><IMG SRC="http://solar.sec.noaa.gov'$image_var'"></CENTER>' >! $SPACE_Wdir/G8image
echo '<HR><CENTER><IMG SRC="http://ftp2.sec.noaa.gov'$image_var'"></CENTER>' >! $SPACE_Wdir/G8image
#sec #echo '<HR><CENTER><IMG SRC="http://solar.sec.noaa.gov'$image_var2'"></CENTER>' >! $SPACE_Wdir/G8image2
echo '<HR><CENTER><IMG SRC="http://ftp2.sec.noaa.gov'$image_var2'"></CENTER>' >! $SPACE_Wdir/G8image2
#####################################################################
# place Rob's image into the mix:
echo '<hr><ul><li> P1 = Protons from 0.8 - 4 MeV units #/cm2-s-sr-MeV (Blue) <li> P2 = Protons from 4 - 9 MeV units #/cm2-s-sr-MeV (Green) <li> P5 = Protons from 40 - 80 MeV units #/cm2-s-sr-MeV (Cyan)</ul>' >> $SPACE_Wdir/G8image2
echo '<br> The P2 and P5 channels can be approximately scaled to the EPHIN P4GM and P41GM rates. <br>We plot the scaled RADMON limits for P4GM and P41GM on the plot.' >> $SPACE_Wdir/G8image2
echo '<CENTER><IMG SRC="./RADIATION/pgplot.gif"></CENTER>' >> $SPACE_Wdir/G8image2
#sec #echo '<ul><li> <a href="ftp://ftp.sec.noaa.gov/pub/lists/pchan/G8pchan_5m.txt">GOES-8 five minute average data.</a><li> <a href="ftp://ftp.sec.noaa.gov/pub/lists/pchan/G8pchan_5m.txt">GOES-10 five minute average data.</a>' >> $SPACE_Wdir/G8image2
echo '<ul><li> <a href="ftp://ftp2.sec.noaa.gov/pub/lists/pchan/G8pchan_5m.txt">GOES-8 five minute average data.</a><li> <a href="ftp://ftp2.sec.noaa.gov/pub/lists/pchan/G10pchan_5m.txt">GOES-10 five minute average data.</a><li> <a href="ftp://ftp2.sec.noaa.gov/pub/lists/pchan/G11pchan_5m.txt">GOES-11 five minute average data.</a><li> <a href="ftp://ftp2.sec.noaa.gov/pub/lists/pchan/G12pchan_5m.txt">GOES-12 five minute average data.</a>' >> $SPACE_Wdir/G8image2
cat $SPACE_Wdir/G8header $SPACE_Wdir/G8data $SPACE_Wdir/G8image $SPACE_Wdir/G8image2 $SPACE_Wdir/G8footer >! $WEBdir/G8.html
endif