Hi, I need guidance for converting hourly meteorological data into a specific file format Formatted Text Delimited (*.prn) which is acceptable in the glacier model. I have developed one file in R entitled "TPR-01.prn" code attached in this email. However, it is not similar to what I am trying to develop ( origonal.prn ). Moreover, I also need to place 15 blank rows because glacier model starts to read data from the 18th row. Kindly find data for my case from following link:
https://drive.google.com/drive/folders/1gkgIUMEHTrxUuhj5CkpmJ1MRqH1t5KYt?usp=sharing
> dataset <- read.xlsx("test.xlsx",sheet = 2)
> len <- seq(1:17)
> i = 6
> for (i in 6:length(len)) {
> db <- dataset[,c(1:5,i)]
> add
> write.table(db,"TPR-01.prn", sep=paste(rep(" ",6), collapse=""), row.names=F, quote=F)
> }