[bldg-sim] tools/software for extracting specific data/info f rom DOE-2.2 output file

Joe Huang yjhuang at lbl.gov
Mon Oct 10 16:39:17 PDT 2005


I've used awk for years to extract data from DOE-2 files, and have a whole 
library of awk scripts for different reports. The following  sample awk 
script gets the numbers from BEPS, but all my awk scripts are similar. 
Basically, I'm just having awk reproduce what a person would have to do, 
i.e., find the beginning of the report by searching for the unique string 
(BEPS, SS-A,  SS-F), and then either start count lines, or search for label 
identifiers, as in the BEPS example, and record the variables of interest. 
Then, at the end of the table, stop further reading.. The scripts are so 
simple that often I don't even save them, but write new one as fits the 
need.

Joe Huang

-- beps.awk

{if ($2 ~/BEPS/)
    {
    ipr = 1
    printf("\n%7s\n\n",substr(prevline,46,7))
    }
}
{if (ipr == 1)
   {
      if ($1 == "AREA" && $2 == "LIGHTS") print "LIT "$3" "$4
      if ($1 == "MISC" && $2 == "EQUIPMT") print "EQP "$3" "$4
      if ($1 == "SPACE" && $2 == "HEAT") print "\nHTG "$3" "$4
      if ($1 == "SPACE" && $2 == "COOL") print "CLG "$3" "$4
      if ($1 == "VENT" && $2 == "FANS") print "FAN "$3" "$4
      if ($1 == "PUMPS" && $2 == "&") print "PMP "$4" "$5
      if ($1 == "HEAT" && $2 == "REJECT") print "TWR "$3" "$4
      if ($1 == "DOMHOT" && $2 == "WATER") print "DHW "$3" "$4
      if ($1 == "TOTAL") ipr = 0
    }
}
{prevline = lastline}
{lastline = $0}


----- Original Message ----- 
From: "Jeff Haberl" <jeffhaberl at tees.tamus.edu>
To: <bldg-sim at gard.com>
Sent: Monday, October 10, 2005 6:53 AM
Subject: [bldg-sim] tools/software for extracting specific data/info f rom 
DOE-2.2 output file


> AWK works extremely well. You can get a shareware copy GAWK from Gnu ware.
>
> Jeff
> BB 8=!  8=)  :=)  8=)  ;=)  8=)  8=(  8=)  :=')  8=)  8=)  8=? BB
>
> Jeff S. Haberl, Ph.D., 
> P.E.............................jhaberl at esl.tamu.edu
>
> Professor......................................................Office Ph: 
> 979-845-6507
>
> Department of Architecture.......................Lab Ph: 979-845-6065
>
> Energy Systems Laboratory.......................FAX: 979-862-2457
>
> Texas A&M University..............................77843-3581
>
> College Station, Texas, USA.......................URL: www-esl.tamu.edu
>
> BB 8=/  8=)  :=)  8=)  ;=)  8=)  8=()  8=) 8=?  8=)  8=)  8= BB
>
>
> -----Original Message-----
> From: bldg-sim at gard.com <bldg-sim at gard.com>
> To: bldg-sim at gard.com <bldg-sim at gard.com>
> Sent: Mon Oct 10 05:27:09 2005
> Subject: [bldg-sim] tools/software for extracting specific data/info f rom 
> DOE-2.2 output file
>
> If DOE outputs a text file then you can't beat good ol' vim. True, it's a 
> pain to learn with its arcane input and command modes. But, you can get a 
> nice coffee mug from www.geekcheat.com with all the more useful commands.
>
> A windows port of vim is available as charityware from www.gvim.org
>
>
> ________________________________
>
> From: bldg-sim at gard.com [mailto:bldg-sim at gard.com] On Behalf Of Paul 
> Erickson
> Sent: 07 October 2005 18:52
> To: bldg-sim at gard.com
> Subject: [bldg-sim] tools/software for extracting specific data/info from 
> DOE-2.2 output file
>
>
>
> Is anyone aware of a software tool/product or another means by which to 
> easily extract/parse information found in the DOE-2 output/sim file?  The 
> e-QUEST-produced reports are helpful for summing up the results, but I 
> would like to have quicker access to other information for 
> calibrating/verifying/questioning my models.  For instance, it'd be great 
> to extract # of hours underheated or cooled, or perhaps I'd like to 
> extract the DOE-2 -sized cfm or capacity values.  With a lot of 
> zones/systems this becomes a tedious task to deal with manually.
>
> Any suggestions for a good method of doing this?  I know some have written 
> VBA to this end, but is that limited in flexibility or easily adaptable to 
> all models (i.e. changing # of rooms affects line # in output file)?  Any 
> help would be much appreciated.
>
> Regards,
>
> Paul Erickson
>
>
> =====================================================You received this 
> e-mail because you are subscribed
> to the BLDG-SIM at GARD.COM mailing list.  To unsubscribe
> from this mailing list send a blank message to
> BLDG-SIM-UNSUBSCRIBE at GARD.COM
>
>
>
> The contents of this email are confidential to
> the intended recipient at the email address to
> which it has been addressed and do not give rise
> to any binding legal obligation upon Halcrow
> Group Limited unless subsequently confirmed on
> headed business notepaper sent by fax, letter
> or as an email attachment. It may contain
> confidential and/or privileged material and may
> not be disclosed to or used by anyone other
> than this addressee, nor may it be copied in
> any way. If you are not the intended recipient,
> please email the sender immediately by replying
> to this message and delete the material from
> your system.
>
>
>
> ======================================================
> You received this e-mail because you are subscribed
> to the BLDG-SIM at GARD.COM mailing list.  To unsubscribe
> from this mailing list send a blank message to
> BLDG-SIM-UNSUBSCRIBE at GARD.COM
>
> 


======================================================
You received this e-mail because you are subscribed 
to the BLDG-SIM at GARD.COM mailing list.  To unsubscribe 
from this mailing list send a blank message to 
BLDG-SIM-UNSUBSCRIBE at GARD.COM



More information about the Bldg-sim mailing list