Skip to content

Commit

Permalink
Renamed .cvsignore to .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Gilmore authored and agilmore2 committed May 23, 2019
1 parent 1a7ec5c commit 5ca0e6a
Show file tree
Hide file tree
Showing 94 changed files with 113 additions and 214 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.out
*.err
*.log
*.dat
*~
.dba_user_login
.ncftp
.tstool
.app_user_login
*.lis
*.rdb
obj64
*.png
File renamed without changes.
File renamed without changes.
54 changes: 0 additions & 54 deletions Environ.10

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion basins/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# basins makefile64
# $Id$

include ../../Environ.10
include ../../Environ.12

OBJDIR = $(HDB_ENV)/basins/obj64
INCLUDES= -I$(HDB_APP_INCLUDE)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ebid2hdb/src/ebid2hdb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ =head1 FORMAT
The data is expected in CVS format. Example:
Reading,Receive,Value,Unit,Quality
Reading,Receive,Value,Unit,Data Quality
2016-07-22 23:40:00,2016-07-22 23:40:03,5.35,ft,A
2016-07-22 23:10:03,2016-07-22 23:10:07,5.34,ft,A
2016-07-22 22:39:58,2016-07-22 22:40:01,5.34,ft,A
Expand Down Expand Up @@ -283,7 +283,7 @@ sub parse_data {
my $row = shift @array;
chomp $row;
if (!($row =~ /Reading,Receive,Value,Unit,Quality.*/))
if (!($row =~ /Reading,Receive,Value,Unit,Data Quality.*/))
{
$hdb->hdbdie(
"File not in expected format: $row\n");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gentea/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The version for use with C and INGRES follows:

include ../../Environ.10
include ../../Environ.12
include make_include64

######################### Directives ###############################
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions gentea/work/crsp.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
teacup 50 710 919 17 4 24322000.0 Lake Powell
teacup 50 710 919 17 5 24322000.0 Lake Powell
teacup 288 155 916 17 1 344800.0 Fontenelle
teacup 80 260 917 17 2 3749000.0 Flaming Gorge
teacup 80 260 917 17 3 3749000.0 Flaming Gorge
teacup 465 505 913 17 2 829500.0 Blue Mesa
teacup 445 425 914 17 1 117190.0 Morrow Point
teacup 440 630 920 17 2 1696000.0 Navajo
teacup 445 425 914 17 1 117025.0 Morrow Point
teacup 440 630 920 17 3 1696000.0 Navajo
Binary file modified gentea/work/crsp_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions gentea/work/green.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
teacup 140 587 944 17 1 29870.0 Meeks Cabin
teacup 220 596 949 17 1 13880.0 Stateline
teacup 362 270 936 17 1 38300.0 Big Sandy
teacup 195 375 916 17 2 344800.0 Fontenelle
teacup 400 482 917 17 3 3749000.0 Flaming Gorge
teacup 35 515 944 17 1 29870.0 Meeks Cabin
teacup 65 600 949 17 1 13880.0 Stateline
teacup 450 150 936 17 1 36688.0 Big Sandy
teacup 40 305 916 17 3 344800.0 Fontenelle
teacup 510 380 917 17 4 3749000.0 Flaming Gorge

teacup 490 230 954 17 1 13164.0 Eden
Binary file modified gentea/work/green_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions gentea/work/gunnison.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
teacup 285 242 915 17 1 17536.0 Crystal
teacup 390 325 913 17 2 829500.0 Blue Mesa
teacup 237 385 948 17 1 82980.0 Ridgway
teacup 300 310 914 17 1 117025.0 Morrow Point
teacup 350 80 945 17 1 16703.0 Paonia
teacup 313 383 939 17 1 13000.0 Silver Jack
teacup 490 80 912 17 1 106210.0 Taylor Park
teacup 135 65 915 17 1 17536.0 Crystal
teacup 495 410 913 17 3 829500.0 Blue Mesa
teacup 55 410 948 17 1 82980.0 Ridgway
teacup 50 325 914 17 2 117025.0 Morrow Point
teacup 350 65 945 17 1 15522.0 Paonia
teacup 135 410 939 17 1 13000.0 Silver Jack
teacup 490 75 912 17 2 106210.0 Taylor Park
Binary file modified gentea/work/gunnison_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions gentea/work/pecosrio.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
teacup 20 300 1119 17 2 1973358.0 Elephant Butte
teacup 20 370 1094 17 1 226672.0 Caballo
teacup 315 270 943 17 1 51418.0 Sumner
teacup 325 330 937 17 1 41870.0 Brantley
teacup 50 130 1119 17 4 1973358.0 Elephant Butte
teacup 20 350 1094 17 2 226672.0 Caballo
teacup 400 255 943 17 1 51418.0 Sumner
teacup 400 315 937 17 1 41870.0 Brantley

teacup 400 375 2684 17 1 4466.0 Avalon
Binary file modified gentea/work/pecosrio_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions gentea/work/sanjuan.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
teacup 400 32 934 17 1 39792.0 Lemon
teacup 320 185 935 17 1 9951.0 Jackson Gulch
teacup 490 50 933 17 1 125400.0 Vallecito
teacup 455 280 920 17 2 1696000.0 Navajo
teacup 271 42 958 17 1 381100.0 McPhee
teacup 423 27 934 17 1 39792.0 Lemon
teacup 130 310 935 17 1 9951.0 Jackson Gulch
teacup 515 72 933 17 2 125400.0 Vallecito
teacup 495 360 920 17 4 1696000.0 Navajo
teacup 135 85 958 17 3 381100.0 McPhee
teacup 325 65 3083 17 2 115075.0 Lake Nighthorse
Binary file modified gentea/work/sanjuan_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 11 additions & 10 deletions gentea/work/wasatch.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
teacup 470 85 957 17 1 15280.0 Hyrum
teacup 470 160 925 17 1 198270.0 Willard Bay
teacup 470 235 946 17 1 110149.0 Pineview
teacup 470 310 938 17 1 7070.0 Causey
teacup 470 385 942 17 1 22501.0 Lost Creek
teacup 470 460 941 17 1 73940.0 Echo
teacup 470 535 940 17 1 49510.0 East Canyon
teacup 470 610 947 17 1 60860.0 Rockport
teacup 470 685 964 17 1 320300.0 Jordanelle
teacup 470 760 953 17 1 149700.0 Deer Creek
teacup 140 100 959 17 1 5374.0 Newton
teacup 75 180 957 17 1 14734.0 Hyrum
teacup 70 285 925 17 2 222273.0 Willard Bay
teacup 540 280 946 17 2 110149.0 Pineview
teacup 535 360 938 17 1 7070.0 Causey
teacup 520 430 942 17 1 22501.0 Lost Creek
teacup 535 510 941 17 1 73940.0 Echo
teacup 515 590 940 17 1 49510.0 East Canyon
teacup 480 655 947 17 1 60860.0 Rockport
teacup 90 615 964 17 3 311000.0 Jordanelle
teacup 100 725 953 17 2 150161.0 Deer Creek



Expand Down
Binary file modified gentea/work/wasatch_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions hdbLib/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# hdbLib makefile64
# $Id$:

include ../../Environ.10
include ../../Environ.12

OBJDIR = $(HDB_ENV)/hdbLib/obj64
INCLUDES = -I$(HDB_APP_INCLUDE)
INCLUDES = -I$(HDB_APP_INCLUDE) -I$(ORACLE_HOME)/precomp/public -I$(ORACLE_HOME)/rdbms/public
LIBS = $(HDB_LIBS) -lm -ldl
CFLAGS = -ansi -Wall -c -g -DANSIPROTO $(INCLUDES)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ratings/usbr/get_usbr_ratings.pl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if (defined ($ENV{PERL_ENV})) {
use lib "$ENV{PERL_ENV}/lib";
} else {
use lib "ENV{HDB_ENV}/perlLib";
use lib "$ENV{HDB_ENV}/perlLib/lib";
}
use Hdb;

Expand Down
45 changes: 23 additions & 22 deletions ratings/usgs/src/get_usgs_ratings.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
use warnings;
use strict;

#use libraries from HDB environment (Solaris only except for HDB.pm)

#use libraries from HDB environment
use lib "$ENV{HDB_ENV}/perlLib/lib";
#or use this at UC
#use lib "$ENV{PERL_ENV}/lib";

use Hdb;

use LWP::UserAgent;
use File::Basename;

#Version Information
my $verstring = '$Revision: 1.5 $';
my $verstring = '$Revision: 1.6 $';
$verstring =~ s/^\$Revision: //;
$verstring =~ s/ \$//;

Expand All @@ -29,7 +28,9 @@

#the ugly globals...
my $agen_abbrev = 'USGS';
my $data_source = 'USGS Unit Values (Realtime)';
# modified below by M. Bogner 04/04/2012 to use a new unique set of external mappings for getting USGS rating tables`
my $data_source = 'USGS RATING TABLES';
#my $data_source = 'USGS Unit Values (Realtime)';
#my $data_source = 'USGS Daily Values (Provisional/Official)';
my $usgs_rating_type = 'Shift Adjusted Stage Flow';

Expand All @@ -42,23 +43,18 @@
# or... at least sites that had a stage SDI
# I did this by hard coding the 65 datatype id
# FIXME: JUST USGS sites from telemetry, instead of Realtime web loader
#--and a.primary_site_code not in ('08284200') use this to disable sites that don't have ratting tables
sub read_usgs_sites ($) {
my $hdb = shift;

#don't ignore UC specific site
# query below modified to no longer have to go get the 65 datatype for the mapping since mapping table will be used now
# modified by M. bogner 04/04/2011 per R. Clayton request
my $sites = $hdb->dbh->selectcol_arrayref(
"select distinct a.primary_site_code siteno
from ref_ext_site_data_map a, hdb_ext_data_source b,
hdb_site_datatype c, hdb_site_datatype d
from ref_ext_site_data_map a, hdb_ext_data_source b
where
b.ext_data_source_name = '$data_source' and
b.ext_data_source_id = a.ext_data_source_id and
a.hdb_site_datatype_id = c.site_datatype_id and
d.site_id = c.site_id and
d.datatype_id = 65 and
a.is_active_y_n = 'Y'
--and a.primary_site_code not in ('09014050')
order by siteno"
);

Expand Down Expand Up @@ -91,8 +87,15 @@ ($$$)
my $ua = shift;
my $request = shift;

my $file = $site . ".exsa.rdb";
my $url = "https://waterdata.usgs.gov/nwisweb/data/ratings/exsa/USGS.$file";
# my $file = $site . ".rdb";
# my $url = "http://waterdata.usgs.gov/nwisweb/data/exsa_rat/$file";
# the URL to USGS rating tables was discovered to have changed to a new location on 10/10/2012
# both the file name and the URL needed to be modified accordingly
# changed done by M. Bogner on 10/10/2012
my $file = "USGS." . $site . ".exsa.rdb";
my $url = "https://waterdata.usgs.gov/nwisweb/data/ratings/exsa/$file";

print $url."\n";

$request->uri($url);

Expand Down Expand Up @@ -249,15 +252,12 @@ ($$)
my $hdb = shift;
my $site = shift;

my $querysql = "select b.agen_id, d.site_datatype_id
from ref_ext_site_data_map a, hdb_ext_data_source b,
hdb_site_datatype c, hdb_site_datatype d
# query modified by M. Bogner 04/04/2012 to use a unique sdi list from mapping table solely for USGS rating tables
my $querysql = "select b.agen_id, a.hdb_site_datatype_id
from ref_ext_site_data_map a, hdb_ext_data_source b
where primary_site_code = '$site' and
b.ext_data_source_id = a.ext_data_source_id and
b.ext_data_source_name = '$data_source' and
a.hdb_site_datatype_id = c.site_datatype_id and
d.site_id = c.site_id and
d.datatype_id = 65"; #hardcoded Gage Height here, UG!
b.ext_data_source_name = '$data_source'";

my ( $agen_id, $sdi);

Expand Down Expand Up @@ -396,6 +396,7 @@ ($$$)
while (@newrat) {
my ($db_indep, $db_dep) = @{pop(@$dbrat)}[1,2]; # hoorah for perl ref and array syntax!
my ($web_indep, $web_dep) = (split '\t', pop(@newrat))[0,2]; # same!
# bug fix by M. Bogner 9/4/2014 changed "AND" to "OR"
return 0 if $web_indep != $db_indep or $web_dep != $db_dep; #possible floating point issues
}
return 1;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion res_data/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The version for use with C and INGRES follows:

include ../../Environ.10
include ../../Environ.12
include make_include64

######################### Directives ###############################
Expand Down
2 changes: 0 additions & 2 deletions res_data/work/reservoirs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@
938 causey
949 stateline
944 meekscabin


File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 9 additions & 8 deletions scadaTransfer/src/poll4csv.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
use warnings;
use strict;
use File::Basename;
use File::Copy "mv";

my $verstring = '$Revision$ ';
$verstring =~ s/^\$Revision: //;
$verstring =~ s/ \$//;

my $appdir = $ENV{"HDB_ENV"};

#check to see command line usage.
my $progname = basename($0);
chomp $progname;
Expand Down Expand Up @@ -50,7 +53,7 @@
usage();
}

$archivedir=$polldir . "/old_csv";
$archivedir=$appdir . "/scadaTransfer/work/old_csv";

chdir $polldir;

Expand All @@ -71,10 +74,8 @@
if (@files) {
sleep 10; # wait for gefrx to finish checking the file before moving it!
foreach $file (@files) {
#copy file for development system to load, chdir to $polldir done above
system("cp $file dev/");

my @program=("perl","../src/parsecsv.pl","-f","$polldir/$file");
my @program=("perl","$appdir/scadaTransfer/src/parsecsv.pl","-f","$polldir/$file");
system (@program) == 0 or die "Failed to run parsecsv.pl!\n $!";

#read the directory again to find all crsp_20* files
Expand All @@ -87,19 +88,19 @@

# now for each crsp file created by parsecsv.pl, run the loading script
foreach $crspfile (@crspfiles) {
my @program=("perl","../src/scada2hdb.pl","-a",$accountfile,"-f","$polldir/$crspfile");
my @program=("perl","$appdir/scadaTransfer/src/scada2hdb.pl","-a",$accountfile,"-f","$polldir/$crspfile");
system (@program) == 0 or die "Failed to run scada2hdb.pl!\n $!";
# move processed crspfile to old_files
$newcrspfile=$crspfile;
while (-e "$polldir/old_files/$newcrspfile") {
while (-e "$appdir/scadaTransfer/work/old_files/$newcrspfile") {
$newcrspfile =~ s/dat$/update.dat/;
}
rename "$polldir/$crspfile", "$polldir/old_files/$newcrspfile" or
mv "$polldir/$crspfile", "$appdir/scadaTransfer/work/old_files/$newcrspfile" or
die "Failed to move file: $crspfile\n$!\n";
}

#now move processed csv file to command line specified directory
rename "$polldir/$file","$archivedir/$file" or
mv "$polldir/$file","$archivedir/$file" or
die "Failed to move file: $file\n$!\n";

#get the date for all of the crsp files created by parsecsv
Expand Down
Loading

0 comments on commit 5ca0e6a

Please sign in to comment.