Issue #189 switch FFMP source config to grid.
Former-commit-id: 85dac537f47cea6cc8ee6b0e0092c80544b6a89a
This commit is contained in:
parent
5cf650b61a
commit
4007fa442b
2 changed files with 39 additions and 6 deletions
33
deltaScripts/unified_grid/update_FFMP_Source.sh
Normal file
33
deltaScripts/unified_grid/update_FFMP_Source.sh
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# This script will update any FFMPSourceConfig.xml files
|
||||
# to use grid data in place of grib
|
||||
#
|
||||
# This update needs to be performed with build ???.
|
||||
# This update is only for edex servers which host FFMPSourceConfig.xml files
|
||||
|
||||
echo ""
|
||||
echo "Press Enter to perform the updates Ctrl-C to quit."
|
||||
read done
|
||||
|
||||
files=`find /awips2/edex/data/utility/common_static -iname FFMPSourceConfig.xml`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: Update Failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for f in $files; do
|
||||
echo Updating $f
|
||||
bf=$f.bak.`date +%m%d%y`
|
||||
cp $f $bf
|
||||
# reconstruct data uris from grib to grid
|
||||
awk -F '/' '
|
||||
/<dataPath>\/grib/ {print $1 "/grid/" $3 "/" $4 "/.*/.*/.*/" $5 "/" $6 "/" $7 "/" $8 "/" $11 "/" $12; next;}
|
||||
{gsub(/<plugin>grib<\/plugin>/,"<plugin>grid</plugin>"); print; }
|
||||
' $bf > $f
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo "INFO: The update finished successfully."
|
||||
exit 0
|
|
@ -101,8 +101,8 @@
|
|||
<SourceName>FFG0124hr</SourceName>
|
||||
<DisplayName>RFCFFG</DisplayName>
|
||||
<DurationHour>1</DurationHour>
|
||||
<dataPath>/grib/%/%/FFG0124hr/SFC/0.0/-999999.0/null/null/</dataPath>
|
||||
<plugin>grib</plugin>
|
||||
<dataPath>/grid/%/%/.*/.*/null/FFG0124hr/SFC/0.0/-999999.0/</dataPath>
|
||||
<plugin>grid</plugin>
|
||||
<dataType>GRID</dataType>
|
||||
<sourceType>GUIDANCE</sourceType>
|
||||
<rateOrAccum>accum</rateOrAccum>
|
||||
|
@ -118,8 +118,8 @@
|
|||
<SourceName>FFG0324hr</SourceName>
|
||||
<DisplayName>RFCFFG</DisplayName>
|
||||
<DurationHour>3</DurationHour>
|
||||
<dataPath>/grib/%/%/FFG0324hr/SFC/0.0/-999999.0/null/null/</dataPath>
|
||||
<plugin>grib</plugin>
|
||||
<dataPath>/grid/%/%/.*/.*/null/FFG0324hr/SFC/0.0/-999999.0/</dataPath>
|
||||
<plugin>grid</plugin>
|
||||
<dataType>GRID</dataType>
|
||||
<sourceType>GUIDANCE</sourceType>
|
||||
<rateOrAccum>accum</rateOrAccum>
|
||||
|
@ -135,8 +135,8 @@
|
|||
<SourceName>FFG0624hr</SourceName>
|
||||
<DisplayName>RFCFFG</DisplayName>
|
||||
<DurationHour>6</DurationHour>
|
||||
<dataPath>/grib/%/%/FFG0624hr/SFC/0.0/-999999.0/null/null/</dataPath>
|
||||
<plugin>grib</plugin>
|
||||
<dataPath>/grid/%/%/.*/.*/null/FFG0624hr/SFC/0.0/-999999.0/</dataPath>
|
||||
<plugin>grid</plugin>
|
||||
<dataType>GRID</dataType>
|
||||
<sourceType>GUIDANCE</sourceType>
|
||||
<rateOrAccum>accum</rateOrAccum>
|
||||
|
|
Loading…
Add table
Reference in a new issue