diff --git a/json_fields/mm_fields.json b/json_fields/mm_fields.json index 334ea3f..dd0ca85 100644 --- a/json_fields/mm_fields.json +++ b/json_fields/mm_fields.json @@ -82,16 +82,22 @@ "magic_func": "mcont", "contour": "off", "contour_highlight": "off", + "contour_hilo": "off", + "contour_interpolation_ceiling": 8.0, "contour_label": "off", - "contour_level_list": [0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0], - "contour_level_selection_type": "level_list", + "contour_level_list": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], + "contour_level_selection_type": "list", "contour_shade": "on", - "contour_shade_max_level_colour": "rgba(192,192,192,0.7)", - "contour_shade_min_level_colour": "rgba(255,255,255,0.0)", + "contour_shade_colour_list": [ "rgb(0.96,0.96,1.0)", "rgb(0.88,0.89,0.95)", + "rgb(0.8,0.83,0.9)", "rgb(0.72,0.76,0.86)", + "rgb(0.64,0.69,0.81)", "rgb(0.56,0.62,0.76)", + "rgb(0.49,0.56,0.71)"], + "contour_shade_colour_method": "list", "contour_shade_method": "area_fill", - "contour_shade_technique": "polygon_shading", + "contour_shade_max_level": 8.0, + "contour_shade_min_level": 1.0, "legend": "on"}, - + "hcc": {"nameECMF": "High Cloud Cover", "magic_func": "mcont", "contour": "off", diff --git a/json_fields/plot_grib.py b/json_fields/plot_grib.py index 04146d9..fe518ea 100644 --- a/json_fields/plot_grib.py +++ b/json_fields/plot_grib.py @@ -68,7 +68,17 @@ def get_grib_metadata(filename, shortname, level=None): scaling_offset=-273.15 units = '°C' - # precipitations should be in mm + # converting total cloud cover for cosmo in okta + if units == '%' and grib_get_or_none(gid, "cfVarName") == 'tcc': + scaling_factor = 0.08 + units = 'okta' + + # converting total cloud cover for ifs-ecmwf in okta + if units == '(0 - 1)' and grib_get_or_none(gid, "cfVarName") == 'tcc': + scaling_factor = 8.0 + units = 'okta' + + # converting precipitations in mm if units == 'm' and grib_get_or_none(gid, "cfVarName") != 'hzerocl': scaling_factor = 0.001 units = 'mm'