Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

CONTAM Weather File Creator 2.0

Web Application

https://pages.nist.gov/CONTAM-apps/webapps/WeatherTool/index.htm

    Use the CONTAM Weather File Creator to convert EnergyPlus weather (EPW) files to CONTAM weather (WTH) files that can be used for transient CONTAM simulations. EPW files can be found on the US Department of Energy's web site for Energy Plus. See the CONTAM User Guide for more information related to WTH files.

    Version 2.0 - released October 14, 2021:
    • Silverlight is no longer required.
    • Command line tool available for Windows. 
      You can download this Zip file (CONTAM_EPWtoWTH_v2.0.zip) that contains the Windows command-line executable version of the tool as well as the installer for the Visual C++ redistributable required to run the command-line program.

    CONTAM Weather File Creator - User Guide

    The CONTAM Weather File Creator is a tool to convert an EnergyPlus Weather File (EPW) to a CONTAM Weather File (WTH).  The tool has two forms which are a Web Application with a link provided above and a Windows command-line executable.

    Web Application

    The web application requires the following EPW Inputs and CONTAM Weather File Options to be defined by the user.

    EPW Inputs

    1. EPW File – This is the EPW file to convert.

    CONTAM Weather File Options

    1. Start Date and End Date – Select the dates, i.e., Month and Day to include in the WTH file.  These dates must be included in the EPW file, and the End Date bust be the same as or after the Start Date.
    2. Use Daylight Savings Time (DST) – Check this box to indicate that daylight savings time is be used with the WTH file. 
    3. Start DST Date and End DST Date – Select the date to start and end DST. These two inputs are only used if the Use DST box is checked.
    4. First Day of the Year – Select which day of the week January 1st will be in the WTH file. This will set the Day Type fields in the WTH file starting on this day and cycling through the seven days of the week where Day Type values from 1 through 7 corresponds to Sunday through Saturday, respectively.
    5. CONTAM Weather Description – Enter the desired description for the WTH file.  If this is left empty then the first line of the EPW file will be used as the description.
    6. CONTAM Weather File Name – Enter the name of the WTH file that will be created.  A file extension is NOT required since a WTH file extension will be automatically appended to the filename.
    7. CONTAM Special Days – Define a list of days in the year which are to utilize Day Types other than the default values cycling between 1 and 7.  CONTAM allows for 5 additional Day Types for a total of 12 Day Types corresponding to the 12 Day Schedules defined with each CONTAM Week Schedule.  

    Web Application Functions

    The web application includes the following two functions. Upon successful completion of either function, you can utilize the link provided in the Download Results File section of the Web Application to obtain the resultant output file.

    1. Convert EPW File – This function converts an EPW file to a WTH file.
    2. Create JSON Input File – This function creates a JSON file from the CONTAM Weather File Options that can be used as a config file for the command-line executable version of the program.

    Executable Program

    The executable form of the tool is a 64-bit Windows command-line program that converts an EPW file to a WTH file but does not allow for creation of the JSON file. It comes with the required Visual C++ redistributable that needs to be installed.

    Command-Line Parameters

    The command-line for the Windows executable has three parameters defined below. These parameter can be provided in any order.  The path to each file can be either absolute or relative to the current working directory. If any path contains spaces then it must be enclosed in quotes.

    1. EPW file – The path to the EnergyPlus Weather (EPW) file including the file extension.  It can be an absolute path or it can be relative to the current working directory. 
    2. WTH file – This is the path of the CONTAM Weather (WTH) file to create. If one is not given the path of the EnergyPlus Weather (EPW) file will be used with a WTH extension.
    3. Config file – The path to the config file.  If no config file is provided then the whole EPW file is converted with no special days or daylight savings and the first day of the year being on Sunday. This file must have either a JSON or CNF extension to indicate which file format is being utilized as presented below.
    Example command line:

    $>CONTAM_EPWtoWTH myWeather.epw myWeather.wth config.json

    Config File

    The Config file is used to provide the Executable Program with the same CONTAM Weather File Options as specified for Web Application.  The Web Application can be used to create a config file for the Executable Program.  The Config file is a JavaScript Object Notation (JSON) format file which defines one object that contains members corresponding to the inputs of the Web Application. 

    Example config file

    {
      "description": "EPW file from XZY start 1/1 end 12/31",
      "startdate": "1/1",
      "enddate": "12/31",
      "usedst": 0,
      "dststart": "3/9",
      "dstend": "11/9",
      "specialdays": [{"date": "3/4", "daytype": 8}, {"date": "9/8", "daytype": 10}],
      "firstdoy": 1

    }

    The following list indicates which Web Application inputs correspond to the members of the JSON object and the format of the input.

    • startdate and enddateStart Date and End Date. Each member requires a single string with the following format specifying the month and day:  “mm/dd”.
    • usedstUse Daylight Savings Time (DST).  A single value: 0 or 1, where 0 = do not use DST and 1 = use DST.
    • dststart and dstendStart DST Date and Start DST Date. Each member requires a single string with the following format specifying the month and day:  “mm/dd”. They are only needed if usedst = 1, otherwise set them to empty values, i.e., "dststart" : "", and "dstend" : "",
    • specialdaysCONTAM Special Days. This is an array indicated by the square brackets, []. Each item in the array consists of a date and corresponding daytype contained within a pair of curly brackets {}.
    • firstdoyFirst Day of the Year.
    Created March 9, 2018, Updated October 15, 2021