Compare ProgNa LES Sims

Compare ProgNa LES Sims#

Updated as of 5/24/24#

  • The below notebook allows one to compare large-eddy simulations.

  • 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 simulations to plot
sim_keyword = 'dx100_ProgNa.'  
vars_mean_list = pd.read_excel('https://docs.google.com/spreadsheets/d/1Vl8jYGviet7EtXZuQiitrx4NSkV1x27aJAhxxjBb9zI/export?gid=0&format=xlsx',
                              sheet_name='Mean')

## 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, height'])

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

## 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, height'])
df_col_1d,df_col_2d = load_sims('../../output_les/',var_vec_1d,var_vec_2d,t_shift=-2,keyword=sim_keyword,subfolder='sand') 
Loading variables: f(time)
../../output_les/dharma/sandbox/DHARMA_Lx25_dx100_ProgNa.nc
../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
ssaf shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
iwp not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
od not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
odlc not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
ssaf not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
Loading variables: f(time,height)
../../output_les/dharma/sandbox/DHARMA_Lx25_dx100_ProgNa.nc
../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
na1 shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
na3 shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
niic shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
eps shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
uw shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
vw shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
w2 shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
wth shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
vf_thli shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
wqv shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
vf_qt shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
flc shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
prf shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
prfi shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
rld shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
rlu shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dth_rad shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dth_micro shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dth_turb shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dq_micro shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dq_turb shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dna_micro_warm shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dna_micro_cold shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dna_turb shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dni_het shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dni_sip shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
dni_hom shows NAN values in ../../output_les/icon/sandbox/ICON_Lx25_dx100_ProgNa.nc
../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
nlcic not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
niic not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
eps not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
w2 shows NAN values in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
wth not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
vf_thli not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
wqv not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
vf_qt not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
flc not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
prf not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
prfi not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dth_micro not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dth_turb not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dq_micro not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dq_turb not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dna_micro_warm not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dna_micro_cold not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
dna_turb not found in ../../output_les/DALES/sandbox/DALES_Lx25_dx100_ProgNa.nc
## plot variables that have only time dependence
plot_1d(pd.concat([df_col_1d]),
                   var_vec_1d,longnames=var_vec_1d_long,units=var_vec_1d_units,
                   plot_colors=['orange','k','r','g','magenta','gold','lightskyblue'],plot_ls=['-','-','-','-','-','-','-'])
../../_images/50d88b4673d4a36a3a01cfc46cedfad6139ce5d34f1893801eee9ec0fb375189.png
%run functions_plotting.py

## example where ERA5 and radiosonde are included
plot_2d(pd.concat([df_col_2d]),
                   var_vec_2d,times=[-1.5,0,3,9,18],z_max=6000,units=var_vec_2d_units,longnames=var_vec_2d_long,
                   plot_colors=['orange','k','r','g','magenta','gold','lightskyblue'])
temporal averaging over 1.0 h interval
../../_images/28738989dc1d8afa2f939020c9b0a8863aab87726d09dfdac62df217d16eff76.png
<Figure size 1000x600 with 0 Axes>