Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2_2_2 patch #406

Merged
merged 5 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## ResStock v2.2.2
###### February 19, 2020 - [Diff](https://github.com/NREL/OpenStudio-BuildStock/compare/v2.2.1...v2.2.2)

Fixes
- Update the datapoint initialization script to download weather files to a common zip filename ([#406](https://github.com/NREL/OpenStudio-BuildStock/pull/406))

## ResStock v2.2.1
###### February 7, 2020 - [Diff](https://github.com/NREL/OpenStudio-BuildStock/compare/v2.2.0...v2.2.1)

Expand Down
2 changes: 1 addition & 1 deletion __version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = 'ResStock'
__description__ = 'Modeling the existing building stock (residential and commercial) using OpenStudio/EnergyPlus.'
__url__ = 'http://github.com/NREL/OpenStudio-BuildStock'
__version__ = '2.2.1'
__version__ = '2.2.2'
__author__ = 'National Renewable Energy Laboratory'
__license__ = 'BSD-3'
__copyright__ = 'Copyright (c) 2016-2019, Alliance for Sustainable Energy, LLC.'
34 changes: 17 additions & 17 deletions project_multifamily_beta/scripts/data_point/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,68 @@ if ! [ -d "weather" ]; then
fi
cd "weather"

FILENAME="${1##*/}"
FILENAME="weather.zip"

if ! [ -f $FILENAME ]; then

NUMEPWS="0"
CNT="0"

# Download and extract weather files
time=$(date +%T)
echo "$time Retrieving weather files."
while [ $NUMEPWS -le "1" ]; do
curl --retry 10 -O "$1"

curl --retry 10 -L -o $FILENAME "$1"

if ! [ -f $FILENAME ]; then
time=$(date +%T)
echo "$time ERROR: $FILENAME not successfully downloaded. Aborting..."
exit 1
fi

unzip -o $FILENAME

NUMEPWS=$(ls -l *.epw | wc -l)

CNT=$((CNT+1))

if [ $CNT -eq "10" ]; then
time=$(date +%T)
echo "$time ERROR: Maximum number of retries ($CNT) exceeded. Aborting..."
exit 1
fi

done

cd ..

# Run sampling script; if script has been uploaded, use that instead.
OUTCSV="buildstock.csv"
if ! [ -f "lib/housing_characteristics/$OUTCSV" ]; then

time=$(date +%T)
echo "$time Generating buildstock.csv sampling results."

NUMDATAPOINTS=`awk -F\"maximum\": 'NF>=2 {print $2}' analysis.json | sed 's/,//g' | head -n1 | xargs` # Yes, this is gross.
time=$(date +%T)
echo "$time NUMDATAPOINTS is $NUMDATAPOINTS"

ruby lib/resources/run_sampling.rb -p NA -n $NUMDATAPOINTS -o $OUTCSV

cp "lib/resources/$OUTCSV" "lib/housing_characteristics/$OUTCSV"

else

time=$(date +%T)
echo "$time Using uploaded buildstock.csv."

fi

else

NUMEPWS=$(ls -l *.epw | wc -l)

fi

time=$(date +%T)
Expand Down
34 changes: 17 additions & 17 deletions project_singlefamilydetached/scripts/data_point/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,68 @@ if ! [ -d "weather" ]; then
fi
cd "weather"

FILENAME="${1##*/}"
FILENAME="weather.zip"

if ! [ -f $FILENAME ]; then

NUMEPWS="0"
CNT="0"

# Download and extract weather files
time=$(date +%T)
echo "$time Retrieving weather files."
while [ $NUMEPWS -le "1" ]; do
curl --retry 10 -O "$1"

curl --retry 10 -L -o $FILENAME "$1"

if ! [ -f $FILENAME ]; then
time=$(date +%T)
echo "$time ERROR: $FILENAME not successfully downloaded. Aborting..."
exit 1
fi

unzip -o $FILENAME

NUMEPWS=$(ls -l *.epw | wc -l)

CNT=$((CNT+1))

if [ $CNT -eq "10" ]; then
time=$(date +%T)
echo "$time ERROR: Maximum number of retries ($CNT) exceeded. Aborting..."
exit 1
fi

done

cd ..

# Run sampling script; if script has been uploaded, use that instead.
OUTCSV="buildstock.csv"
if ! [ -f "lib/housing_characteristics/$OUTCSV" ]; then

time=$(date +%T)
echo "$time Generating buildstock.csv sampling results."

NUMDATAPOINTS=`awk -F\"maximum\": 'NF>=2 {print $2}' analysis.json | sed 's/,//g' | head -n1 | xargs` # Yes, this is gross.
time=$(date +%T)
echo "$time NUMDATAPOINTS is $NUMDATAPOINTS"

ruby lib/resources/run_sampling.rb -p NA -n $NUMDATAPOINTS -o $OUTCSV

cp "lib/resources/$OUTCSV" "lib/housing_characteristics/$OUTCSV"

else

time=$(date +%T)
echo "$time Using uploaded buildstock.csv."

fi

else

NUMEPWS=$(ls -l *.epw | wc -l)

fi

time=$(date +%T)
Expand Down
34 changes: 17 additions & 17 deletions project_testing/scripts/data_point/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,68 @@ if ! [ -d "weather" ]; then
fi
cd "weather"

FILENAME="${1##*/}"
FILENAME="weather.zip"

if ! [ -f $FILENAME ]; then

NUMEPWS="0"
CNT="0"

# Download and extract weather files
time=$(date +%T)
echo "$time Retrieving weather files."
while [ $NUMEPWS -le "1" ]; do
curl --retry 10 -O "$1"

curl --retry 10 -L -o $FILENAME "$1"

if ! [ -f $FILENAME ]; then
time=$(date +%T)
echo "$time ERROR: $FILENAME not successfully downloaded. Aborting..."
exit 1
fi

unzip -o $FILENAME

NUMEPWS=$(ls -l *.epw | wc -l)

CNT=$((CNT+1))

if [ $CNT -eq "10" ]; then
time=$(date +%T)
echo "$time ERROR: Maximum number of retries ($CNT) exceeded. Aborting..."
exit 1
fi

done

cd ..

# Run sampling script; if script has been uploaded, use that instead.
OUTCSV="buildstock.csv"
if ! [ -f "lib/housing_characteristics/$OUTCSV" ]; then

time=$(date +%T)
echo "$time Generating buildstock.csv sampling results."

NUMDATAPOINTS=`awk -F\"maximum\": 'NF>=2 {print $2}' analysis.json | sed 's/,//g' | head -n1 | xargs` # Yes, this is gross.
time=$(date +%T)
echo "$time NUMDATAPOINTS is $NUMDATAPOINTS"

ruby lib/resources/run_sampling.rb -p NA -n $NUMDATAPOINTS -o $OUTCSV

cp "lib/resources/$OUTCSV" "lib/housing_characteristics/$OUTCSV"

else

time=$(date +%T)
echo "$time Using uploaded buildstock.csv."

fi

else

NUMEPWS=$(ls -l *.epw | wc -l)

fi

time=$(date +%T)
Expand Down
34 changes: 17 additions & 17 deletions scripts/datapoint_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,68 @@ if ! [ -d "weather" ]; then
fi
cd "weather"

FILENAME="${1##*/}"
FILENAME="weather.zip"

if ! [ -f $FILENAME ]; then

NUMEPWS="0"
CNT="0"

# Download and extract weather files
time=$(date +%T)
echo "$time Retrieving weather files."
while [ $NUMEPWS -le "1" ]; do
curl --retry 10 -O "$1"

curl --retry 10 -L -o $FILENAME "$1"

if ! [ -f $FILENAME ]; then
time=$(date +%T)
echo "$time ERROR: $FILENAME not successfully downloaded. Aborting..."
exit 1
fi

unzip -o $FILENAME

NUMEPWS=$(ls -l *.epw | wc -l)

CNT=$((CNT+1))

if [ $CNT -eq "10" ]; then
time=$(date +%T)
echo "$time ERROR: Maximum number of retries ($CNT) exceeded. Aborting..."
exit 1
fi

done

cd ..

# Run sampling script; if script has been uploaded, use that instead.
OUTCSV="buildstock.csv"
if ! [ -f "lib/housing_characteristics/$OUTCSV" ]; then

time=$(date +%T)
echo "$time Generating buildstock.csv sampling results."

NUMDATAPOINTS=`awk -F\"maximum\": 'NF>=2 {print $2}' analysis.json | sed 's/,//g' | head -n1 | xargs` # Yes, this is gross.
time=$(date +%T)
echo "$time NUMDATAPOINTS is $NUMDATAPOINTS"

ruby lib/resources/run_sampling.rb -p NA -n $NUMDATAPOINTS -o $OUTCSV

cp "lib/resources/$OUTCSV" "lib/housing_characteristics/$OUTCSV"

else

time=$(date +%T)
echo "$time Using uploaded buildstock.csv."

fi

else

NUMEPWS=$(ls -l *.epw | wc -l)

fi

time=$(date +%T)
Expand Down