You are here

npt file

Dear All:

I am a new user of W2 (1 week). For the input data, I just wonder how could I got the .npt file from .csv file? I changed the suffix but it doesn't sense for the model. Could anayone tell me which software/method you used to get the npt file?

Many thanks

Wang Kang

Forums: 

Hey there, You cannot simply swap suffixes from .csv format to .npt. W2 is written in fortran, and as such, uses a common length interpretation for reading in data (or something like that). Essentially, instead of using commas, W2 denotes a new column by a strict use of spacing. In every part of W2 that I have used, the spacing is always 8 characters. Read through the beginning of "Input Files" in the W2 manual for more information on this. My two recommendations are to either 1: Check through the W2 manual for using comma delineated formatting. I thought I recalled an option existing to allow certain input datasets to be CSV instead of the strict 8 character spacing. 2: If you are like me and are already too far down the rabbit hole, I use a package on R called "gdata". It has a function called "write.fwf" which outputs a dataframe and allows you to specify the alignment "right" and the number of spaces in each column "8". That has solved my problems for the most part. I believe this can also be done in excel, but I dont know how.