Skip to main content

No project description provided

Project description

wz-weather-plot

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install wz-weather-plot

License

wz-weather-plot is distributed under the terms of the MIT license.

该模块主要用于绘图配置,以下为绘图参数配置详解,目前只支持绘制中国区的图形:

1. 绘图参数配置

PRE01:  #传入的key
  map_cfg:  #地图的配置
    extent: # 地图范围的配置
      - 70  # 开始的经度
      - 140 # 截止的经度
      - 10  # 起始纬度
      - 60  # 截止纬度
      - 10  # x 方向的间隔
      - 10  # y 方向的间隔
    add_province: true  # 是否添加省份
    add_city: false   # 是否添加城市
    add_cnty: false  # 是否添加县区    
    title: "2米气温"  # 图片的标题
  data_detail_cfg:  #数据路径的配置
    save_path: "./test/test.png"  # 保存的路径
    data_type: "WIZGRD02"  # 数据的格式
    u_path: "F:/data/ECMWF_D1D/2022061208/u10/2022061208.006" # 绘制风向杆,需要配置此项
    v_path: "F:/data/ECMWF_D1D/2022061208/v10/2022061208.006" # 绘制风向杆,需要配置此项
    contourf_paths: # 绘制填色的数据,需要配置此项
      mx2t24: "F:/data/ECMWF_D1D/2022061208/mx2t24/2022061208.024"
    contour_paths: # 绘制等值线的数据,需要配置此项
      mx2t24: "F:/data/ECMWF_D1D/2022061208/mx2t24/2022061208.024"
  time_interval: # 时间间隔的配置
    hours: 12
  time_zone: "GMT8" # 时区
  cst_hour:  # 时效的配置
    start_cst: 1
    end_cst: 2
    step: 1
  contourf_cfg:  # 填色图的配置
    add_color_bar: true # 是否添加颜色条
    elements_detail: # 填色图的元素的配置,支持多个产品填色
      mx2t24:
        colors: "#022F82,#125CA6,#1776D5,#3B9EF1,#85D2FF,#AFE4FA,#D5FAFF,#F4FBF3,#D4FDD4,#BDFF8C,#FAFEA0, #FFF2C5,#FED1A3,#FA9887,#FD5500,#E60000"
        # 颜色的配置,需要比levels 少一个
        levels: "-50, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, 35, 37, 40, 99"
        # level的配置,需要比colors 多一个
#        cmap: "" # 支持 cmap格式
        extend: "both" # 主要用来绘制颜色调的形状
      mx2t242:
        colors: "#022F82,#125CA6,#1776D5,#3B9EF1,#85D2FF,#AFE4FA,#D5FAFF,#F4FBF3,#D4FDD4,#BDFF8C,#FAFEA0, #FFF2C5,#FED1A3,#FA9887,#FD5500,#E60000"
        levels: "-50, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, 35, 37, 40, 99"
        #        cmap: ""
        extend: "both"
  wind_bar_cfg: # 风向杆的配置
    barb_color: "blue" # 风向杆的颜色
    length: 6  # 风向杆的长度
    re_grid_shape: 20 # 按道理应该是图片上显示的个数,值越大,越密
  contour_cfg: # 等值线的配置
    mx2t24:
      - levels: # 间隔配置
          - -20 # 最小值
          - 0  # 最大值
          - 4  # 间隔
        colors: "black" #等值线的颜色
        line_widths: 1.5 #线条的粗细
        line_styles: "-" 线条的形状
      - levels:
          - 35
        colors: "red"
        line_widths: 2
        line_styles: "-"
      - levels:
          - 0
          - 40
          - 4
        colors: "black"
        line_widths: 1.5
        line_styles: "-"
    gh850:
      - levels:
          - 488
          - 584
          - 4
        colors: "black"
        line_widths: 1.5
        line_styles: "-"
      - levels:
          - 588
        colors: "red"
        line_widths: 2
        line_styles: "-"
      - levels:
          - 590
          - 644
          - 4
        colors: "black"
        line_widths: 1.5
        line_styles: "-"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wz_weather_plot-0.0.3-py3-none-any.whl (52.9 MB view details)

Uploaded Python 3

File details

Details for the file wz_weather_plot-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for wz_weather_plot-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 49b02c5c02b4dccd54b4cf0928463c8ec68ee10c8636713621dc4f4c314ae725
MD5 057983ac68ace56b7772d7df130059a8
BLAKE2b-256 a9193f08a63365cd0f775b06421005e8c730df5c7ff553504b7d9102ac30ad09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page