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