| 1 | - content - |
|---|
| 2 | |
|---|
| 3 | htune_case_setup.R htune_EmulatingSCM.R htune_ncdf2Rdata.R param2R.sh |
|---|
| 4 | htune_convertDesign.R htune_metric.R htune_plot.R Readme |
|---|
| 5 | serie_LMDZ.sh |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | - Description - |
|---|
| 9 | |
|---|
| 10 | Main programs : |
|---|
| 11 | =============== |
|---|
| 12 | |
|---|
| 13 | Step 0 : |
|---|
| 14 | param2R.sh : define list of parameters and there range |
|---|
| 15 | create the R script ModelParam.R |
|---|
| 16 | Usage : ./param2R.sh LHCSIZE NLHC PARAM_FILE |
|---|
| 17 | Ex : ./param2R.sh 30 3 LMDZ/param_cld |
|---|
| 18 | NLHC should be >= 3 |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | Step 1 : htune_convertDesign.R, Automatically run by param2R.sh from version 9 |
|---|
| 22 | creates design for the emulator using ModelParam.R |
|---|
| 23 | outputs : Par1D_Wave1.asc containing the parameter values |
|---|
| 24 | for SCM simulations |
|---|
| 25 | Wave1.RData containing normalized parameter values for |
|---|
| 26 | the SCM |
|---|
| 27 | TBD : create a function that could be called from anywhere to |
|---|
| 28 | transformed normalized to non normalized |
|---|
| 29 | |
|---|
| 30 | Step 2 : serie_LMDZ.sh |
|---|
| 31 | The only model depedant script |
|---|
| 32 | Use : ./serie_LMDZ.sh case1 [case2] |
|---|
| 33 | Run a series of the LMDZ SCM reading the parameters from Par1D_Wave1.asc |
|---|
| 34 | netcdf ouptut files should be put in |
|---|
| 35 | ./WAVE1/[cas] |
|---|
| 36 | with names SCM_1-101.nc given in Par1D_Wave1.asc |
|---|
| 37 | Also put the available LES 1D output files in WAVE1 |
|---|
| 38 | |
|---|
| 39 | TBD : a version for MUSC |
|---|
| 40 | Treat LES independently depending on the case consider ? |
|---|
| 41 | Normalize the case names ? |
|---|
| 42 | |
|---|
| 43 | Step 3 : htune_ncdf2Rdata.R |
|---|
| 44 | i/ Reads results from WAVE1/*nc |
|---|
| 45 | ii/ Plots profiles for all the simulations with function "tout_tracer" from |
|---|
| 46 | htune_plot |
|---|
| 47 | iii/ computes metrics with function get_metric from htune_metric.R |
|---|
| 48 | output files |
|---|
| 49 | Wave1_LES.Rdata : metrics computed on LES |
|---|
| 50 | Wave1_SCM.Rdata : metrics computed on SCM |
|---|
| 51 | Assume that all the files are at an hourly time frequency |
|---|
| 52 | Metrics already available : |
|---|
| 53 | targetvar="theta500" theta 500hPa |
|---|
| 54 | targetvar="zhneb" average height of cloudiness (int z f dz / int f dz) |
|---|
| 55 | TBD : control case_name from outside |
|---|
| 56 | TBD : extend the "tout_tracer" to "tout" |
|---|
| 57 | |
|---|
| 58 | Step 4 : htune_EmulatingSCM.R |
|---|
| 59 | Emulator building reading Wave1_LES.Rdata and Wave1_SCM.Rdata |
|---|
| 60 | Definition and plots of ROY spaces |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | Functions : |
|---|
| 67 | =========== |
|---|
| 68 | htune_case_setup.R : some cases caracteristics for plots |
|---|
| 69 | htune_metric.R : metrics computation |
|---|
| 70 | htune_plot.R : plots |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | Imput from Exeter : |
|---|
| 74 | =================== |
|---|
| 75 | StanEmulateCodeR.R which requires : |
|---|
| 76 | AutoLMcode.R |
|---|
| 77 | CustomPredict.R |
|---|
| 78 | impLayoutplot.R |
|---|
| 79 | JamesDevelopment.R |
|---|
| 80 | DannyDevelopment.R |
|---|
| 81 | MultiWaveHM.R |
|---|
| 82 | MySpeed1const.stan |
|---|
| 83 | PredictSpeed1const.stan |
|---|
| 84 | PredictSpeed2DWconst.stan |
|---|
| 85 | MySpeed1.stan |
|---|
| 86 | PredictSpeed1.stan |
|---|
| 87 | PredictSpeed2DW.stan |
|---|
| 88 | kLHC.R : LHS clever sampling |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | Discussion / conventions : |
|---|
| 92 | ========================== |
|---|
| 93 | |
|---|
| 94 | I propose to use hourly averaged outputs. |
|---|
| 95 | Should work for all the available cases. |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | |
|---|
| 99 | Installation rstudio : |
|---|
| 100 | ====================== |
|---|
| 101 | |
|---|
| 102 | Here is how to install RStudio on Ubuntu 16.04 |
|---|
| 103 | |
|---|
| 104 | sudo apt-get install r-base |
|---|
| 105 | wget https://download1.rstudio.org/rstudio-xenial-1.0.153-amd64.deb |
|---|
| 106 | sudo apt-get install gdebi |
|---|
| 107 | sudo gdebi rstudio-xenial-1.0.153-amd64.deb |
|---|
| 108 | |
|---|
| 109 | then, you should be able to open RStudio by simply using the command: |
|---|
| 110 | rstudio |
|---|
| 111 | |
|---|
| 112 | when you install the supplementary libraries for RStudio on Ubuntu, you will need to install netcdf-bin et libnetcdf-dev, otherwise |
|---|
| 113 | the ncdf4 library won't install correctly |
|---|
| 114 | |
|---|
| 115 | here is the complete list written on the white board for copy pasting: |
|---|
| 116 | |
|---|
| 117 | installed.packages(c("ncdf4","rstan","tensor","Hmisc","lhs","fields","rgl","shape","mco","far","dicekriging","GenSA","mvtnorm")) |
|---|
| 118 | |
|---|
| 119 | Evetuellement |
|---|
| 120 | r-cran-rgl |
|---|
| 121 | libx11-dev |
|---|
| 122 | libglu1-mesa-dev |
|---|
| 123 | |
|---|