(file) Return to CheckLev1.csh CVS log (file) (dir) Up to [Development] / JSOC / proj / workflow

File: [Development] / JSOC / proj / workflow / CheckLev1.csh (download) / (as text)
Revision: 1.1, Sun Jan 2 22:14:11 2011 UTC (11 years, 11 months ago) by phil
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-4, Ver_8-3, Ver_8-2, Ver_8-12, Ver_8-11, Ver_8-10, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2, Ver_6-1, Ver_6-0, Ver_5-14, Ver_5-13, HEAD
Initial commit, copied from ~phil/workflow

#! /bin/csh -f

set DAY = $1

# get 0 TAI time for given day
set DAY_t = `time_convert time=$DAY`
@ DAY_t = $DAY_t / 86400
@ DAY_t = $DAY_t * 86400

# get offset start time of e.g. 3m30s = 210 secs TAI
@ GO_t = $DAY_t - 210
set GO = `time_convert s=$GO_t zone=TAI`

# get starting FSN assuming the begin of day is complete
set FFSN = `show_info key=FSN -q hmi.lev1'['$GO'/2s]'`

# get count in day by both time and FSN
set COUNT_FSN = `show_info -cq hmi.lev1'[]['$FFSN'/46080]'`
set COUNT_TIME = `show_info -cq hmi.lev1'['$GO'/1d]'`

# report results and return OK or not OK
echo -n "Day = $1, "
echo -n "Count by FSN = "$COUNT_FSN","
echo "Count by Time= " $COUNT_TIME

if ($COUNT_FSN == 46080 && $COUNT_TIME == 46080) then
  echo "OK to proceed with $1"
  exit 0
else
  echo "STOP, need to fix something for $1"
  exit 1
endif

Karen Tian
Powered by
ViewCVS 0.9.4