#!/usr/bin/ksh

## Set the environment variables
#
  if [[ -z $THMSOC ]]
  then
    THMSOC=/disks/socware/thmsoc_dp_current
    export THMSOC
  fi
  . ${THMSOC}/src/config/soc_it_to_me.config
  . ${THMSOC}/src/config/ground_mag.config
USGSRMDDIR=/disks/themisdata/thg/mirrors/mag/usgs_ascii
## Process sites
#
#	for line in $(cat ${CONFIGDIR}/lc_site_list.txt)
#	do
for site in bou brw bsl cmo ded frd frn gua hon new shu sit sjg tuc
do
for year in 2007 2008 2009 2010 2011 2012
do
for month in 01 02 03 04 05 06 07 08 09 10 11 12
do
		#site=$(echo $line | awk '{print $1}')
echo ${USGSRMDDIR}/${site}/${year}/${month}

		find ${USGSRMDDIR}/${site}/${year}/${month} -name \*Sec |awk -F/ '{print $6}' >> /home/thmsoc/clrussells_stuff/filelists/gmag_rmd_list_${site}_${year}.txt

	done
done
done
#
## Cleanup
#
	exit 0