This page describes a set of programs designed to aggregate VIC model data and parameter files by factors of 2 (e.g. 1/8 -> 1/4 -> 1/2 -> 1 -> 2 degrees). Programs included with this page were developed by Bernt Viggo Matheussen and Keith Cherkauer, comments and questions about the code should be addressed to them.
There are three programs that need to be run for each halving of the forcing data resolution:
All programs discussed on this page are included in the tar file aggregate_vic_files.tar.gz
Usage: make_new_fraction < fraction file >
< fraction file > is the routing fraction file for the current model resolution WITH AN ARC/INFO HEADER.
Output is to stdout.
This program reduces the resolution of the provided routing fraction file by half (e.g. 1/8 -> 1/4 degree). The new fraction file is sent to stdout, and can be redirected to a new file.
WARNING: This program requires that the fraction file have a full ARC/INFO header. Older versions of the routing code did not include the header as part of the file, so check your fraction file and add the header from the direction file if necessary.
Usage: latlong < inputfile >
This program reads an ARC/INFO grid file and returns an 3 column ASCII file (latitude, longitude, and fraction). Run it on the fraction file for both the current resolution and the new resolution. Both column files are needed to run aggregate_forcing_data. Output from the program is to stdout, and can be redirected to a file.
Usage: aggregate_metdata < old fraction xyz > < old fraction data dir > < new fraction xyz > < new fraction data dir > < old resolution > < number of parameters >
This program aggregates the gridded metdata files by a factor of 2 (e.g. 1/8 degree is aggregated to 1/4 degree). It uses the three column ASCII files created by latlong to determine the file names at the old and new resolutions. The program can be run on data files with any number of parameters, as long as each is in a separate column, and is continuous through the data file.
The following variables need to be defined in the source code before compiling:
Usage: make_accumulation < direction file >
This program computes the flow accumulation for each grid cell
based on the given routing direction file. The accumulation
file is output to stdout.
This program reads the current routing model direction file and computes the flow accumulation for each grid cell. The resulting accumulation grid file is output to stdout. Accumulation at the basin outlet should be equal to the number of grid cells within the basin.
Usage: make_new_direction < direction file > < accumulation file >
This program builds a new routing direction file at twice the
resolution (e.g. 1/8 to 1/4) of the provided direction file.
The accumulation file for the current direction file must also
be provided. The new direction file is output to stdout.
This program reads the high resolution direction and accumulation files, and determines the most appropriate drainage direction for each grid cell at the coarser resolution. The new drainage direction is based on the direction of flow from the cell with the highest accumulation (which must also leave the lower resolution cell). If the resulting direction is a diagonal it is checked to see if it should actually be a diagonal, or if it really flow into the neighboring low resolution cell. The new direction file is output to stdout.
Usage: aggregate_soil_datais the high resolution ARC/INFO grid. is an ARC/INFO grid mask file at the lower resolution. This program aggregates the high resolution ARCINFO file to the resolution of the low resolution mask file (only aggregates by a factor of 2, e.g. 1/8 to 1/4, 1/4 to 1/2) and outputs a new ARCINFO grid file to .
This program aggregates ARCINFO ASCII grid files (typically containing soil parameters) by a factor of 2 (e.g. 1/8 to 1/4, 1/4 to 1/2). Either the direction file or the fraction file generated above can be used as the low resolution mask file.
Usage: aggregate_veg_param<# root zones> This program aggregates the given vegetation parameter file by a factor of 2 (e.g. 1/8 to 1/4, 1/4 to 1/2, etc.). is the vegetation parameter file for the high resolution model simualtion. is an ARCINFO ASCII grid cell number file for the high resolution model basin. is the vegetation parameter file for the low resolution (output) model simualtion. is an ARCINFO ASCII grid cell number file for the low resolution model basin.
This program