Skip to content

New structure + some hydro variables #2

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

Merged
merged 13 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ add_ignore = ["D1", "D200", "D205", "D400", "D401"]
convention = "numpy"

[project.entry-points.'earthkit.plots.plugins']
default = 'default'
default = 'earthkit_plots_default_styles'

[tool.setuptools.packages.find]
include = ["default"]
where = ["src/"]

[tool.setuptools_scm]
version_file = "src/default/_version.py"
version_file = "src/earthkit_plots_default_styles/_version.py"
File renamed without changes.
10 changes: 10 additions & 0 deletions src/earthkit_plots_default_styles/identities/river-discharge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
id: river-discharge

criteria:
- {long_name: Mean discharge in the last 6 hours}
- {long_name: Mean discharge in the last 24 hours}
- {name: Mean discharge in the last 24 hours}
- {name: Mean discharge in the last 6 hours}
- {name: dis24}
- {name: dis06}
- {paramId: 240023}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ criteria:
- {paramId: 34, shortName: sst}
- {standard_name: sea_surface_temperature}
- {standard_name: sea_surface_skin_temperature}
- {long_name: sea surface temperature}
- {long_name: sea surface temperature}
- {long_name: Sea surface temperature}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id: snow-water-equivalent

criteria:
- {paramId: 228141, shortName: sd}
- {name: Snow depth water equivalent}
- {shortName: sd}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
id: soil-wetness-index

criteria:
- {paramId: 231026, shortName: swir }
- {name: Soil wetness index (root zone)}
- {name: swir }
- {shortName: swir }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
id: temperature-at-850hPa

criteria:
- {standard_name: air_temperature, isobaricInhPa: 850}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id: total-precipitation

