Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ronnie Leeper
MMTS-BiasBudget
Commits
bf767202
Commit
bf767202
authored
Mar 25, 2016
by
Ronnie Leeper
Browse files
Output datafile and removed duplicated columns
parent
238dabf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
bf767202
+.DS_Store
+*.RData
+*.Rhistory
+*.R*
Scripts/processTowerData.R
View file @
bf767202
...
...
@@ -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 no
t
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 ##
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment