Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Release beauharnois-27 #989

Merged
merged 13 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
Empty file removed Geodata.md
Empty file.
59 changes: 21 additions & 38 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Authors:
# DP Chassin (dchassin@slac.stanford.edu)

AM_INIT_AUTOMAKE = subdir-objects
ACLOCAL_AMFLAGS = -I m4

CC = $(PTHREAD_CC)
Expand Down Expand Up @@ -47,44 +48,28 @@ bin_PROGRAMS =
bin_SCRIPTS =
dist_doc_DATA =

python_requirements = $(top_srcdir)/requirements.txt
python_requirements = requirements.txt

docs_targets =

# required modules
include third_party/Makefile.mk
include gldcore/Makefile.mk
include python_extras/Makefile.mk
include cloud/Makefile.mk
include $(top_srcdir)/third_party/Makefile.mk
include $(top_srcdir)/gldcore/Makefile.mk
include $(top_srcdir)/python_extras/Makefile.mk
include $(top_srcdir)/cloud/Makefile.mk

# approved modules
include modules.mk
include $(top_srcdir)/modules.mk

# custom modules (see ./customize)
include custom.mk
include $(top_srcdir)/custom.mk

# for doxygen commands
include aminclude.mk
include $(top_srcdir)/aminclude.mk

dist_doc_DATA += COPYRIGHT
dist_doc_DATA += LICENSE

EXTRA_DIST += $(top_srcdir)/gldcore/gridlabd.htm
EXTRA_DIST += $(top_srcdir)/utilities/build_number

# if MISSING_XERCES
# all-local:
# @echo
# @echo " Missing dependency: libxerces-c"
# @echo ""
# @echo " libxerces-c was not found during configuration and is a required dependency."
# @echo " Install the libxerces-c development libraries and re-run ./configure or run"
# @echo " ./configure with the --with-xerces option. Try './configure --help' for"
# @echo " more information."
# @echo
# @false
# endif

help:
@echo "Configuration targets:"
@echo " reconfigure - Reconfigures a release build from a clean start"
Expand Down Expand Up @@ -157,7 +142,7 @@ over: clean all
clean-wc:
@echo -e "\nThis removes all unversioned files and directories in the working copy."
@unset REPLY && read -t 60 -p "Clean working copy (type 'yes' to proceed)? " && test "`echo "$$REPLY" | tr '[:upper:]' '[:lower:]'`" = "yes"
. utilities/cleanwc
. $(top_srcdir)/utilities/cleanwc

install-validate: install validate

Expand All @@ -175,19 +160,16 @@ $(scratchdir)/.xerces.stamp: third_party/$(XERCES_TARNAME).tar.gz
tar -xzf $< -C $(@D)
export XERCESCROOT=$(CURDIR)/$(@D)/$(XERCES_TARNAME) && \
cd $(@D)/$(XERCES_TARNAME) && \
autoreconf -isf && ./configure && make
(cd $(top_srcdir); autoreconf -isf) && $(top_srcdir)/configure && make
touch $@

