diff --git a/pyproject.toml b/pyproject.toml index aaea1d6..8db2e5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" \ No newline at end of file +version_file = "src/earthkit_plots_default_styles/_version.py" \ No newline at end of file diff --git a/src/default/__init__.py b/src/earthkit_plots_default_styles/__init__.py similarity index 100% rename from src/default/__init__.py rename to src/earthkit_plots_default_styles/__init__.py diff --git a/src/default/identities/mean-sea-level-pressure.yml b/src/earthkit_plots_default_styles/identities/mean-sea-level-pressure.yml similarity index 100% rename from src/default/identities/mean-sea-level-pressure.yml rename to src/earthkit_plots_default_styles/identities/mean-sea-level-pressure.yml diff --git a/src/default/identities/near-surface-air-temperature.yml b/src/earthkit_plots_default_styles/identities/near-surface-air-temperature.yml similarity index 100% rename from src/default/identities/near-surface-air-temperature.yml rename to src/earthkit_plots_default_styles/identities/near-surface-air-temperature.yml diff --git a/src/earthkit_plots_default_styles/identities/river-discharge.yml b/src/earthkit_plots_default_styles/identities/river-discharge.yml new file mode 100644 index 0000000..c906ad9 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/river-discharge.yml @@ -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} diff --git a/src/default/identities/sea-surface-temperature.yml b/src/earthkit_plots_default_styles/identities/sea-surface-temperature.yml similarity index 67% rename from src/default/identities/sea-surface-temperature.yml rename to src/earthkit_plots_default_styles/identities/sea-surface-temperature.yml index e660cea..451ceea 100644 --- a/src/default/identities/sea-surface-temperature.yml +++ b/src/earthkit_plots_default_styles/identities/sea-surface-temperature.yml @@ -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} \ No newline at end of file +- {long_name: sea surface temperature} +- {long_name: Sea surface temperature} \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/identities/snow-water-equivalent.yml b/src/earthkit_plots_default_styles/identities/snow-water-equivalent.yml new file mode 100644 index 0000000..618c431 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/snow-water-equivalent.yml @@ -0,0 +1,6 @@ +id: snow-water-equivalent + +criteria: +- {paramId: 228141, shortName: sd} +- {name: Snow depth water equivalent} +- {shortName: sd} diff --git a/src/earthkit_plots_default_styles/identities/soil-wetness-index.yml b/src/earthkit_plots_default_styles/identities/soil-wetness-index.yml new file mode 100644 index 0000000..3f5cb32 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/soil-wetness-index.yml @@ -0,0 +1,7 @@ +id: soil-wetness-index + +criteria: +- {paramId: 231026, shortName: swir } +- {name: Soil wetness index (root zone)} +- {name: swir } +- {shortName: swir } diff --git a/src/earthkit_plots_default_styles/identities/temperature-at-850hPa.yml b/src/earthkit_plots_default_styles/identities/temperature-at-850hPa.yml new file mode 100644 index 0000000..81ee9d9 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/temperature-at-850hPa.yml @@ -0,0 +1,5 @@ +--- +id: temperature-at-850hPa + +criteria: +- {standard_name: air_temperature, isobaricInhPa: 850} \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/identities/total-precipitation.yml b/src/earthkit_plots_default_styles/identities/total-precipitation.yml new file mode 100644 index 0000000..177717d --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/total-precipitation.yml @@ -0,0 +1,5 @@ +id: total-precipitation + +criteria: +- {standard_name: total_precipitation} +- {long_name: "Total precipitation"} \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/identities/total-runoff-water-equivalent.yml b/src/earthkit_plots_default_styles/identities/total-runoff-water-equivalent.yml new file mode 100644 index 0000000..bd3d352 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/total-runoff-water-equivalent.yml @@ -0,0 +1,6 @@ +id: total-runoff-water-equivalent + +criteria: +- {paramId: 231002, shortName: rowe} +- {name: Runoff water equivalent (surface plus subsurface)} +- {shortName: rowe} diff --git a/src/earthkit_plots_default_styles/identities/wind-gust-at-10m-in-last-6-hours.yml b/src/earthkit_plots_default_styles/identities/wind-gust-at-10m-in-last-6-hours.yml new file mode 100644 index 0000000..aed7241 --- /dev/null +++ b/src/earthkit_plots_default_styles/identities/wind-gust-at-10m-in-last-6-hours.yml @@ -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} \ No newline at end of file diff --git a/src/default/schema.yml b/src/earthkit_plots_default_styles/schema.yml similarity index 88% rename from src/default/schema.yml rename to src/earthkit_plots_default_styles/schema.yml index 5d470cd..821820d 100644 --- a/src/default/schema.yml +++ b/src/earthkit_plots_default_styles/schema.yml @@ -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 @@ -56,16 +56,22 @@ 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] @@ -73,6 +79,8 @@ interactive_box: line_color: "#0040ff" line_width: 1.5 +reference_fontsize: 12 + interactive_layout: colorway: - '#636EFA' @@ -104,10 +112,12 @@ interactive_layout: # *************************************************************************** # # * QUICKPLOT WORKFLOW * # # *************************************************************************** # -quickmap_workflow: +quickmap_subplot_workflow: + - title + +quickmap_figure_workflow: - coastlines - gridlines - - title - legend quickplot_workflow: [] @@ -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 @@ -164,14 +182,21 @@ 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 @@ -179,16 +204,16 @@ scatter: 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: @@ -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 diff --git a/src/default/styles/mean-sea-level-pressure.yml b/src/earthkit_plots_default_styles/styles/mean-sea-level-pressure.yml similarity index 88% rename from src/default/styles/mean-sea-level-pressure.yml rename to src/earthkit_plots_default_styles/styles/mean-sea-level-pressure.yml index 3ca240c..4900c21 100644 --- a/src/default/styles/mean-sea-level-pressure.yml +++ b/src/earthkit_plots_default_styles/styles/mean-sea-level-pressure.yml @@ -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: @@ -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: diff --git a/src/earthkit_plots_default_styles/styles/near-surface-air-temperature.yml b/src/earthkit_plots_default_styles/styles/near-surface-air-temperature.yml new file mode 100644 index 0000000..da3d2de --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/near-surface-air-temperature.yml @@ -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 \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/styles/river-discharge.yml b/src/earthkit_plots_default_styles/styles/river-discharge.yml new file mode 100644 index 0000000..8dab814 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/river-discharge.yml @@ -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 diff --git a/src/default/styles/sea-surface-temperature.yml b/src/earthkit_plots_default_styles/styles/sea-surface-temperature.yml similarity index 100% rename from src/default/styles/sea-surface-temperature.yml rename to src/earthkit_plots_default_styles/styles/sea-surface-temperature.yml diff --git a/src/earthkit_plots_default_styles/styles/snow-water-equivalent.yml b/src/earthkit_plots_default_styles/styles/snow-water-equivalent.yml new file mode 100644 index 0000000..0c1c400 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/snow-water-equivalent.yml @@ -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 diff --git a/src/earthkit_plots_default_styles/styles/soil-wetness-index.yml b/src/earthkit_plots_default_styles/styles/soil-wetness-index.yml new file mode 100644 index 0000000..ade2ed2 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/soil-wetness-index.yml @@ -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 diff --git a/src/default/styles/near-surface-air-temperature.yml b/src/earthkit_plots_default_styles/styles/temperature-at-850hPa.yml similarity index 100% rename from src/default/styles/near-surface-air-temperature.yml rename to src/earthkit_plots_default_styles/styles/temperature-at-850hPa.yml diff --git a/src/earthkit_plots_default_styles/styles/total-precipitation.yml b/src/earthkit_plots_default_styles/styles/total-precipitation.yml new file mode 100644 index 0000000..8f0eea3 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/total-precipitation.yml @@ -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 \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/styles/total-runoff-water-equivalent.yml b/src/earthkit_plots_default_styles/styles/total-runoff-water-equivalent.yml new file mode 100644 index 0000000..79bff62 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/total-runoff-water-equivalent.yml @@ -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 diff --git a/src/earthkit_plots_default_styles/styles/wind-gust-at-10m-in-last-6-hours.yml b/src/earthkit_plots_default_styles/styles/wind-gust-at-10m-in-last-6-hours.yml new file mode 100644 index 0000000..e3c3bd4 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/wind-gust-at-10m-in-last-6-hours.yml @@ -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 \ No newline at end of file diff --git a/src/earthkit_plots_default_styles/styles/wind-speed-at-10m.yml b/src/earthkit_plots_default_styles/styles/wind-speed-at-10m.yml new file mode 100644 index 0000000..e3c3bd4 --- /dev/null +++ b/src/earthkit_plots_default_styles/styles/wind-speed-at-10m.yml @@ -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 \ No newline at end of file