[Equest-users] Python for pre or post-processing eQuest/DOE2 files

Julien Marrec julien.marrec at gmail.com
Wed Oct 1 00:49:17 PDT 2014


Joe,

Thanks for sharing.

I'm a complete newbie to awk but willing to give it a shot!
I installed GNU awk for windows.I'm running the file in command prompt with

awk -f report.awk MySIMfile.SIM

or

awk -f report.awk MySIMfile.SIM > out.txt

I'm getting only this ouput
"                  0      0      0      0      0      0      0      0
0    0.00 60265.60"

I don't have the headers but that's an easy fix, I just need to remove that
specific if statement (I'm guessing this is for parametric runs, you only
output it for base case scenario or something?)

the "{if (ipse >=1) " statement is more problematic, especially the nested
"if ($2 == "TOTAL" && $3 == "MWH")" that conditions the printf statement. I
looked at my sim file, and there's nowhere in the PS-E report (nor in the
entire file) where I got "Total MWh" written.

I used DOE2.2 (48r) with "eQ_Lib.365.dat" lib file to generate that SIM
file. Could this be the problem? Are you using a different library
therefore your output sim file is different?


Many thanks,
Julien

--
Julien Marrec, EBCP, BPI MFBA
Energy&Sustainability Engineer
T: +33 6 95 14 42 13

LinkedIn (en) : www.linkedin.com/in/julienmarrec
LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
<http://www.linkedin.com/in/julienmarrec>

2014-10-01 2:59 GMT+02:00 Joe Huang <yjhuang at whiteboxtechnologies.com>:

>  I'm not aware of purpose-built editors for eQUEST, but there's been
> discussions on various bulletin boards off and on about how people pre- and
> post-process DOE-2 input and output files.
>
> I've been using various unix programs, esp. awk, for this purpose.  What I
> like about awk are:
>  (1) easy parsing of text
>  (2) flexibility to interpret arguments as either characters, numbers
>  (3) minimal effort to set up an script, in contrast to formal computer
> languages like C, Fortran, etc. that
>        require defining variables, assigning arrays, open statements,
> etc., etc.
>
> awk works well with any text file, but it may work particularly well with
> standard DOE-2 output files because of their consistent format, making it
> possible to search for unique strings, and then start counting lines and
> pulling off variables.  I'm attaching a generic report.awk script (I always
> use the *.awk extension to tell them apart) that reads a standard DOE-2
> output and prints out the summary results on a single line.  I then add
> this to the batch run file, so that I never look at the full DOE-2 outputs,
> but only at a file containing all the summary results.
>
> Joe
>
> Joe Huang
> White Box Technologies, Inc.
> 346 Rheem Blvd., Suite 205A
> Moraga CA 94556yjhuang at whiteboxtechnologies.comhttp://weather.whiteboxtechnologies.com for simulation-ready weather data
> (o) (925)388-0265
> (c) (510)928-2683
> "building energy simulations at your fingertips"
>
>
> On 9/30/2014 10:06 AM, Julien Marrec wrote:
>
>    Hi,
>
>  I'd like to start using Python for pre/post processing while using
> eQuest/DOE2.
>
> Right now I'm more focused on post processing such as quickly grepping
> some key metrics in the .SIM file, calculating some more such as Window to
> wall ratio, or plotting selected columns of the .hsr file (could be a
> perfect application to leverage the capabilities of Panda)
>
> Indeed, I find it pretty cumbersome to do it manually when I'm doing
> iterations.
>  (I've started looking into DOE2's VB functions you can call to interact
> with BIN reports, but I couldn't make it work right off the bat, and I'd
> rather use Python anyway)
>
>  If at all possible I'd like to avoid reinventing the wheel. Would people
> care to share some scripts/snippets/resources they wrote? Or would be
> interested in a joint effort to create some?
>
>  Also, for preprocessing, is there anything such as Eppy
> <https://pypi.python.org/pypi/eppy/0.4.6> for EnergyPlus that exists for
> eQuest? I searched the archive of the list and done some pretty thorough
> internet searches, but I couldn't find anything (aside from people saying
> you could use python to do that).
>
>  Thanks for any insight,
>  Julien
>      --
> Julien Marrec, EBCP, BPI MFBA
> Energy&Sustainability Engineer
> T: +33 6 95 14 42 13
>
> LinkedIn (en) : www.linkedin.com/in/julienmarrec
> LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
>
>
> _______________________________________________
> Equest-users mailing listhttp://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>
>
> _______________________________________________
> Equest-users mailing list
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to
> EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20141001/7f8ff70f/attachment.htm>


More information about the Equest-users mailing list