#
set year = '2012'
set yy = '12'

# new site at rio grande: riog (old) = rio2
# new site at fortaleza:  fort (old) = brft
# new site at Parana:     para (old) = ufpr

# IGS sites we usually get at SCRIPPS
#set sites = 'areq braz brft kour lpgs sant rio2 ispa glps cord copo conz lhcl tucu ufpr chpi cfag ----'
# Brasilian RBMC sites we usually get at IBGE
#set sites = 'cruz cuib maba mscg naus poal pove savo topl'
# Argentina RAMSAC sites we usually get at IGM
#set sites = 'alum azul cata esqu meco mzac mzae mzas pdes rwsn srlp tero ucor unro unsj vbca ----'
# Chilean sites we usually get at DGF
#set sites = 'maul sjav cons rcsd dgf1 vnev valn robl port lvil slmc cnba cmba emat pedr pfrj ovll bton tolo junt lsch sill crzl vall'

#set sites = 'antc areq braz brft kour lpgs sant rio2 ispa glps copo conz lhcl tucu ufpr chpi cfag unsa ---- alum azul cata esqu meco ma01 mzac mzae mzas rwsn srlp sl01 tero tuc1 ucor unro unsj vbca ---- cuib maba mscg naus poal pove savo topl mtco salu batf ceeu ---- maul sjav cons rcsd dgf1 vnev valn robl port lvil slmc cnba cmba emat pedr pfrj ovll bton tolo junt lsch sill crzl vall'

set sites = 'cerz jlp0 antf urib mabl baqu grdo lobo mej0 smrd cha0 gua0  ban0 topi to10 tosn to24 clpl to35 to4g to50 to60 to70 ar10 ar20 ar30 ar40 ar50 ar60 ar70 ar80 ar90 ca10 ca20 co10 co20 co40 co50 co60 iqa0 iqb0 iqc0 iqd0 iqe0 iqf0 iqg0 iqh0 iqi0 idj0 iqk0 iql0 iqm0 iqn0 iqo0 iqp0 iqq0 pati pa20 pa30 pa40 pa50 pa60 pa70 pi30 pi40 pi50 pi60 pi70 pi80 guat cama come ofla paco pica zahu '

echo  " "  >! check_import.dat
echo  "            GPS campaign 2012 : 95-105 "  >> check_import.dat
echo  " "  >> check_import.dat
echo  " ------------------------------------------------------"  >> check_import.dat
echo  " |      | 095 096 097 098 099 100 101 102 103 104 105 |"  >> check_import.dat
echo  " ------------------------------------------------------"  >> check_import.dat

foreach site ($sites)

if ($site == "----" ) then
  echo -n " |-------" >> check_import.dat
else
  echo -n " | $site |" >> check_import.dat
endif

@ day = 94

start:

  @ day = $day + 1


    set file = "$site""$day"'0.'"$yy"'o.Z'
    if ($day < '100' ) set file = "$site"'0'"$day"'0.'"$yy"'o.Z' 
    if ($day < '10' ) set file =  "$site"'00'"$day"'0.'"$yy"'o.Z'

    if (-e ../rinex/$file) then
      set poid = `ls -l $file | awk '{print $5}'`
       if ($poid > '600000') then
      echo -n '  X ' >> check_import.dat
       else
       if ($poid < '300000') then
      echo -n '  o ' >> check_import.dat
       else
      echo -n '  x ' >> check_import.dat
      endif
      endif
    else
      if ($site == "----" ) then
         echo -n '----' >> check_import.dat
      else
         echo -n '  - ' >> check_import.dat
      endif
    endif



  if ($day < '105' ) goto start

end:

if ($site == "----" ) then
  echo "-|"  >> check_import.dat
else
  echo " |"  >> check_import.dat
endif

end
echo  " ------------------------------------------------------"  >> check_import.dat


a2ps -1 -f9.0 -o check_import.ps check_import.dat
cat check_import.dat
