Commit 9d055895 authored by Franssen, Wietse's avatar Franssen, Wietse
Browse files

reshuffeled files

parent 79b54cdc
rm(list=ls())
library(ecomsUDG.Raccess)
source(file = "./infoGeneral.R")
source(file = "./functions/infoGeneral.R")
submitscript <- FALSE
......
......@@ -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)
}
}
}
......@@ -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")
......
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") {
......
......@@ -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/doDownloadSeas15_<location>_leadMonth<leadMonth>.R
date
......@@ -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" \
jobScriptdownloadSeas15 > $tmpScripts"/jobScriptdownloadSeas15_"$location"_leadMonth"$iLeadMonth
jobScriptDownloadSeas15 > $tmpScripts"/jobScriptDownloadSeas15_"$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/jobScriptdownloadSeas15_"$location"_leadMonth"$iLeadMonth
doDownloadSeas15.R > $tmpScripts"/doDownloadSeas15_"$location"_leadMonth"$iLeadMonth".R"
sbatch "$tmpScripts/jobScriptDownloadSeas15_"$location"_leadMonth"$iLeadMonth
done
Supports Markdown
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