(file) Return to add_hmi_LOS_1.5 CVS log (file) (dir) Up to [Development] / JSOC / proj / workflow / add_scripts

File: [Development] / JSOC / proj / workflow / add_scripts / add_hmi_LOS_1.5 (download)
Revision: 1.9, Thu Feb 24 04:31:13 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
Changes since 1.8: +1 -1 lines
misc, and new gatekeeper.restart

#! /bin/csh -f
#
# these lines for all products
if ($?WORKFLOW_ROOT) then
  set WFDIR = $WORKFLOW_DATA
  set WFCODE = $WORKFLOW_ROOT
else
  echo Need WORKFLOW_ROOT variable to be set.
  exit 1
endif

cd $WFDIR
rm -f Keep_running
while (-e GATEKEEPERBUSY)
  echo waiting for gatekeeper to quit.
  sleep 5
  end

# begin section for this product

# make test gates and tasks for HMI line-of-sight observables
# This includes the several input series.

# remove prior versions

cd $WFDIR/gates
rm -rf hmi.LOS hmi.lev1_wait_FSN hmi.temps hmi.cosmic_rays hmi.V_drift_coefs

cd $WFDIR/tasks
rm -rf update_hmi.LOS wait_hmi.lev1_FSN wait_hmi.temps wait_hmi.cosmic_rays wait_hmi.V_drift_coefs

# Make tasks and set preconditions

# NOTE the "command" script used below must be available and executable when this script is run
cd $WFDIR
$WFCODE/maketask.csh task=update_hmi.LOS manager=taskmanager.csh target=hmi.LOS \
		command=scripts/update_hmi.LOS_1.5 maxrange=1440 parallelOK=5

set PRECOND = $WFDIR/tasks/update_hmi.LOS/preconditions