criteria:
- {standard_name: total_precipitation}
- {long_name: "Total precipitation"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id: total-runoff-water-equivalent

criteria:
- {paramId: 231002, shortName: rowe}
- {name: Runoff water equivalent (surface plus subsurface)}
- {shortName: rowe}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id: wind-gust-at-10m-in-last-6-hours

criteria:
- {paramId: 123, shortName: 10fg6}
- {long_name: 10 metre wind gust in the last 6 hours}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# more control over matplotlib rcParams, consider using a matplotlib style
# sheet.
figure:
figsize: [7, 6]
figsize: [8, 7]
dpi: 100
axes:
linewidth: 1
Expand Down Expand Up @@ -56,23 +56,31 @@ default_style_levels: 12
# The style library to use for automatic styling
style_library: default

# The color mode - if "magics" will use named colors from the Magics library
color_mode: null

# If true, will attempt to use automatic stlying whenever no style is passed
automatic_styles: true

# The format to use for units
units_format: "~E"

# If true, force the use of the optimal style for a given variable as provided
# by the style library, forcing unit conversion if necessary
use_preferred_units: false

# EXPERIMENTAL
# The lat-lon target resolution when interpolating unstructured data
interpolate_target_resolution: 1
interpolate_target_resolution: 0.1

interactive_box:
quantiles: [0, 0.1, 0.25, 0.5, 0.75, 0.9, 1.0]
fillcolor: "#b3c6ff"
line_color: "#0040ff"
line_width: 1.5

reference_fontsize: 12

interactive_layout:
colorway:
- '#636EFA'
Expand Down Expand Up @@ -104,10 +112,12 @@ interactive_layout:
# *************************************************************************** #
# * QUICKPLOT WORKFLOW * #
# *************************************************************************** #
quickmap_workflow:
quickmap_subplot_workflow:
- title

quickmap_figure_workflow:
- coastlines
- gridlines
- title
- legend

quickplot_workflow: []
Expand Down Expand Up @@ -153,8 +163,16 @@ line:
envelope:
zorder: 2
contour:
regrid: true
labels: true
transform_first: true
isolines:
regrid: true
transform_first: true
linewidths: 1
labels: true
contourf:
regrid: true
transform_first: true
point:
marker: o
Expand All @@ -164,31 +182,38 @@ legend:
title:
wrap: true
horizontalalignment: center
fontsize: 12
suptitle:
wrap: true
horizontalalignment: center
fontsize: 14
barbs:
length: 4
linewidth: 0.5
sizes:
spacing: 0.25
color: "#555"
quiver: {}
regrid_shape: 30
quiver:
angles: xy
scale_units: xy
scale: 0.0006
regrid_shape: 30
scatter:
s: 36
edgecolors: black
missing_values:
color: none
hatch: ////////
linewidths: 0.5
gridpoints:
s: 4
grid_points:
s: 8
marker: .
edgecolors: null
missing_values: null
z: false
color: red
c: red
legend_style: null
point_cloud:
s: 12
s: 5
marker: o
edgecolors: null
boxplot:
Expand All @@ -203,10 +228,19 @@ coastlines:
edgecolor: "#555555"
facecolor: none
borders:
linestyle: ":"
linewidth: 0.5
edgecolor: [0.2, 0.2, 0.2]
edgecolor: "#999999"
facecolor: none
special_styles:
- key: BRK_A3
values: ["B57"]
kwargs:
linestyle: "dotted"
- key: BRK_A3
values: ["B89"]
kwargs:
linewidth: 0
linestyle: "dotted"
countries:
linestyle: "-"
linewidth: 0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ styles:

MEAN_SEA_LEVEL_PRESSURE_IN_PA:
type: Contour
line_colors: "#33334d"
linecolors: "#33334d"
linewidths: [0.5, 0.5, 0.5, 1]
labels: true
levels:
Expand All @@ -16,7 +16,7 @@ styles:

MEAN_SEA_LEVEL_PRESSURE_IN_HPA:
type: Contour
line_colors: "#33334d"
linecolors: "#33334d"
linewidths: [0.5, 0.5, 0.5, 1]
labels: true
levels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: temperature-at-850hPa
optimal: TEMPERATURE_AT_850HPA_IN_CELSIUS

styles:

TEMPERATURE_AT_850HPA_IN_CELSIUS:
type: Style
colors: rainbow
extend: both
levels: range(-40, 41, 2)
units: celsius

TEMPERATURE_AT_850HPA_IN_KELVIN:
type: Style
colors: rainbow
extend: both
levels: range(230, 311, 2)
units: K

TEMPERATURE_AT_850HPA_IN_FAHRENHEIT:
type: Style
colors: rainbow
extend: both
levels: range(-40, 101, 5)
units: fahrenheit
19 changes: 19 additions & 0 deletions src/earthkit_plots_default_styles/styles/river-discharge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: river-discharge
optimal: RIVER_DISCHARGE_GLOBAL_IN_M3_S-1

styles:

RIVER_DISCHARGE_EUROPE_IN_M3_S-1:
type: Style
colors: Blues
levels: [0.1, 0.25, 0.5, 1, 2, 5, 10, 25, 50, 100, 500, 1000, 2000]
extend: max
units: m3 s-1

RIVER_DISCHARGE_GLOBAL_IN_M3_S-1:
type: Style
colors: Blues
levels: [0.1, 10, 50, 200, 1000, 3000, 7500, 10000, 30000, 70000, 100000, 200000]
extend: max
units: m3 s-1
24 changes: 24 additions & 0 deletions src/earthkit_plots_default_styles/styles/snow-water-equivalent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: snow-water-equivalent
optimal: SNOW_WATER_EQUIVALENT_IN_KG_M-2

styles:

SNOW_WATER_EQUIVALENT_IN_KG_M-2:
type: Style
colors:
- [0.5064,0.5809,0.4858]
- [0.6153,0.6753,0.5953]
- [0.7395,0.7658,0.7323]
- [0.8118,0.8118,0.8118]
- [0.8902,0.8902,0.8902]
- [0.949,0.949,0.949]
- [0.9961,0.9961,0.9961]
- [0.9676,0.8309,0.4206]
- [0.9895,0.7421,0.1164]
- [0.9961,0.6008,0.007828]
- [0.9961,0.4526,0.007828]
- [0.919,0.3211,0.02214]
levels: [1.0, 2.0, 5.0, 10.0, 20.0, 35.0, 50.0, 75.0, 100.0, 200.0, 300.0, 500.0]
extend: max
units: kg m**-2
10 changes: 10 additions & 0 deletions src/earthkit_plots_default_styles/styles/soil-wetness-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: soil-wetness-index
optimal: SOIL_WETNESS_INDEX_GREENS

styles:
SOIL_WETNESS_INDEX_GREENS:
type: Style
colors: [white, lime, green, darkgreen]
levels: [0, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1]
extend: max
26 changes: 26 additions & 0 deletions src/earthkit_plots_default_styles/styles/total-precipitation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: total-precipitation
optimal: TOTAL_PRECIPITATION_IN_MM

styles:

TOTAL_PRECIPITATION_IN_MM:
type: Style
colors: turbo
extend: max
levels: [0, 0.1, 0.2, 0.5, 1, 2, 3, 4, 5]
units: mm

TOTAL_PRECIPITATION_IN_M:
type: Style
colors: turbo
extend: max
levels: [0, 0.1, 0.2, 0.5, 1, 2, 3, 4, 5]
units: m

TOTAL_PRECIPITATION_IN_KG_M-2:
type: Style
colors: turbo
extend: max
levels: [0, 0.1, 0.2, 0.5, 1, 2, 3, 4, 5]
units: kg m-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
id: total-runoff-water-equivalent
optimal: TOTAL_RUNOFF_WATER_EQUIVALENT_IN_KG_M-2

styles:

TOTAL_RUNOFF_WATER_EQUIVALENT_IN_KG_M-2:
type: Style
colors: Blues
levels: [0.1, 1, 2, 5, 7, 10, 15, 30, 50, 75, 100, 150, 200]
extend: max
units: kg m**-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: wind-gust-at-10m-in-last-6-hours
optimal: WIND_GUST_AT_10M_IN_LAST_6_HOURS_IN_METERS_PER_SECOND

styles:

WIND_GUST_AT_10M_IN_LAST_6_HOURS_IN_METERS_PER_SECOND:
type: Style
colors: ["#85AAEE", "#208EFC", "#6CA632", "#FFB000", "#FF0000", "#7A11B1"]
levels: [12, 15, 20, 25, 30, 35, 50]
units: m s-1
11 changes: 11 additions & 0 deletions src/earthkit_plots_default_styles/styles/wind-speed-at-10m.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: wind-gust-at-10m-in-last-6-hours
optimal: WIND_GUST_AT_10M_IN_LAST_6_HOURS_IN_METERS_PER_SECOND

styles:

WIND_GUST_AT_10M_IN_LAST_6_HOURS_IN_METERS_PER_SECOND:
type: Style
colors: ["#85AAEE", "#208EFC", "#6CA632", "#FFB000", "#FF0000", "#7A11B1"]
levels: [12, 15, 20, 25, 30, 35, 50]
units: m s-1