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
euporias
biascorrection
Commits
9d055895
Commit
9d055895
authored
Feb 08, 2016
by
Franssen, Wietse
Browse files
reshuffeled files
parent
79b54cdc
Changes
13
Hide whitespace changes
Inline
Side-by-side
SCRIPTS/
b
iascheck.R
→
SCRIPTS/
doB
iascheck.R
View file @
9d055895
File moved
SCRIPTS/
b
iascorrection.R
→
SCRIPTS/
doB
iascorrection.R
View file @
9d055895
rm
(
list
=
ls
())
library
(
ecomsUDG.Raccess
)
source
(
file
=
"./infoGeneral.R"
)
source
(
file
=
"./
functions/
infoGeneral.R"
)
submitscript
<-
FALSE
...
...
SCRIPTS/downloadSeas15.R
→
SCRIPTS/do
Do
wnloadSeas15.R
View file @
9d055895
...
...
@@ -3,9 +3,9 @@ library(fields) # e.g: using the fields library
library
(
abind
)
library
(
ncdf4
)
library
(
ecomsUDG.Raccess
)
source
(
file
=
"./infoGeneral.R"
)
source
(
file
=
"./functionsGeneral.R"
)
source
(
file
=
"./functionR2Netcdf.R"
)
source
(
file
=
"./
functions/
infoGeneral.R"
)
source
(
file
=
"./
functions/
functionsGeneral.R"
)
source
(
file
=
"./
functions/
functionR2Netcdf.R"
)
loginECOMS_UDG
(
username
=
"wietsefranssen"
,
password
=
"ECOMS"
)
...
...
@@ -15,13 +15,13 @@ if (submitscript) {
members
<-
c
(
1
:
15
)
# members <- c(1:1)
targetMonths
<-
c
(
1
:
12
)
# targetMonths <- c(1,3,11)
# targetMonths <- c(1:2)
# targetMonths <- c(1)
targetYears
<-
c
(
1981
:
2011
)
#
targetYears <- c(1981:1982)
targetYears
<-
c
(
1981
:
1982
)
leadMonths
<-
c
(
X
:
X
)
locName
<-
'X'
outPath
<-
"./testData/newDownload"
# outPath<-"../DATA/System4_seasonal_15/0.75deg/EU_noBC"
outPath
<-
sprintf
(
"../DATA/System4_seasonal_15/0.75deg/%s_noBC"
,
locName
)
}
else
{
members
<-
c
(
1
,
2
)
targetMonths
<-
c
(
1
:
2
)
...
...
@@ -32,22 +32,15 @@ if (submitscript) {
# locName<-"EU"
outPath
<-
"./testData/noBC/"
outPath
<-
"./testData/newDownload"
outPath
<-
"/home/wietse/TODO/biascorrection/SCRIPTS/testData/newDownload"
}
variables
<-
names
(
variableInfo
)
variables
<-
c
(
"pr"
,
"rsds"
,
"rlds"
)
variables
<-
c
(
"sfcWind"
,
"psl"
,
"huss"
,
"tas"
,
"tasmin"
,
"tasmax"
)
#variables<-c("tas")
#variables<-c("rsds", "rlds")
#variables<-c( "rsds" )
variables
<-
c
(
"tas"
,
"rsds"
,
"rlds"
,
"pr"
)
dir.create
(
outPath
,
recursive
=
TRUE
,
showWarnings
=
FALSE
)
# print(getInitInfo(targetYear = 2010, targetMonth = 6, leadMonth = 6))
for
(
variableName
in
variables
)
{
for
(
targetMonth
in
targetMonths
)
{
for
(
leadMonth
in
leadMonths
)
{
...
...
@@ -74,8 +67,8 @@ for (variableName in variables) {
RData
<-
loadECOMS
(
dataset
=
"System4_seasonal_15"
,
var
=
variableNameECOMS
,
members
=
members
,
lonLim
=
c
(
locationInfo
[[
locName
]]
$
lonmin
,
locationInfo
[[
locName
]]
$
lonmax
),
latLim
=
c
(
locationInfo
[[
locName
]]
$
latmin
,
locationInfo
[[
locName
]]
$
latmax
),
lonLim
=
c
(
locationInfo
$
res0.75
[[
locName
]]
$
lonmin
,
locationInfo
$
res0.75
[[
locName
]]
$
lonmax
),
latLim
=
c
(
locationInfo
$
res0.75
[[
locName
]]
$
latmin
,
locationInfo
$
res0.75
[[
locName
]]
$
latmax
),
season
=
targetMonth
,
years
=
availableTargetYears
,
leadMonth
=
leadMonth
,
...
...
@@ -96,7 +89,7 @@ for (variableName in variables) {
attr
(
RData
,
"contact"
)
<-
"Wietse Franssen (wietse.franssen@wur.nl)"
save
(
file
=
sprintf
(
"%s.RData"
,
oPrefix
),
RData
)
R2Netcdf
(
sprintf
(
"%s.nc4"
,
oPrefix
),
RData
)
#
R2Netcdf(sprintf("%s.nc4",oPrefix), RData)
}
}
}
SCRIPTS/
r
eformat.R
→
SCRIPTS/
doR
eformat.R
View file @
9d055895
File moved
SCRIPTS/functionConvert.R
→
SCRIPTS/
functions/
functionConvert.R
View file @
9d055895
File moved
SCRIPTS/functionDownload.R
→
SCRIPTS/
functions/
functionDownload.R
View file @
9d055895
...
...
@@ -2,9 +2,9 @@ library(fields) # e.g: using the fields library
library
(
abind
)
library
(
ncdf4
)
library
(
ecomsUDG.Raccess
)
source
(
file
=
"./infoGeneral.R"
)
source
(
file
=
"./functionsGeneral.R"
)
source
(
file
=
"./functionR2Netcdf.R"
)
source
(
file
=
"./
functions/
infoGeneral.R"
)
source
(
file
=
"./
functions/
functionsGeneral.R"
)
source
(
file
=
"./
functions/
functionR2Netcdf.R"
)
loginECOMS_UDG
(
username
=
"wietsefranssen"
,
password
=
"ECOMS"
)
...
...
SCRIPTS/functionNetcdf2R.R
→
SCRIPTS/
functions/
functionNetcdf2R.R
View file @
9d055895
File moved
SCRIPTS/functionR2Netcdf.R
→
SCRIPTS/
functions/
functionR2Netcdf.R
View file @
9d055895
File moved
SCRIPTS/functionReformat.R
→
SCRIPTS/
functions/
functionReformat.R
View file @
9d055895
rm
(
list
=
ls
())
source
(
file
=
"./functionsGeneral.R"
)
source
(
file
=
"./
functions/
functionsGeneral.R"
)
reformat2Bias
<-
function
(
members
,
initYears
,
initMonth
,
varName
,
locName
,
iFile
=
"./forcing_seas15_GHA_ref__E<MEMBERS>_<YEARS>_01.RData"
)
{
...
...
SCRIPTS/functionsGeneral.R
→
SCRIPTS/
functions/
functionsGeneral.R
View file @
9d055895
File moved
SCRIPTS/infoGeneral.R
→
SCRIPTS/
functions/
infoGeneral.R
View file @
9d055895
File moved
SCRIPTS/jobScript
d
ownloadSeas15
→
SCRIPTS/jobScript
D
ownloadSeas15
View file @
9d055895
...
...
@@ -17,6 +17,6 @@ module load R/3.2.0
#
# run current job
echo
'******** R-data Download...'
Rscript ./tmpScripts/downloadSeas15_<location>_leadMonth<leadMonth>.R
Rscript ./tmpScripts/do
Do
wnloadSeas15_<location>_leadMonth<leadMonth>.R
date
SCRIPTS/submit_downloadSeas15.sh
View file @
9d055895
...
...
@@ -8,10 +8,10 @@ for iLeadMonth in $(seq -f "%1g" 0 6); do
echo
"leadMonth:
$iLeadMonth
"
sed
-e
"s|<leadMonth>|
$iLeadMonth
|g"
\
-e
"s|<location>|
$location
|g"
\
jobScript
d
ownloadSeas15
>
$tmpScripts
"/jobScript
d
ownloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
jobScript
D
ownloadSeas15
>
$tmpScripts
"/jobScript
D
ownloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
sed
-e
"s|submitscript <- FALSE|submitscript <- TRUE|g"
\
-e
"s|leadMonths <- c(X:X)|leadMonths <- c(
$iLeadMonth
:
$iLeadMonth
)|g"
\
-e
"s|locName <- 'X'|locName <- '
$location
'|g"
\
downloadSeas15.R
>
$tmpScripts
"/downloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
".R"
sbatch
"
$tmpScripts
/jobScript
d
ownloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
do
Do
wnloadSeas15.R
>
$tmpScripts
"/do
Do
wnloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
".R"
sbatch
"
$tmpScripts
/jobScript
D
ownloadSeas15_"
$location
"_leadMonth"
$iLeadMonth
done
Write
Preview
Supports
Markdown
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