How to use CFA (Consolidated Frequency Analysis) with HYDAT data

1. Installing CFA on modern computers requires a DOS emulator because CFA only runs on DOS which has been removed on new OS since Windows XP. Watch this Youtube video if you need help:


2. Environment Canada (EC) used to publish it’s hydrologic data through distributing CD-ROM which contains the HYDAT dataset which can be directly read into CFA. However, since I don’t know when, EC has been publishing HYDAT data online only through downloadable database file. Therefore, it will be necessary to convert the database file into ASCII files for CFA (next step)

Before we convert the files into ASCII, it’s important to talk about the use of EC Data Explorer as a data screening tool:


All the stream gauges are plotted on a map and individual stream gauges can be selected on the map


Stream gauge data can be plotted as time series directly with few clicks. Also the station information/meta-data are extremely useful in understanding the watershed it monitors. Make sure you check the data symbols (sometimes a value is estimated due to stream gauge failure etc.)

Note the HYDAT data file comes with the EC Data Explorer installation file could be outdated and it’s recommended that you download the newest HYDAT data file and replace the old one in the EC Data Explorer’s folder.


3. As mentioned, new HYDAT database file cannot be read into CFA without some file conversion.

I have used R to read the HYDAT database file and write the ASCII files that can be imported into CFA. The script can be found here:

However, if you don’t want to deal with R, I have converted it for you already using the newest HYDATA dataset (Jan 2017): Hydat_v2007Jan_CFA (Just download and unzip)

The use of CFA with ASCII files is in this video:

Good luck!


Filed under ScriptingMemo

2 Responses to How to use CFA (Consolidated Frequency Analysis) with HYDAT data

  1. Manut

    Excuse me sir, Could you tell me how I can install this program in Window 10?

  2. Harold

    You may want to instead consider using the free CumFreq statistical program. You can download it free here:
    CumFreq includes a LOT of statistical distributions. However, you may be particularly interested in using GEV, Gumbel (standard), Frechet (typical), and Weibull.
    CumFreq allows you to simply copy and paste your annual peaks into the software interface.

Leave a Reply

Your email address will not be published. Required fields are marked *