diff --git a/inst/doc/plot_timeseries.R b/inst/doc/plot_timeseries.R index a536733d4c3ad2d3e9646f71f1c30111057c5036..2d36397f26315323a7f9af122bb17630c6807b30 100755 --- a/inst/doc/plot_timeseries.R +++ b/inst/doc/plot_timeseries.R @@ -10,7 +10,7 @@ comprms <- TRUE compspread <- TRUE plotano <- TRUE -var <- args[1] # siextent/siarea/sivol/tos/tas/pr/ohcsum/ohcsum0-17/ohcsum18-22/ohcsum23-46/vsftmyz +var <- args[1] # siextent/siarea/sivol/tos/tas/pr/ohcsum/ohcsum1-17/ohcsum18-22/ohcsum23-46/vsftmyz pole <- args[2] # N/S only for siarea/siextent nltimemax <- 124 # number of leadtimes max in the experiments (in months) nltimeout <- 60 # number of leadtimes to postprocess(in months) @@ -28,14 +28,14 @@ obs <- switch(var, 'siarea' = c('hadisst_v1.1'), 'siextent' = c('hadisst_v1.1'), 'hadisst_v1.1'), 'pr' = c('cru_v3.0', 'gpcc1x1_v6'), 'ohcsum' = c('nemovar_system4'), 'ohcsum18-22' = c('nemovar_system4'), 'ohcsum23-46' = c('nemovar_system4'), - 'ohcsum0-17' = c('nemovar_system4'), 'vsftmyz' = c('nemovar_system4'), + 'ohcsum1-17' = c('nemovar_system4'), 'vsftmyz' = c('nemovar_system4'), 'sivol' = 'piomas') toptitle2 <- switch(var, 'siarea' = "sea ice area", 'siextent' = "sea ice extent", 'sivol' = "sea ice volume", 'tas' = "global T2m", 'tos' = "global SST (60S-65N)", 'pr' = 'land precipitation (60S-65N)', 'ohcsum' = "global ocean heat content", - 'ohcsum0-17' = 'global 800m-bottom ocean heat content', + 'ohcsum1-17' = 'global 800m-bottom ocean heat content', 'ohcsum18-22' = 'global 350m-800m ocean heat content', 'ohcsum23-46' = 'global 0-350m ocean heat content', 'vsftmyz' = 'Atlantic Overturning Streamfunction (40-55N, 1-2km)' @@ -43,7 +43,7 @@ toptitle2 <- switch(var, 'siarea' = "sea ice area", 'siextent' = "sea ice extent ytitle1 <- switch(var, 'siarea' = "Millions km2", 'siextent' = "Millions km2", 'sivol' = 'Thousands km3', 'tas' = 'K', 'tos' = 'K', 'pr' = 'mm/day', 'ohcsum' = '10e22 Joules', - 'ohcsum0-17' = '10e22 Joules', 'ohcsum18-22' = '10e22 Joules', + 'ohcsum1-17' = '10e22 Joules', 'ohcsum18-22' = '10e22 Joules', 'ohcsum23-46' = '10e22 Joules', 'vsftmyz' = 'Sv') syears <- seq(year0, yearf, intsdate) @@ -138,7 +138,7 @@ if (file.exists(paste(savename, '.sav', sep = ''))) { toto1$mod <- toto1$mod * 1000 * 3600 * 24 toto1$obs <- toto1$obs * 1000 * 3600 * 24 } - if (var == 'ohcsum' | var == 'ohcsum0-17' | var == 'ohcsum18-22' | var == 'ohcsum23-46') { + if (var == 'ohcsum' | var == 'ohcsum1-17' | var == 'ohcsum18-22' | var == 'ohcsum23-46') { toto1$mod <- toto1$mod / 1e22 toto1$obs <- toto1$obs / 1e22 }