$(scratchdir)/pkg: distdir # $(scratchdir)/.xerces.stamp
test ! -e $@ || rm -rf $@
test -d $@/gldcore || mkdir -p $@/gldcore
# cd $(distdir) && ./configure --with-xerces=$(CURDIR)/$(scratchdir)/$(XERCES_TARNAME) && make install DESTDIR=$(CURDIR)/$@/gldcore
cd $(distdir) && ./configure && make install DESTDIR=$(CURDIR)/$@/gldcore
cd $(distdir) && $(PWD)/configure && make install DESTDIR=$(CURDIR)/$@/gldcore
cd $@ && mkdir -p climate-data/usr/local/lib/gridlabd devel/usr/local/lib/gridlabd # libxerces-c/usr/lib
# mv $@/gldcore/usr/lib/gridlabd/*.zip $@/climate-data/usr/lib/gridlabd/
mv $@/gldcore/usr/local/include $@/devel/usr/local/include
mv $@/gldcore/usr/local/lib/gridlabd/*.la $@/devel/usr/local/lib/gridlabd/
# cp $(scratchdir)/$(XERCES_TARNAME)/src/.libs/libxerces-c.* $@/libxerces-c/usr/lib/
$(am__remove_distdir)

$(scratchdir)/$(PACKAGE_TARNAME).mpkg: $(scratchdir)/pkg
Expand Down Expand Up @@ -294,9 +276,9 @@ distclean-local: python-clean
@rm -f $(top_srcdir)/validate.txt

libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status libtool > /dev/null
$(SHELL) $(PWD)/config.status libtool > /dev/null

install-exec-hook: index python-requirements python-install docs
install-exec-hook: index python-requirements docs
@cp ${top_srcdir}/{COPYRIGHT,LICENSE} $(prefix)
@echo ""
@echo "Install complete. Here are some useful commands now:"
Expand All @@ -312,13 +294,14 @@ install-exec-hook: index python-requirements python-install docs
@echo ""

python-requirements: $(python_requirements)
cat $(python_requirements) | python3 -m pip install -q -r /dev/stdin
@echo "Updating python requirements..."
@cat $(addprefix $(top_srcdir)/,$(python_requirements)) | python3 -m pip install -q -r /dev/stdin

reconfigure: distclean
autoreconf -isf && ./configure --quiet
autoreconf -isf && $(PWD)/configure --quiet

reconfigure-debug: distclean
autoreconf -isf && ./configure --quiet 'CXXFLAGS=-O0 -g $(CXXFLAGS)'
autoreconf -isf && $(PWD)/configure --quiet 'CXXFLAGS=-O0 -g $(CXXFLAGS)'

docker: $(PREFIX)/docker.img

Expand All @@ -332,10 +315,10 @@ $(PREFIX)/docker.img: docker/Dockerfile Makefile
@mkdir -p $(prefix)
docker save $(PACKAGE)/$(PACKAGE_VERSION)-$(PACKAGE_BRANCH):latest -o $(prefix)/docker.img

system: install
@echo "Setting $$(./build-aux/version.sh --install) to the current system version"
system: python-install install
@echo "Setting $$($(top_srcdir)/build-aux/version.sh --install) to the current system version"
@$(DESTDIR)$(bindir)/gridlabd version set
@if [ ! "$$(gridlabd --version=install)" == "$$(./build-aux/version.sh --install)" ]; then \
@if [ ! "$$(gridlabd --version=install)" == "$$($(top_srcdir)/build-aux/version.sh --install)" ]; then \
echo 'WARNING : build and install versions differ; run `make reconfigure` to fix this problem'; \
fi

Expand Down
6 changes: 4 additions & 2 deletions build-aux/version.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh
#!/bin/bash
# This file is used by autoconf to generate the version string.
# It is assumed that this script is run from the top-level srcdir.
FIL="gldcore/version.h"
EXE=$0
TOP=$(cd ${EXE/version.sh/..}; pwd)
FIL="${TOP}/gldcore/version.h"
MAJ=`sed -En 's/#define REV_MAJOR ([0-9]+).*/\1/p' $FIL | tr -d '\n'`
MIN=`sed -En 's/#define REV_MINOR ([0-9]+).*/\1/p' $FIL | tr -d '\n'`
PAT=`sed -En 's/#define REV_PATCH ([0-9]+).*/\1/p' $FIL | tr -d '\n'`
Expand Down
4 changes: 2 additions & 2 deletions docs/Command/Modhelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Synopsis

~~~
bash$ gridlabd --modhelp module[:class]
bash$ gridlabd --modhelp[=json] module[:class]
~~~

# Description

Display structure of a class or all classes in a module.
Display structure of a class or all classes in a module. If the `=json` option is included, the output is generated in JSON format.

The comment section includes whether the property is a required input, optional, dynamic, output, or deprecated.

Expand Down
11 changes: 8 additions & 3 deletions docs/Command/Profile.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
[[/Command/Profile]] -- Toggles performance profiling of core and modules while simulation runs
[[/Command/Profile]] -- Control performance profiling of core and modules while simulation runs

# Synopsis

~~~
bash$ gridlabd --profile
bash$ gridlabd --profile[=FORMAT]
~~~

# Description

Toggles performance profiling of core and modules while simulation runs.
Control performance profiling of core and modules while simulation runs. Support formats are `TEXT`, `CSV`, and `JSON`. The default format is `TEXT`. Use the [[/Command/Redirect]] option to write the output to a file.

When the profiler is enabled, the object profile is also output to `object_profile.txt`.

# See also

* [[/Command/Redirect]]
2 changes: 1 addition & 1 deletion docs/Command/Redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bash$ gridlabd --redirect <stream>[:<file>]

# Description

Redirects an output to stream to a file (or null).
Redirects an output to stream to a file (or null). Valid streams are `output`, `error`, `warning`, `debug`, `verbose`, `profile`, and `progress`. The default filenames are `gridlabd.{out,err,wrn,dbg,inf,pro,prg}`, respectively.

# Examples

