Monthly Archives: March 2017

Protected: FRST590 Term Project: Regional Analysis

This content is password protected. To view it please enter your password below:

Enter your password to view comments.

Filed under ScriptingMemo

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