Commit bf767202 authored by Ronnie Leeper's avatar Ronnie Leeper
Browse files

Output datafile and removed duplicated columns

parent 238dabf0
+.DS_Store
+*.RData
+*.Rhistory
+*.R*
......@@ -36,12 +36,12 @@
# 12.10.2015 Update:
# Implenmented a routine to find the index (rowID) of the last daily max and min occurance and extract wind and solar
# moving averages at that specific row. This will give us wind and solar observations (hourly average) at time of maximum and minimum.
# These values were only extracted at time of Nimbus max and min. Also set PRT and Nimbus observations to NA if either were no available.
# These values were only extracted at time of Nimbus max and min. Also set PRT and Nimbus observations to NA if either were not available.
#This script is archieved via gitlab at this URL: git@k3.cicsnc.org:ronnieleeper/MMTS-BiasBudget.git
#Directory Setup
SystemDir = "/Users/ronnieleeper/Documents/"
SystemDir = "/Users/ronnieleeper/Documents/"
ProjectDir = "Research/MMTS-BiasBudget/"
DataDir = "Data/ATDD-TowerData/"
OutputDir = "Data/"
......@@ -204,6 +204,10 @@ for (tower in towers){
dailyD = cbind(tDdailyMx,tDdailyMn)
dailyHdrs = colnames(dailyD)
# Remove duplicate columns
dailyD = dailyD[,-c(which(duplicated(dailyHdrs)==T))]
dailyHdrs = colnames(dailyHdrs)
# Find wind and solar radiation values at time (last if more than one) daily extremes
# Create unique id consisting of date & temperature (a seach column)
data[,length(data)+1] = paste(data[,dailyID],data[,mmtsNimbus],sep="")
......@@ -273,6 +277,10 @@ for (tower in towers){
}
}
#Output dailyD results
filename = paste(SystemDir,ProjectDir,DataDir,"DailyObs-tower",tower,".csv",sep="")
write.table(dailyD, file=filename, row.names=F, na="NA",sep=",")
#TODO: REMOVE
print("Completed Tower processing!!")
## Preliminary anlaysis ##
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment