# Summer 2018, Toulouse, France # High Tune project # Najda working on Monte Carlo vs ECRAD comparisons. Already have a case were the reference Monte Carlo computations have been done (ARMCu 8th hour : CASE=ARMCU, SUBCASE=REF). # The objective is to compute the NROY space of ECRAD parameters by comparing, for one cloud field: # -> the reference which is 3D Monte Carlo runs (at different solar angles) including atmospheric effects and standard atmosphere above, in the full LES cloud field # -> N ECRAD runs performed with perturbed namelists (from param2R.sh and serie_ECRAD.sh) # The parameters are cloud inhomogeneity (fractional_std), overlap parameter and low clouds size # The metrics are net fluxes at TOA and surface, and direct / total flux at the surface, integrated over the solar spectrum # If ecrad is alreay installed and compiled, "./bench.sh ecrad" should work. First open models/ECRAD/serie_ECRAD.sh and modify the path to the ecrad folder (variable ECRAD) # Files in src have been modified to allow comparison between ECRAD and Monte Carlo outputs in particular # -> htune_metric.R with a test on the existence of variables to decide which type of file (SCM output or ECRAD output or Monte Carlo output) + radiative metrics # -> htune_ncdf2Rdata.R : a new variable is sourced from expe_setup.R : REF it can be either "LES" or "RAD", to decide in which directory is the reference file # if REF==RAD, then the error is not computed from several profiles but read from variables in the netcdf file (through get_metric(std_metric)) # -> htune_case_setup.R : added RADARMCU in case_setup() and zmax is now defined in case_setup() instead of plot_setup() # models/ECRAD contains ## tuning files # -> param : list of tuning parameters # -> serie_ECRAD.sh : script to run multiple simulations from a list of parameters # -> expe_setup.R : will be sourced by the other R scripts ## ECRAD files that should be copied in $ECRAD/test/htune/ # -> ARMCU008_1D.nc : input profiles # -> change_namelist.sh : to change values of parameters in a given namelist (called in serie_ECRAD.sh) # -> duplicate_profiles.sh : to duplicate the input profiles with varying solar angle (called in serie_ECRAD.sh) # -> config_spartacus.nam : configuration file # RAD contains CASE/SUBCASE/RADt.nc the Monte Carlo output for CASE/SUBCASE at timestep t. For now only ARMCU/REF/RAD8.nc exists. # TODO # Bullet code # -- : need interaction with someone # - : need doing # + : is done and works # * : is done and bugged -- save folder RAD somewhere accessible. Same status as folder LES : download once during setup then use as reference. Also case dependent so same structure as LES folder ? eg ARMCU/008/RAD0.nc contains Monte Carlo results computed in the ARMCu008.nc field. Reference runs should be defined beforehand... eg take atmospheric gases into account, ground albedo 0.2, use Mie phase function... then compute radiation at several SZA (a dimenson in the ncdf file). -- allow download and build of ecrad from a setup_ecrad.sh? Ask Robin because there could be a license problem? Should be protected anyway. Also the version 1.0.1 would not be enough: overlap_decorr_length is not recognized ; entrapment and cloud pdf shape name are not supported + known bugs in monochromatic mode and delta scaling with gas. I use v1.1.0. + define a new model in models : ECRAD + define parameters, range, default value and variation law. + define metrics: surface and TOA net fluxes, direct to total surface ratio, (for now only SW in the MC). Procedure to compute metrics in the output of ecrad and in the RAD/CASE/SUBCASE/RADx.nc + Script serie_ecrad.sh to run the N ecrad + Need a procedure to read ASCII file containing N sampled sets of parameters and create N config.nam files (inputs to ecrad). + adapt htune_ncdf2Rdata to MC and ECRAD outputs path to ref : New var in setup_case.R : REF = RAD or LES: the path is now $REF/$case_name/$subcase_name/$REF0.nc. The error is computed from the variance estimated by MC - plots at the beginning of ncdf2RData + change htune_metric so it doesn't need to call plot_setup (which is sourced only if the target var is in a given list) => zmax is defined with NLES et Time*, and passed as an argument to get_metric + Before commiting changes, need to transpose from WORK directory to src and run LMDZ bench + bench ecrad