mkdir $PRECOND/hmi.cosmic_rays
cat > $PRECOND/hmi.cosmic_rays/prepare_ticket <<STOP
    set ACTION = 4
    set TMPLOW_t = \`time_convert time=\$USELOW\`
    @   TMPLOW_t = \$TMPLOW_t - 180
    set USELOW = \`time_convert zone=TAI s=\$TMPLOW_t\`
    set TMPHIGH_t = \`time_convert time=\$USEHIGH\`
    @   TMPHIGH_t = \$TMPHIGH_t + 180
    set USEHIGH = \`time_convert zone=TAI s=\$TMPHIGH_t\`
STOP

mkdir $PRECOND/hmi.V_drift_coefs
cat > $PRECOND/hmi.V_drift_coefs/prepare_ticket <<STOP
    # skip precondition for times before nrt data exists
    set PREPARE_TMP1 = \`time_convert time=$WANTLOW\`
    set PREPARE_TMP3 = \`time_convert time=2010.06.12_12\`
    if (\$PREPARE_TMP1 < \$PREPARE_TMP3) then
      set ACTION=1
    else
      set ACTION = 5
      set TMPLOW_t = \`time_convert time=\$USELOW\`
      @   TMPLOW_t = \$TMPLOW_t - 86400
      set USELOW = \`time_convert zone=TAI s=\$TMPLOW_t\`
      set TMPHIGH_t = \`time_convert time=\$USEHIGH\`
      @   TMPHIGH_t = \$TMPHIGH_t + 181
      set USEHIGH = \`time_convert zone=TAI s=\$TMPHIGH_t\`
    endif
STOP

mkdir $PRECOND/hmi.temps
cat > $PRECOND/hmi.temps/prepare_ticket <<STOP
    set ACTION = 3
    set TMPLOW_t = \`time_convert time=\$USELOW\`
    @   TMPLOW_t = \$TMPLOW_t - 480
    set USELOW = \`time_convert zone=TAI s=\$TMPLOW_t\`
    set TMPHIGH_t = \`time_convert time=\$USEHIGH\`
    @   TMPHIGH_t = \$TMPHIGH_t + 180
    set USEHIGH = \`time_convert zone=TAI s=\$TMPHIGH_t\`
STOP

# Prerequisite tasks

$WFCODE/maketask.csh task=wait_hmi.lev1_FSN manager=taskmanager.csh target=hmi.lev1_wait_FSN \
		command=scripts/wait_hmi.lev1_FSN.csh maxrange=86400 parallelOK=1

$WFCODE/maketask.csh task=wait_hmi.temps manager=taskmanager.csh target=hmi.temps \
		command=scripts/nop_task.csh maxrange=86400 parallelOK=1

$WFCODE/maketask.csh task=wait_hmi.cosmic_rays manager=taskmanager.csh target=hmi.cosmic_rays \
		command=scripts/update_hmi_cosmic_rays.csh maxrange=7200 parallelOK=1

$WFCODE/maketask.csh task=wait_hmi.V_drift_coefs manager=taskmanager.csh target=hmi.V_drift_coefs \
		command=scripts/update_hmi.V_drift.csh maxrange=864000 parallelOK=1
set PRECOND = $WFDIR/tasks/wait_hmi.V_drift_coefs/preconditions
mkdir $PRECOND/hmi.LOSnrt
cat >$PRECOND/hmi.LOSnrt/prepare_ticket <<STOP
    # skip precondition for times before nrt data exists
    set PREPARE_TMP1 = \`time_convert time=$WANTLOW\`
    set PREPARE_TMP2 = \`cat \$GATEDIR/low\`
    set PREPARE_TMP3 = \`time_convert time=\$PREPARE_TMP2\`
    if (\$PREPARE_TMP1 < \$PREPARE_TMP3) then
      set ACTION=1
    else
      set ACTION=3
    endif
STOP

# Now make any user gates.

# NOTE hmi.M_45s is made at the same time as V, Ic, Ld, and Lw so only
# one product needs to be tracked here.

cd $WFDIR
$WFCODE/makegate.csh gate_name=hmi.LOS product=hmi.M_45s type=time key=T_REC project=HMI \
		 actiontask=update_hmi.LOS statustask=scripts/status-general.csh

# Prerequisite gates

$WFCODE/makegate.csh gate_name=hmi.lev1_wait_FSN product=hmi.lev1 type=time key=T_OBS project=HMI \
		 actiontask=wait_hmi.lev1_FSN statustask=scripts/status_hmi_camera2.csh coverage_args=NEVER

$WFCODE/makegate.csh gate_name=hmi.temps product=hmi.temperature_summary_300s type=time key=T_START project=HMI \
		 actiontask=wait_hmi.temps statustask=scripts/status-general.csh

$WFCODE/makegate.csh gate_name=hmi.cosmic_rays product=hmi.cosmic_rays type=time key=T_OBS project=HMI \
		 coverage_args=NEVER actiontask=wait_hmi.cosmic_rays statustask=scripts/status-general.csh

$WFCODE/makegate.csh gate_name=hmi.V_drift_coefs product=hmi.coefficients type=time key=T_REC project=HMI \
		 actiontask=wait_hmi.V_drift_coefs statustask=scripts/status-general.csh \
                 low=2010.09.16_TAI high=NaN coverage_args=NEVER


# initialize the gates
$WFCODE/maketicket.csh gate=hmi.LOS wantlow=NaN wanthigh=NaN action=6
$WFCODE/maketicket.csh gate=hmi.lev1_wait_FSN wantlow=NaN wanthigh=NaN action=6
$WFCODE/maketicket.csh gate=hmi.temps wantlow=NaN wanthigh=NaN action=6
$WFCODE/maketicket.csh gate=hmi.cosmic_rays wantlow=NaN wanthigh=NaN action=6
# maketicket.csh gate=hmi.V_drift_coefs wantlow=NaN wanthigh=NaN action=6 NEVER DO THIS, NOT SLOTTED


Karen Tian
Powered by
ViewCVS 0.9.4