Guest User

Untitled

a guest
Dec 7th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. ################################################################################
  2. # Very Sketchy version of clone reference runs
  3.  
  4. library(PEcAn.benchmark)
  5.  
  6. bety <- betyConnect("/home/carya/pecan/web/config.php")
  7.  
  8. php.config <- "/home/carya/pecan/web/config.php"
  9.  
  10. test <- tbl(bety,"reference_runs") %>% filter(id == 1000000087) %>% collect
  11.  
  12. # Set reference run id
  13. # Eliandro's runs are
  14. # 1000000073 1000000074 1000000075 1000000076
  15. # 1000000077 1000000078 1000000079 1000000080
  16. # 1000000081 1000000082 1000000083 1000000084
  17. # 1000000085 1000000086 1000000086 1000000087
  18.  
  19. reference_run_id <- 1000000073
  20.  
  21. # Create new settings list
  22. settings <- list()
  23.  
  24.  
  25. # Add info and databaes
  26. config.list <- PEcAn.utils::read_web_config("/home/carya/pecan/web/config.php")
  27.  
  28. settings$info <- list(userid = -1) # This is my user id. I have no idea how to get people to log in to their accounts through the web interface and right now the benchmarking code has sections dependent on user id - I will fix this.
  29. settings$database <- list(
  30. bety = list(
  31. user = config.list$db_bety_username,
  32. password = config.list$db_bety_password,
  33. host = config.list$db_bety_hostname,
  34. dbname = config.list$db_bety_database,
  35. driver = "PostgreSQL",# config.list$db_bety_type
  36. write = TRUE
  37. ),
  38. dbfiles = config.list$dbfiles_folder
  39. )
  40.  
  41. # Add ref run id under benchmarking tag
  42.  
  43. settings$benchmarking <- list(
  44. reference_run_id = reference_run_id
  45. )
  46.  
  47. # read_settings_BRR imports all settings info from the database
  48. settings <- read_settings_BRR(settings)
  49.  
  50. settings$outdir <- "/home/carya/output/refruns"
  51. settings$host$name <- "localhost"
  52. settings$pfts$pft$name
  53. settings$pfts$pft$outdir <- file.path("/home/carya/output/refruns/pft",settings$pfts$pft$name)
  54. settings$host$rundir
  55. settings$host$outdir
  56. settings$rundir
  57. settings$modeloutdir
  58. settings$benchmarking <- NULL
  59. str(settings)
Add Comment
Please, Sign In to add comment