Check my SCM run

Check my SCM run#

  • The below notebook allows to compare a single column model simulation against a set of benchmark simulations (shown in gray).

  • All requested 1D and 2D variables are here read and plotted. “load_sims” reports variable that are missing. Lines will not show, if a variable is missing or if it contains missing values.

  • In case you find inconsistencies in the benchmark set or wish to expand the code, please contact Ann Fridlind (ann.fridlind@nasa.gov), Timothy Juliano (tjuliano@ucar.edu), and Florian Tornow (ft2544@columbia.edu).

%run functions_plotting.py

## select (grayed out) simulations to plot
sim_keyword_gray = 'dharma/sandbox/DHARMA_Lx25_dx200_FixN.'

## select LES run(s) of interest
sim_keyword_col_les = 'WRF_Lx25_dx100_FixN.'
sim_keyword_col_scm = 'ModelE3-Phys_FixN_def_z0.'
vars_mean_list = pd.read_excel('https://docs.google.com/spreadsheets/d/1Vl8jYGviet7EtXZuQiitrx4NSkV1x27aJAhxxjBb9zI/export?gid=1026157027&format=xlsx',
                              sheet_name='SCM')

## short names
var_vec_1d = np.asarray(vars_mean_list.variable_id[vars_mean_list.dimensions == 'time'])
var_vec_2d = np.asarray(vars_mean_list.variable_id[vars_mean_list.dimensions == 'time, pressure'])

var_vec_2d = var_vec_2d[var_vec_2d!='zf']

## long names
var_vec_1d_long = np.asarray(vars_mean_list.standard_name[vars_mean_list.dimensions == 'time'])

## Units
var_vec_1d_units = np.asarray(vars_mean_list.units[vars_mean_list.dimensions == 'time'])
var_vec_2d_units = np.asarray(vars_mean_list.units[vars_mean_list.dimensions == 'time, pressure'])
## load all simulations located in subfolders of the given directory
df_gray_1d,df_gray_2d = load_sims('../../output_les/',var_vec_1d,var_vec_2d,t_shift=-2,keyword=sim_keyword_gray,make_gray = 1)

## example using LES
df_col_1d_les,df_col_2d_les = load_sims('../../output_les/',var_vec_1d,var_vec_2d,t_shift=-2,keyword=sim_keyword_col_les)

## example using SCM
df_col_1d_scm,df_col_2d_scm = load_sims('../../output_scm/',var_vec_1d,var_vec_2d,t_shift=-2,keyword=sim_keyword_col_scm)
Loading variables: f(time)
../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
pblh not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
zi not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
cf not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
cflc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
cfc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
ssaf not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
Loading variables: f(time,height)
../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qi not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
fh not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
fc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
tke not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
cmfu not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
cmfd not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dna_micro_warm not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dna_micro_cold not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dna_turb not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dni_het not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dni_sip not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
dni_hom not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qlcs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qlrs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qics not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qips not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qlcc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qlrc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qicc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
qipc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
nlcs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
nlrs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
nics not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
nips not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
relcc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
relrc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
reicc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
reipc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
flcs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
flrs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
fics not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
fips not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
flcc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
flrc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
ficc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
fipc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmlcs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmlrs not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmics not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmips not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmlcc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmlrc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmicc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
vmipc not found in ../../output_les/dharma/sandbox/DHARMA_Lx25_dx200_FixN.nc
Loading variables: f(time)
../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
pblh not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
zi not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
cf not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
cflc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
cfc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
Loading variables: f(time,height)
../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qi not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
fh not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
fc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
tke not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
cmfu not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
cmfd not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qlcs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qlrs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qics not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qips not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qlcc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qlrc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qicc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
qipc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
nlcs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
nlrs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
nics not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
nips not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
relcc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
relrc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
reicc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
reipc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
flcs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
flrs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
fics not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
fips not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
flcc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
flrc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
ficc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
fipc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmlcs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmlrs not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmics not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmips not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmlcc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmlrc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmicc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
vmipc not found in ../../output_les/wrf/sandbox/WRF_Lx25_dx100_FixN.nc
Loading variables: f(time)
../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
ssaf not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
Loading variables: f(time,height)
../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dna_micro_warm not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dna_micro_cold not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dna_turb not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dni_het not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dni_sip not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
dni_hom not found in ../../output_scm/modelE/sandbox/ModelE3-Phys_FixN_def_z0.nc
# plot variables that have only time dependence
plot_1d(pd.concat([df_gray_1d,df_col_1d_scm,df_col_1d_les]),var_vec_1d,longnames=var_vec_1d_long,units=var_vec_1d_units)
../../_images/16c6cf2a0e7d8ceaf447c2da2d5f00539f846d2658cedab755aa524a4db83eb3.png
## example where ERA5 and radiosonde are included
plot_2d(pd.concat([df_gray_2d,df_col_2d_scm,df_col_2d_les]),var_vec = var_vec_2d,times=[-1.5,0,3,9,18],z_max=6000,units=var_vec_2d_units)## example where ERA5 and radiosonde are included
../../_images/fdb90d9294a92376540d6682e83960d7196b3c9eb11af586217ebb0ca74e3061.png
<Figure size 1000x600 with 0 Axes>