vic package

Submodules

vic.output module

Module containing output templates for VIC.

vic.output.template(varlist)[source]

Returns string of VIC output template.

vic.output.variableGroup(args)[source]

Returns new list of variables by expanding variable that corresponds to group name.

vic.state module

Module for the VIC model state functions

vic.state.readSnowbands(filename)[source]

Read VIC elevation bands file.

vic.state.readStateFile(filename)[source]

Reads VIC initial state file.

vic.state.readVariable(model, state, alat, alon, veg, bands, nlayer, varname)[source]

Reads variable from VIC initial state.

vic.state.readVegetation(filename)[source]

Reads VIC vegetation file.

vic.state.updateVariable(model, state, x, xa, alat, alon, agid, veg, bands, nlayer, varname)[source]

Updates variable in VIC initial state.

vic.state.writeStateFile(filename, state, header)[source]

Write state file after updating variable.

vic.vic module

Class definition for the VIC model interface

class vic.vic.VIC(path, dbname, resolution, startyear, startmonth, startday, endyear, endmonth, endday, name='', savestate='', nlayer=3)[source]
createIndexTable(dataset)[source]

Creates index table from raster row, column, and tile for each grid cell.

getForcings(options)[source]

Get meteorological forcings from database.

getOutputStruct(globalfile)[source]

Creates a dictionary with output variable-file pairs.

paramFromDB()[source]

Retrieve file parameters from database.

readOutput(args)[source]

Reads VIC output for selected variables.

run(vicexec)[source]

Run VIC model.

save(saveto, args, initialize=True, skipsave=0)[source]

Reads and saves selected output data variables into the database or a user-defined directory.

stateFile()[source]

Retrieve state file path from database.

writeForcings(prec, tmax, tmin, wind, lai=None)[source]

Write VIC meteorological forcing data files.

writeParamFile(nodes=3, time_step=24, save_state='', init_state=False, state_file='', save_state_to_db=False)[source]

Write VIC global parameter file for current simulation.

writeSoilFile(shapefile)[source]

Write soil parameter file for current simulation based on basin shapefile.

writeToDB(data, dates, tablename, initialize, ensemble=False, skipsave=0)[source]

Writes output data into database.

Module contents

Definition for VIC package.