UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
259 stars 385 forks source link

How to make flux files without the headers? #858

Open LSRathore opened 5 years ago

LSRathore commented 5 years ago

Bug Reports

How can I make the flux files generated using model all header free, like the same in vic's earlier versions? I need the files without header because the routing model in fortran doesn't accept headers in flux files. Any suggestions?

Feature Requests

jschap1 commented 5 years ago

I just wrote a script to remove the headers from the flux files. Here it is in Matlab, but you could write something similar in another language.

orignames = dir('fluxes*');
ncells = length(orignames);
header_rows = 3;
for k=1:ncells
    data = dlmread(orignames(k).name, '\t', header_rows, 0);
    dlmwrite(fullfile(orignames(k).name), data, ' ');
end