Commit 92ed7d4a authored by Ryan Berkheimer's avatar Ryan Berkheimer
Browse files

added first legacy code for SODSOM job

parent dcd5dafa
Pipeline #1321 failed with stage
c...Program LoadSODSM.f Author: Dan Dellinger Date: June 30, 2009
c...Purpose: Parse SOD & SOM from files received via GTS feed & placed on
c...humboldt. Load files into CLISAM work files using asos_io package.
character*3 datatype
character*6 YrMo
character*24 infile
call getarg(1,datatype)
if( datatype .eq. 'SOD' )then
open(unit=10,file='/raw/ASOS_Ingest/SRC/SCRIPTS/SOD.List',
& status='old')
ios = 0
do while( ios == 0 )
read(10,'(a)',iostat=ios)infile
if( ios == 0 )then
YrMo = infile(5:10)
write(6,*)'Loading '//infile
call system('/raw/ASOS_Ingest/SRC/TESTGRND/dlydrvr '//
& infile)
write(6,*)'Copying '//infile//' to /raw/asos/save_dialin/'//
& YrMo
call system('cp /proc_sm/gtsnp/data/ftp/METAR/SOD/'//
& infile//' /raw/asos/save_dialin/'//YrMo//'/'//infile)
c pause
call system('rm -f /proc_sm/gtsnp/data/ftp/METAR/SOD/'//
& infile)
endif
enddo
else if( datatype .eq. 'SOM' )then
open(unit=10,file='/raw/ASOS_Ingest/SRC/SCRIPTS/SOM.List',
& status='old')
ios = 0
do while( ios == 0 )
read(10,'(a)',iostat=ios)infile
if( ios == 0 )then
YrMo = infile(5:10)
write(6,*)'Loading '//infile
call system('/raw/ASOS_Ingest/SRC/TESTGRND/mthdrvr '//
& infile)
write(6,*)'Copying '//infile//' to /raw/asos/save_dialin/'//
& YrMo
call system('cp /proc_sm/gtsnp/data/ftp/METAR/SOM/'//
& infile//' /raw/asos/save_dialin/'//YrMo//'/'//infile)
c pause
call system('rm -f /proc_sm/gtsnp/data/ftp/METAR/SOM/'//
& infile)
endif
enddo
endif
close(10)
stop
end
#!/bin/csh
#Script Name: ProcSODSOM.sh Date: Feb 9, 2009 Dan Dellinger
#
#Description: This script gets SOD & SOM files from dial in directory
# Executes programs dsmdrvr & msmdrvr that load data into CLISAM files
#
set twodigit = ( 01 02 03 04 05 06 07 08 09 10 )
set thedate = `date`
echo BEGIN SOD/SOM PROCESS for $thedate
set yrmodahr = `date +%Y%m%d%H`
echo yrmodahr is $yrmodahr
set year = `date +%Y`
set month = `date +%m`
set day = `date +%d`
set YrMoDa = $year$month$day
echo begin SOD load into CLISAM files
ls -l /proc_sm/gtsnp/data/ftp/METAR/SOD/ | grep sod >/raw/ASOS_Ingest/SRC/SCRIPTS/sod.list
cut -c59-82 /raw/ASOS_Ingest/SRC/SCRIPTS/sod.list >/raw/ASOS_Ingest/SRC/SCRIPTS/SOD.List
#program to handle all the dial in daily summary files
/raw/ASOS_Ingest/SRC/TESTGRND/LoadSODSOM "SOD" >/raw/ASOS_Ingest/EXE/REP/LoadSOD.$YrMoDa
find /raw/ASOS_Ingest/EXE/REP -name 'LoadSOD.20*' -mtime +21 -exec rm -f '{}' ';'
echo begin SOM
ls -l /proc_sm/gtsnp/data/ftp/METAR/SOM |grep som >/raw/ASOS_Ingest/SRC/SCRIPTS/som.list
cut -c59-82 /raw/ASOS_Ingest/SRC/SCRIPTS/som.list >/raw/ASOS_Ingest/SRC/SCRIPTS/SOM.List
#program to handle all the dial in daily summary files
/raw/ASOS_Ingest/SRC/TESTGRND/LoadSODSOM "SOM">/raw/ASOS_Ingest/EXE/REP/LoadSOM.$YrMoDa
find /raw/ASOS_Ingest/EXE/REP -name 'LoadSOM.20*' -mtime +21 -exec rm -f '{}' ';'
set thedate = `date`
echo END SOD/SOM PROCESS for $thedate
echo "============================================================================"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment