-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workshop #5
Open
ryba183
wants to merge
36
commits into
igfuw:master
Choose a base branch
from
ryba183:Workshop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Workshop #5
Changes from 12 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
0bd2561
back to gcc11
ryba183 2d9567d
Cloud Top Height
ryba183 a894010
Python3 update
ryba183 bdfc97a
Lasher_Trapp_ICMW
ryba183 590c633
Merge branch 'master' into Workshop
ryba183 ed62eef
Update latex_labels.py
ryba183 d0f3ba5
looking for error
ryba183 100aa74
Merge branch 'Workshop' of https://github.com/ryba183/UWLCM_plotting …
ryba183 3533d88
ICMW2020
ryba183 6f1c66b
Revert "Update latex_labels.py"
ryba183 a88d8fb
working
ryba183 c94291f
LWM
ryba183 5fa75f9
time series
ryba183 590c1fe
profs
ryba183 c0db4f2
ICMW_profs
ryba183 0e35c11
NC_vs_AF python3
ryba183 cde1e02
Workshops
ryba183 86c5545
ICMW_CC_2020
ryba183 d6ea764
Merge branch 'master' into Workshop
ryba183 4e3157d
working_on_rysy
ryba183 d0a1d85
Adiabatic Fraction ICMW2020
ryba183 3cf79dc
Merge branch 'Workshop' of https://github.com/ryba183/UWLCM_plotting …
ryba183 46ead79
preparation for randomness
ryba183 af2e716
paper prepare
ryba183 5a12c36
plots for paper
0990d78
plots for paper vol3
9ceb2c4
plots for paper vol4
60e67e7
cleaning
ryba183 ebedd07
cleaning
ryba183 41e1ba0
beter cloud base
ryba183 4114ec6
plots for paper vol4
c0ce1ba
plots for paper vol4
41e588d
plots for paper vol5
c0bf157
ICM maintenance problems
ryba183 c3413e6
Distribution plots
ryba183 a9202bc
RYSY
ryba183 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
cases/ICMW2020_cumulus_congestus/ICMW2020_cumulus_congestus_series_comparison.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
from matplotlib import rc | ||
import matplotlib.pyplot as plt | ||
from matplotlib.ticker import AutoMinorLocator, MultipleLocator | ||
|
||
import os | ||
import sys | ||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../Matplotlib_common/") | ||
|
||
from plot_ranges import xscaledict, yscaledict, xlimdict_series, ylimdict_series | ||
from plot_series import * | ||
|
||
# activate latex text rendering | ||
rc('text', usetex=True) | ||
|
||
ICMW2020_vars = ["RH_max", "cloud_top_height", "surf_precip", "acc_precip", "acc_vol_precip"] | ||
|
||
# init the plot | ||
nplotx = 2 | ||
nploty= 3 | ||
fig, axarr = plt.subplots(nplotx,nploty) | ||
|
||
plot_series( ICMW2020_vars, 0, nplotx, nploty, axarr, xscaledict, yscaledict, xlimdict_series, ylimdict_series, xlabel='Time [h]') | ||
|
||
# legend font size | ||
plt.rcParams.update({'font.size': 8}) | ||
|
||
# hide axes on empty plots | ||
if len( ICMW2020_vars) % nploty == 0: | ||
nemptyplots = 0 | ||
else: | ||
nemptyplots = nploty - len( ICMW2020_vars) % nploty | ||
emptyplots = np.arange(nploty - nemptyplots, nploty) | ||
for empty in emptyplots: | ||
axarr[nplotx-1, empty].axis('off') | ||
|
||
# hide hrzntl tic labels | ||
x_empty_label = np.arange(0, nplotx-1) | ||
y_empty_label = np.arange(nploty) | ||
for x in x_empty_label: | ||
for y in y_empty_label: | ||
axarr[x,y].set_xticklabels([]) | ||
|
||
#axes = plt.gca() | ||
#axes.tick_params(direction='in') | ||
x_arr = np.arange(nplotx) | ||
y_arr = np.arange(nploty) | ||
for x in x_arr: | ||
for y in y_arr: | ||
#tics inside | ||
axarr[x,y].tick_params(direction='in', which='both', top=1, right=1) | ||
#minor tics | ||
axarr[x,y].xaxis.set_minor_locator(AutoMinorLocator()) | ||
axarr[x,y].yaxis.set_minor_locator(AutoMinorLocator()) | ||
#labels and tics font size | ||
for item in ([axarr[x,y].xaxis.label, axarr[x,y].yaxis.label] + axarr[x,y].get_xticklabels() + axarr[x,y].get_yticklabels()): | ||
item.set_fontsize(8) | ||
# subplot numbering | ||
if y < nploty - nemptyplots or x < (nplotx - 1): | ||
axarr[x,y].text(0.2, 0.9, labeldict[y + x*nploty], fontsize=8, transform=axarr[x,y].transAxes) | ||
|
||
#single legend for the whole figure | ||
handles, labels = axarr[0,0].get_legend_handles_labels() | ||
|
||
lgd = fig.legend(handles, labels, handlelength=4, loc='lower center', bbox_to_anchor=(0.45,0)) | ||
|
||
#figure size | ||
fig.set_size_inches(7.874, 5. + (len(labels) - 2) * 0.2)# 5.214)#20.75,13.74) | ||
#distances between subplots and from bottom of the plot | ||
fig.subplots_adjust(bottom=0.18 + (len(labels) - 2) * 0.03, hspace=0.1, wspace=0.4) | ||
|
||
#fig.tight_layout(pad=0, w_pad=0, h_pad=0) | ||
|
||
#plt.show() | ||
fig.savefig(argv[len(sys.argv)-1], bbox_inches='tight', dpi=300)#, bbox_extra_artists=(lgd,)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
xscaledict = { | ||
"thl" : "linear", | ||
"00rtot" : "linear", | ||
"rliq" : "linear", | ||
"prflux" : "linear", | ||
"cl_nc" : "linear", | ||
"clfrac" : "linear", | ||
"wvar" : "linear", | ||
"w3rd" : "linear", | ||
"sat_RH" : "linear", | ||
"rad_flx" : "linear", | ||
"lwp" : "linear", | ||
"RH_max" : "linear", | ||
"cloud_top_height" : "linear", | ||
"total_droplets_number" : "linear", | ||
"acc_precip_vol" : "linear", | ||
"rwp" : "linear", | ||
"er" : "linear", | ||
"wvarmax" : "linear", | ||
"surf_precip" : "linear", | ||
"acc_precip" : "linear", | ||
"cloud_base" : "linear", | ||
"gccn_rw_cl" : "linear", | ||
"non_gccn_rw_cl" : "linear", | ||
"base_prflux_vs_clhght" : "log", | ||
"cl_gccn_conc" : "linear" | ||
} | ||
|
||
yscaledict = { | ||
"thl" : "linear", | ||
"00rtot" : "linear", | ||
"rliq" : "linear", | ||
"prflux" : "linear", | ||
"cl_nc" : "linear", | ||
"clfrac" : "linear", | ||
"wvar" : "linear", | ||
"w3rd" : "linear", | ||
"sat_RH" : "linear", | ||
"rad_flx" : "linear", | ||
"lwp" : "linear", | ||
"RH_max" : "linear", | ||
"cloud_top_height" : "linear", | ||
"total_droplets_number" : "linear", | ||
"ac_precip_vol" : "linear", | ||
"rwp" : "linear", | ||
"er" : "linear", | ||
"wvarmax" : "linear", | ||
"surf_precip" : "linear", | ||
"acc_precip" : "linear", | ||
"cloud_base" : "linear", | ||
"gccn_rw_cl" : "linear", | ||
"non_gccn_rw_cl" : "linear", | ||
"base_prflux_vs_clhght" : "linear", | ||
"cl_gccn_conc" : "log" | ||
} | ||
|
||
xlimdict_profs = { | ||
"thl" : None, | ||
"00rtot" : None, | ||
"rliq" : None, | ||
"prflux" : (0,20), | ||
"cl_nc" : (0,90), | ||
"clfrac" : None, | ||
"wvar" : None, | ||
"w3rd" : None, | ||
"sat_RH" : None, | ||
##"RH_max" : None, | ||
##"cloud_top_height" : None, | ||
"rad_flx" : None, | ||
"gccn_rw_cl" : (0,90), | ||
"non_gccn_rw_cl" : (0,12), | ||
"base_prflux_vs_clhght" : (1,10000) | ||
} | ||
ylimdict_profs = { | ||
"thl" : (0,3000), | ||
"00rtot" : (0,3000), | ||
"rliq" : (0,3000), | ||
"prflux" : (0,3000), | ||
"cl_nc" : (0,3000), | ||
"clfrac" : (0,3000), | ||
"wvar" : (0,3000), | ||
"w3rd" : (0,3000), | ||
"sat_RH" : (0,3000), | ||
"rad_flx" : (0,3000), | ||
"RH_max" : (0,3000), | ||
"cloud_top_height" : (0,3000), | ||
"gccn_rw_cl" : (0,3000), | ||
"non_gccn_rw_cl" : (0,3000), | ||
"base_prflux_vs_clhght" : (0,2500) | ||
} | ||
|
||
xlimdict_series = { | ||
"clfrac" : None, | ||
"cl_nc" : None, | ||
"lwp" : None, | ||
"RH_max" : None, | ||
"cloud_top_height" : None, | ||
"total_droplets_number" : None, | ||
"rwp" : None, | ||
"er" : None, | ||
"wvarmax" : None, | ||
"surf_precip" : None, | ||
"acc_precip" : None, | ||
"acc_precip_vol" : None, | ||
"cl_gccn_conc" : None, | ||
"cloud_base" : None | ||
} | ||
|
||
ylimdict_series = { | ||
"clfrac" : None, | ||
"cl_nc" : None, | ||
"lwp" : None, | ||
"RH_max" : None, | ||
"cloud_top_height" : None, | ||
"total_droplets_number" : None, | ||
"acc_precip_vol" : None, | ||
"rwp" : None, | ||
"er" : None, | ||
"wvarmax" : None, | ||
"surf_precip" : None, | ||
"acc_precip" : None,#(0,0.07), | ||
"cl_gccn_conc" : (1e-6, 1), | ||
"cloud_base" : None | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ int main(int argc, char** argv) | |
("qv_qc_2_6_10_min", po::value<bool>()->default_value(false) , "plot comparison of qv and qc fields at 2, 6 and 10 min?") | ||
("dir", po::value<std::string>()->required() , "directory containing out_lgrngn") | ||
("micro", po::value<std::string>()->required(), "one of: blk_1m, blk_2m, lgrngn") | ||
("type", po::value<std::string>()->required(), "one of: dycoms, moist_thermal, rico, Lasher_Trapp")//, base_prflux_vs_clhght") | ||
("type", po::value<std::string>()->required(), "one of: dycoms, moist_thermal, rico, Lasher_Trapp, ICMW2020")//, base_prflux_vs_clhght") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change ICMW2020 to ICMW2020_cc to distinguish that this is the cumulus congestus case |
||
; | ||
|
||
po::variables_map vm; | ||
|
@@ -33,8 +33,8 @@ int main(int argc, char** argv) | |
|
||
// handling the "type" option | ||
std::string type = vm["type"].as<std::string>(); | ||
if(type != "dycoms" && type != "moist_thermal" && type != "rico" && type != "pi_chamber" && type != "Lasher_Trapp") | ||
throw std::runtime_error("Unrecognized 'type' option, only dycoms, rico, moist_thermal, pi_chamber, Lasher_Trapp available now");//, base_prflux_vs_clhght available now"); | ||
if(type != "dycoms" && type != "moist_thermal" && type != "rico" && type != "pi_chamber" && type != "Lasher_Trapp" && type != "ICMW2020") | ||
throw std::runtime_error("Unrecognized 'type' option, only dycoms, rico, moist_thermal, pi_chamber, Lasher_Trapp, ICMW2020 available now");//, base_prflux_vs_clhght available now"); | ||
|
||
// should profiles be normalized by inversion height | ||
const bool normalize_prof = type == "dycoms"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When plotting profiles, my_pos is altitude, not time.
If you want to change from position to time in plot_series, please change from position to altitude in plot_profs.
That may require additional changes in matplotlib code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still to be done