I have four files each contain daily station data.
- file 1: prec
- file 2: minT
- file 3: maxT
- file 4: wind
Here prec, minT, maxT and wind are files that store values of prec, minT, maxT and wind for stations 1 through n.
I want to store the data for each station like:
for station 1: prec minT maxT wind
station 2: prec minT maxT wind
.
.
.
.
station n: prec minT maxT wind
EDIT #1
My four data fies look like as follows:
Prec
1 2 3 4 5 6 7 8
0 0 0 0 0 0 0 0
0.254 0.254 0.254 0.254 0.254 0.254 0.254 0.254
0 0 0 0 0 0 0 0
Tmin
1 2 3 4 5 6 7 8
-23.349 -23.339 -23.327 -23.316 -23.303 -23.291 -23.278 -23.266
-23.682 -23.683 -23.685 -23.687 -23.689 -23.692 -23.695 -23.698
-24.302 -24.301 -24.3 -24.299 -24.299 -24.299 -24.3 -24.302
Tmax
1 2 3 4 5 6 7 8
-17.087 -17.082 -17.077 -17.072 -17.066 -17.06 -17.053 -17.046
-20.082 -20.095 -20.109 -20.124 -20.14 -20.157 -20.174 -20.191
-20.48 -20.481 -20.483 -20.485 -20.486 -20.488 -20.489 -20.49
wind
1 2 3 4 5 6 7 8
0 0 0 0 0 0 0 0
1.778 1.778 1.778 1.778 1.778 1.778 1.778 1.778
1.652 1.653 1.654 1.654 1.655 1.656 1.657 1.658
I want to format the data file for each point it's named with (that is for points 1 to 8) as below:
1
0 -23.349 -17.087 0
0.254 -23.682 -20.082 0
0 -24.302 -20.48 1.778
2
0 -23.339 -17.082 0
0.254 -23.683 -20.095 0
0 -24.301 -20.481 1.778
...and so on... to n.
Where the columns in each file would be: nprec, nTmin, nTmax, and nwind.