Expand Down
4 changes: 4 additions & 0 deletions docs/Command/Version.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Outputs the installation path, e.g., `/usr/local/opt/gridlabd/4.2.0-191115-maste

Outputs the installation name, e.g., `gridlabd-4.2.0-191115-develop_fix_manual`.

### `git-repo`, `git-branch`, `git-commit`

Outputs the git repository URL, branch, and commit information, respectively.

# Example

The following command verifies that the version is at least 4.2:
Expand Down
2 changes: 1 addition & 1 deletion docs/Converters/Import/Table_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ climate | weather | | | | | | | | | | | | | CA-Chino_Airport.tmy3

Sample usage within GLM
~~~
#input "input_file.csv" -f "table" -t "object"
#input "input_file.csv" -f "table" -t "object" [-M module] [-C class] [-p property=value]
~~~

The `class` can either be defined through `options` or specified directly in the CSV. If you'd like to omit the class in the table you can specify it in the input command line instead as
Expand Down
11 changes: 9 additions & 2 deletions docs/Module/Commercial/CEUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
object ceus {
filename "<file-name>";
floor_area "<real-value> sf>";
floor_area "<real-value> sf";
composition "<enduse>:{<parameter>:<value>;...}";
weather "<object-name>";
total_power_A "<complex-value> VA";
Expand Down Expand Up @@ -69,7 +69,14 @@ The load composition determines how much power is consumed by each end-use speci

In general the sum the real power fractions should be 1.0 and the sum of the reactive power fractions should be less of 0.1.

The `Area` term of the fraction of the `floor_area` affected by the enduse specified.
The `Area` term of the fraction of the `floor_area` affected by the enduse specified. The default area fraction is `1.0`. The `Electric` term specifies that fraction of the end-use that is electrified. The default is `1.0`.

In addition, the composition can represent load sensitivities to temperature, price, and occupancy. The composition parameters are
* `Th`, `Thb`, `Thc`, `Th0`, `Th1`: the enduse heating mode temperature sensitivity slope, base, intercept, domain min and max, respectively
* `Tc`, `Tcb`, `Tcc`, `Tc0`, `Tc1`: the enduse cooling mode sensitivity slope, base, intercept, domain min and max, respectively
* `S`, `Sb`, `Sc`, `S0`, `S1`: the enduse solar gain sensitivity slope, base, intercept, domain min and max, respectively
* `E`, `Eb`, `Ec`, `E0`, `E1`: the enduse price sensitivity slope, base, intercept, domain min and max, respectively
* `Oh`, `Ob`, `Oc`, `O0`, `O1`: the enduse occupancy sensitivity slope, base, intercept, domain min and max, respectively

### `filename`

Expand Down
66 changes: 66 additions & 0 deletions docs/Subcommand/Weather.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ bash$ gridlabd weather delete <pattern>
bash$ gridlabd weather info <pattern>
bash$ gridlabd weather clean
bash$ gridlabd weather config {show,reset}
bash$ gridlabd weather metar [--index|<station-list>]
~~~

# Description
Expand Down Expand Up @@ -278,6 +279,71 @@ To reset the weather data configuration, use the command
bash$ gridlabd weather config reset
~~~

## `metar`

Creates weather objects for NOAA METAR weather stations. To get a list of available stations use the following command:

~~~
bash$ gridlabd weather metar --index
PADK
PAKH
PAUT
PZ74
...
~~~

To get the weather object for a station use the following command:

~~~
bash$ gridlabd weather metar KSFO
// generated by metar2glm.py on 2021-08-27T21:00:48.545274Z

class weather
{
char8 country;
char8 region;
char32 station;
double elevation[ft];
timestamp time;
double temperature[degF];
double dew_point[degF];
double wind_speed[m/s];
double wind_dir[deg];
double visibility[mile];
double pressure[mbar];
char256 clouds;
char1024 metar;
on_init "python:metar_weather.weather_init";
}

object weather
{
country "US";
region "CA";
station "SAN FRANCISCO";
latitude "37.62";
longitude "-122.37";
elevation "2.0";
name "KSFO";
time "2021-08-27 19:56:00 UTC";
temperature 24.0 degC;
dew_point 17.0 degC;
wind_speed 7.0 knot;
visibility 14484.096000000001 m;
pressure 1008.1306845999999 mbar;
clouds "a few clouds at 1000 feet";
metar "KSFO 271956Z 01007KT 9SM FEW010 24/17 A2977 RMK AO2 SLP079 T0239017";
}
~~~

Multiple stations may be listed, so that:

~~~
bash$ gridlabd weather metar KSFO KSEA
~~~

will output multiple objects, one for each station.

# Environment Variables

The weather subcommand needs to know where you wish to store the weather files. The environment variable `GLD_ETC` is used to indicate where the `weather` folder is. By default this is the `/usr/local/share/gridlabd` folder.
Expand Down
File renamed without changes.
Loading