**TIDE data processing and data file maintenance (revised 05/15/07):**

**Every day:**

**Check to make sure the crontabs at GSFC and MSFC ran correctly:** This
can usually be done by checking email sent to you and by checking the
summary plots (see below). The current crontabs for each machine are
listed at the end of this writeup.

**Check nrt data:** Check the NRT output collected from the DSN batch
runs. See doc.nrt in /export/data/tide/nrt for details about the NRT
data.

**Check summary plots:** Each morning check the quality of the summary
plots run the night before. Start at
http://satyr.msfc.nasa.gov/tide_plots/. View all new plots. If there are
no new plots then either no new data was processed at GSFC or one of the
processing jobs did not run correctly. The jobs will then have to be run
manually. See the list of crontabs below to see what jobs need to be run
manually. If none of the processing was done, use run_prod in
/export/data2/tide/db/exe (\$prod) to run any or all of the processing.
First, edit mas.dates and add the date(s) that need to be (re)processed
then edit run_prod to comment out (# in column 1) any processing that
does not need to be done. run_prod can be used to manually run any (all)
of the summary plots and the h1 cdf file processing.

Because of loss of a data recorder there can be missing telemetry data.
To get accurate times of the missing data, on griffin (sloan account),
cd /export/data/tide/hk, cat the latest two tyymmdd0000_2400.hk files
into tmp (just edit and run cathk), and run 'missing' with tmp. Edit
missing.telemetry to see any new missing time periods and delete any
duplicate times. Copy the file to the web using cp_files. If the data
gaps are large, the half-orbit and perigee summary plots may need to be
created manually. From the tide account in \$prod, edit htr.times and
put in the start and stop times for each new plot. Then run run_eshtr.
The plots will be in \$tplots. Get a list of the gif and ps files (ls
\*gif \> g1 and ls \*ps \> p1). Get into idl, use .run view_multi_gif
with g1 to view the new plots, use .run pdf_make with p1 to create the
pdf files, and use .run jpg_make with g1 to create the jpeg files. Copy
the files to the temporary plot archive using cp_half or cp_per. Delete
any of the bad plots from the temporary archive (cd
/net/satyr/export2/data/tide_plots/htr_spectrograms). Whenever new plots
are created and/or bad plots are deleted, the new plots need to be
copied to goewin. In \$prod run 'ftp_gsfc_plots.pl --limit=1' and then
on goewin run /projects/tide/prod/ftp_tide_plot_files.pl. Delete any bad
plots from the temporary site on goewin
(/archive/data/tide_plots/htr_spectrogram). Then update the gifwalk on
both web/satyr
(/home/web/httpd_1.5.2/cgi-bin/TIDE/summary_plots-dir/get_sp_for_walk.pl)
and goewin (/space/cgi-bin/tide/summary_plots-dir/get_sp_for_walk.pl).

If the missing data is a the end of the previous day, the po_tid_h1 will
not be created from the crontab because it needs access to the last 192
seconds of that day. The po_tid_h1_yyyymmdd_v0n.cdf will have to be run
manually created using run_prod. Edit either mas.dates or mas1 and enter
the date to be processed. Then edit run_prod and comment out all
processing (# in column 1) except the appropriate ksh_htr_dl_short line
and then run run_prod.

If the missing telemetry coincides with a background mask, then the mask
must be deleted from /datafiles/mask on griffin and /archive/data/mask
on goewin (note: the mask may not be found on goewin). The
mask_run_times.txt file in \$prod needs to be edited and the time for
the bad mask removed. Once mask_run_times.txt has been edited, any
half-orbit and perigee summary plots and po_tid_h1 files created using
it must be redone. Use run_prod and/or run_eshtr to create the plots.
From time to time run cp_mask_file to copy the mask_run_times.txt to a
backup site on the web.

**Once a week:**

**Create new RQLs:** On Tuesday morning or when requested by Paul Craven
or Bob Gardiner at GSFC, create the next set of TIDE RQLs. Usually you
will create 7 new daily files but occasionally you will be asked to
create more. Detailed instructions on creating RQLs are on griffin in
/export/data/tide/command/doc in a file called create_rqls.doc

**Set up new nrt batch jobs:** Use the latest deep space network (dsn)
schedule to set up the batch jobs. The dsn schedules are downloaded from
pwgdata.gsfc.nasa.gov every day via the crontab that downloads the
level-zero data. These files are put in /export/data/tide/dsn.
forecast.txt contains next weeks schedule. The time for the start of
each pass is in the BOT column, the first column is day-of-year. Edit
at_nrt_dsn, delete the times from last week and add the times for next
week. The time for the batch job should be about 5-10 minutes before the
start of the dsn pass and it has to be local time. The times in
forcast.txt are universal so they have to be adjusted (subtract) by 5
hours during daylight savings time and 6 hours for standard time. To
submit the batch jobs simply run at_nrt_dsn. Sometimes the batch jobs do
not run correctly, so occasionally check to see if any jobs are still
running (ps -adfe) and kill them. To check to see the times for
scheduled batch jobs use \'at -l\' or on the sloan account 'jobs'. Use
del_at_nrt to delete scheduled batch jobs.

**Verify po_tid_h1 CDF files and send them to the NSSDC:** On Friday,
verify that the po_h1_tid_yyyymmdd_v01.cdf files for the week are
correct and send them to the National Space Science Data Center (NSSDC)
at gsfc. The new files are stored in /export/data1/TIDE/istp/h0
(\$kpvt/h0). From /export/data/tide/exlib/new, get a list of the new
files (ls \$kpvt/h0/po\*cdf \> l1), get into IDL, and .run
read_tid_h1_cdf using l1. If any of the printed information looks bad
(i.e. a lot of asterisks) then delete the bad file. Then cd
/export/data1/TIDE/istp/h0 (\$kpvt/h0), ftp rumba.gsfc.nasa.gov and
login into the tidegst account, the password is in
/export/data/tide/file_info/acct_info. Set binary and prompt and mput
po\*. Use dir to verify that all files are on the ftp site. The files
must be sent from sloan on griffin. User contacts at the NSSDC are Tami
Kovalick (<kovalick@mail630.gsfc.nasa.gov>, 301-286-9422) and Rita
Johnson (johnson@rumba.gsfc.nasa.gov).

**Once a month:**

**Once a month when a new 70-day orbit file arrives, update the orbit
pdf files:** The 70-day predicted orbit file
(po_wo_pre_yyyymmdd_v0n.dat) is automatically downloaded via a crontab.
The new file usually comes down on the third Thursday of the month and
contains orbits for 70 days starting with the date of the third
Wednesday of the month. The file is stored in /datafiles/orbit/pre. From
the tidops account on griffin: cd /export/data/tide/command
(\$tide/command), copy the new working orbit file to this correctory (cp
/datafiles/orbit/pre/po_wo_pre_yyyymmdd\* .), delete the old working
orbit file, delete the old or_yyyy_doy.pdf files, from IDL, run
\@plot_gsml. You will be asked the date/version of the orbit file,
whether to plot the entire file (always answer --1), the l-shell to plot
(always 7), and the 4 radiation belt l-shell cutoffs. Unless otherwise
instructed by Paul Craven or Mike Chandler, these values are the last
values listed in the lshell.cutoffs file in \$tide/command. Note: it
takes a long time (\~60 minutes) to create the 70 new orbit files.

Also, make sure orbit plot option on custom plot page a both NSSTC and
GSFC is using the new daily and 70-day file. Create a orbit plot for one
of the new daily orbit files that came down with the 70-day orbit file
and for a day that is in the 70-day orbit file but there is no daily
orbit file for.

**Create housekeeping trend plots:** See
/export/data/tide/doc/hk_trend_plots.doc.

**Check mask files:** In /export/data/tide/masks, get a list of the most
recent mask files(ls /datafiles/mask/tyymm\* \> list), then get into idl
and run \@many_masks using list as the input file and w as the output
type to view all the new plots. Now create a gif image of the mid-month
mask and put it on the web. Edit list and delete all but the mask
closest to the middle of the month. From idl, run \@many_masks again
using wg as the output type. Copy the gif file to the web using
cp_mask_plot.

**Copy mask_run_times.txt file to web:** Use \$prod/cp_mask_file.

/space/www1/tide **archive:** On griffin from the tide account in
/export/data2/tide/db/exe (\$prod), run copy_h1_cdfs_to_archive. On
goewin, cd /archive/tid_cdf/h1_tid/yyyy, ftp cdaweb.gsfc.nasa.gov, log
in as anonymous, cd pub/istp/polar/tide_h1/yyyy, type \'binary\',
\'prompt\', and \'mget po_h1_tid_yyyymm\*\' to get the latest h1 files,
then \'quit\'.

**Change passwords:** Passwords need to be changed every 30 days. It
needs to be done for the sloan, tide, tidops, and exlib accounts on
griffin and the tideteam and web accounts on satyr.

**web miscellaneous:**

The html files are in /home/web/htdocs/TIDE on satyr and
/space/www1/tide on goewin. The CGI Perl scripts are in
/home/web/httpd_1.5.2/cgi-bin/TIDE on satyr and /space/cgi-bin/tide on
satyr.

Whenever there is any real-time TIDE commanding or something significant
changes in the instrument operations or data processing, the operations
log on the web needs to be modified from the web account on satyr. The
current html is in /home/web/htdocs/TIDE and is called
tide_ops_yyyy.html. Edit it, add a new table row that includes the date
and time of the activity and a brief description and change the last
updated date.

The e-mail announcement for TIDE telecons sent from Tom Moore includes a
list of current publications. If there are any new publications, they
need to be added to the web. Edit
/home/web/htdocs/TIDE/publications.html on satyr and
/space/www1/tide/publications.html on goewin.

An operations/software update html file needs to be created for each
TIDE telecon. These are on the tideteam account on satyr in
TIDE_software/yyyy directory. Just copy the previous file and edited it
to reflect any new information. tideteam is the account where any
information that needs to be shared is kept. To add new information,
first put it on the [ftp.nsstc.org](ftp://ftp.nsstc.org/) site, then log
in to tideteam, create an appropriately named directory, and the ftp the
information to the directory.

**Updating the TIDE processing software:**

**Archive information:**

lz vs l0 files:

backing up plots an CD

**crontabs:**

**tide/griffin crontab (as of 05/15/07):**

\# This crontab file executes scripts involved in database archival and
update

\# of files used for locating files that contain data of specific types
for

\# given time periods.

\#

\# Crontab Field Definitions:

\# min hr dom mon dow(0=Sun) script_file \[p1, p2, \...\]

\#

\# EXPLANATION of crontab line:

\# A crontab line consists of 2 basic parts, a time/date information

\# part and a script/executable part. An example is given below.

\# \|\...Time/Date\...\|
\|\...\...\.....Script/Executable\...\...\...\...\|

\# 00 04 \* \* 0-2,4-6 /export/data2/tide/db/exe/tide_lz_script 1

\# \-- \-- - - \-\-\-\-\-\--
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--
-

\# \| \| \| \| \| \| \|

\# \| \| \| \| \| \| Process files \< 1 day old

\# \| \| \| \| \| Tide script to process LZ data

\# \| \| \| \| Process data on Sun-Tue and Thu-Sat (range 0-6, 0=sun)

\# \| \| \| Process data every month (range 1-12)

\# \| \| Process data every day of month (range 1-31)

\# \| Begin processing at hour 4am (range 0-23)

\# minute 00

\#

\# \<\<\<\<\<\< MOVE PLOT FILES FROM HARD DISK TO ARCHIVE AND UPDATE
DATABASE \>\>\>\>\>\>

\# BEGIN AT 14:10CT on Fri

10 14 \* \* 5 /export/data2/tide/db/rims/ksh_move_hd_plots_update_mysql

\#

\# \<\<\<\<\<\< TIDE LEVEL-ZERO, ORBIT, AND ATTITUDE DATA TRANSFER
\>\>\>\>\>\>

\# BEGIN AT 12:01am on Sun-Sat

01 00 \* \* 0-6 /export/data2/tide/db/exe/ftp_tide_data_l0.pl -year=2007
-limit=1

\# 01 00 \* \* 0-6 /export/data2/tide/db/exe/ftp_tide_data_lz.pl
-year=2007 -limit=1

\#

\# \<\<\<\<\<\< SPACECRAFT POTENTIAL PROCESSING \>\>\>\>\>\>

\# BEGIN AT 12:30am on Sun-Sat

30 00 \* \* 0-6 /datafiles/efi_k0/ksh_tide_cdf_script -r 1

\#

\# \<\<\<\<\<\< MOVE DATA FILES FROM HARD DISK TO ARCHIVE AND UPDATE
DATABASE \>\>\>\>\>\>

\# BEGIN AT 1:25am on Sun-Sat

25 01 \* \* 0-6
/export/data2/tide/db/rims/ksh_move_hd_data_update_mysql_nsstc

\#

\# \<\<\<\<\<\< UPDATE FILE THAT CONTAINS LIST OF FILES IN THE ARCHIVE
DATABASE \>\>\>\>\>\>

\# BEGIN at 02:10 am

10 02 \* \* 0-6
/export/data2/tide/db/rims/update_tide_data_list_ver2.tcl -cron
-d=/export/data2/tide/db/data \> /dev/null

\#

\# \<\<\<\<\<\< TIDE PLOT PROCESSING \>\>\>\>\>\>

\# BEGIN AT 2:20am on Sun-Sat

20 02 \* \* 0-6 /export/data2/tide/db/exe/ksh_tide_plot_script_2

\#

\# \<\<\<\<\<\< SCP CURRENT po_wo\_\... Orbit file AND REMOVE old file
\>\>\>\>\>\>

00 03 \* \* \* /export/data2/tide/db/exe/purge_po_wo_files

\#

\# \<\<\<\<\<\< HTR CDF PROCESSING \>\>\>\>\>\>

\# BEGIN AT 4:00am on Sun-Sat

00 04 \* \* 0-6 /export/data2/tide/db/exe/ksh_htr_dl_process_dates_2 \|
/export/data2/tide/db/exe/ksh_htr_dl

\#

\# \<\<\<\<\<\< CONVERT Postscript TO pdfs AND CREATE jpgs from gifs
\>\>\>\>\>\>

\# BEGIN AT 4:30am on Sun-Sat

30 04 \* \* 0-6 /export/data2/tide/db/exe/convert_plot_files.tcl
-cronjob /net/satyr/export2/data/tide_plots

\#

#FTP plot files to ftp.nsstc.org

00 05 \* \* \* /export/data2/tide/db/exe/ftp_gp.pl

\#

#BACKUP MySql TIDE database every day at 6:00AM

00 06 \* \* \* /export/data2/tide/db/exe/csh_backup_TIDE_mysql

\#

#CHECK MSFC and GSFC MySql Databases

00 08 \* \* 0-6 /export/data2/tide/db/exe/check_msfc_gsfc_db.tcl -email

**web/satyr crontab (as 05/15/07):**

00 05 \* \* 0,3,4,5,6 /home/web/clean_up_tmp_stage.pl

30 06 \* \* \*
/home/web/httpd_1.5.2/cgi-bin/TIDE/summary_plots-dir/get_sp_for_walk.pl

20 14 \* \* 5
/home/web/httpd_1.5.2/cgi-bin/TIDE/summary_plots-dir/get_sp_for_walk.pl

**psloan/goewin crontab (as 05/15/07):**

\#

\# clean up stage on Sun,Wed,Thu,Fri,Sat at 05 am

00 05 \* \* 0,3,4,5,6 /space/cgi-bin/tide/clean_up_tmp_stage.pl

20 13 \* \* 0,3,4,5,6 /space/cgi-bin/tide/clean_up_tmp_stage.pl

\#

\# Plot files are moved from hard disk to the archive and the
information is

\# added to the gsfc mysql database at 15:10et (3:10pm) friday. The plot
files

\# are also removed from hard disk.

\# gif walk is run 10 minutes later at 15:20

10 15 \* \* 5 /projects/tide/prod/csh_move_hd_plots_update_mysql \>
/dev/null

20 15 \* \* 5 /space/cgi-bin/tide/summary_plots-dir/get_sp_for_walk.pl

\#

\# check remaining bytes in the archive on Monday morning

30 04 \* \* 1 /export/home/blee/source/tcl/archive_status.tcl
peggy.sloan@nasa.gov

\#

\# update tide data list on Friday morning

00 03 \* \* 5 /projects/tide/prod/tcl/update_tide_data_list_ver2.tcl
-cron

\#

\# ftp tide data files

01 01 \* \* \* /projects/tide/prod/ftp_gsfc_tide_data_l0.pl -limit=1
-year=2007

\# 01 01 \* \* \* /projects/tide/prod/ftp_gsfc_tide_data_lz.pl -limit=1
-year=2007

\#

\# Move TIDE data to archive and update mysql database

15 02 \* \* \* /projects/tide/prod/csh_move_hd_data_update_mysql

\#

\# Purge po_wo\_\... Orbit files

00 06 \* \* \* /projects/tide/prod/purge_po_wo_files

\#

\# ftp tide files from ftp.nsstc.org to /archive

00 07 \* \* \* /projects/tide/prod/ftp_tide_plot_files.pl

\#

\# update gif walk at 07:20 every day

20 07 \* \* \* /space/cgi-bin/tide/summary_plots-dir/get_sp_for_walk.pl

\#

\# Backup mysql database

00 08 \* \* \* /projects/tide/prod/csh_backup_TIDE_mysql

\#

\# Database check

00 09 \* \* \* /projects/tide/prod/tcl/get_mysql_info_all.tcl