Omaha #3318 split deltascript one for dx1 the other for dx2.

Change-Id: If230b4c1bb24b4d2d9b73b357019275534803691

Former-commit-id: 7075b0d56c [formerly ba4f30e9c5] [formerly 7208fc1f29] [formerly 7208fc1f29 [formerly 8ea817f6d0]] [formerly 44029681c8 [formerly 7208fc1f29 [formerly 8ea817f6d0] [formerly 44029681c8 [formerly abbaca59ff431f420bc700ad11de3cda89f82277]]]]
Former-commit-id: 44029681c8
Former-commit-id: e9c0dc5795c6193dddb226fbb684153d2a478273 [formerly 054abb02e7fd200f436f571982004d26f9950327] [formerly d751500485 [formerly 37eb414dd0]]
Former-commit-id: d751500485
Former-commit-id: 861593e640
This commit is contained in:
Roger Ferrel 2014-07-31 17:16:35 -05:00
parent 95c5efcf4f
commit 3b3bc0b45f
2 changed files with 22 additions and 10 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
# DR #3318 - this update awips.metadata.grid_info and needs to run on dx1.
echo 'INFO: Update gridinfo'
/awips2/psql/bin/psql -U awips -d metadata -c "update grid_info set
datasetid='GEFS' where datasetid='gefs'"
if [ $? -ne 0 ] ; then
echo 'ERROR unable to update database'
exit 1
fi
echo 'INFO: Update gridinfo successful.'
echo 'INFO: Has renameGefs.py been run on dx2?'

View file

@ -1,12 +1,10 @@
#!/usr/bin/env python
# Convert gefs' directories to the new GEFS' directories
# DR3318 Convert gefs' directories to the new GEFS' directories must run on dx2.
import h5py
import os
import sys
PSQL='/awips2/psql/bin/psql'
GRID_DIR= os.sep + 'awips2' + os.sep + 'edex' + os.sep + 'data' + os.sep + 'hdf5' + os.sep + 'grid'
OLD_DIR= os.path.join(GRID_DIR, 'gefs')
NEW_DIR= os.path.join(GRID_DIR, 'GEFS')
@ -70,12 +68,7 @@ if os.path.isdir(NEW_DIR) :
else:
print "WARNING: %s directory not found" % (NEW_DIR)
print 'INFO: Update database'
cmd = '%s -U awips -d metadata -c "update grid_info set datasetid=%s where datasetid=%s"' % (PSQL, "'GEFS'", "'gefs'")
if os.system(cmd) :
print 'ERROR Unable to update database'
exit(1)
print 'INFO: Updated GEFS successfully.'
print 'INFO: Has dbupdate.sh been run on dx1?'