Skip to content

Commit

Permalink
fixed colour issue in plotting X2 initial condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ta440 committed Aug 30, 2024
1 parent 96f88ff commit a020cfb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Binary file modified transport/figures/terminator_toy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions transport/plotting/plot_terminator_toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@

rho_contours = np.linspace(0.0, 1.00, 15)
rho_colour_scheme = 'gist_earth_r'
rho_contour_to_remove = None
rho_field_label = r'$\rho_d$ (kg m$^{-3}$)'

X_contours = np.linspace(0, 4e-6, 15)
X_colour_scheme = 'RdBu_r'
X_contour_to_remove = None
X_colour_scheme = 'Purples'
X_field_label = r'$X$ (kg kg$^{-1}$)'

X2_contours = np.linspace(0, 2e-6, 15)
X2_colour_scheme = 'Purples'
X2_contour_to_remove = None
X2_contours_first = np.linspace(0.0, 2.000000000001e-6, 15)
X2_contours = np.linspace(0.0, 2.0e-6, 15)
X2_colour_scheme = 'Greens'
X2_field_label = r'$X2$ (kg kg$^{-1}$)'

contour_method = 'tricontour'
Expand Down Expand Up @@ -102,7 +100,10 @@
data_format = '.2e'

elif field_name == 'X2':
contours = X2_contours
if time_idx == 0:
contours = X2_contours_first
else:
contours = X2_contours
colour_scheme = X2_colour_scheme
field_label = X2_field_label
cmap, lines = tomplot_cmap(contours, colour_scheme, remove_contour=None)
Expand Down
4 changes: 2 additions & 2 deletions transport/terminator_toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

terminator_toy_defaults = {
'ncells_per_edge': 16, # num points per icosahedron edge (ref level 4)
'dt': 900.0, # 15 minutes
'dt': 450.0, # 7.5 minutes
'tmax': 12.*24.*60.*60., # 12 days
'dumpfreq': 288, # once every 3 days with default values
'dumpfreq': 576, # once every 3 days with default values
'dirname': 'terminator_toy'
}

Expand Down

0 comments on commit a020cfb

Please sign in to comment.