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 Distribution

wz_weather_plot-0.0.1.tar.gz (23.7 MB view details)

Uploaded Source

Built Distribution

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

wz_weather_plot-0.0.1-py3-none-any.whl (22.0 MB view details)

Uploaded Python 3

File details

Details for the file wz_weather_plot-0.0.1.tar.gz.

File metadata

  • Download URL: wz_weather_plot-0.0.1.tar.gz
  • Upload date:
  • Size: 23.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for wz_weather_plot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f707d4441934b9b1a46280220e9a77004586afba5b0edb67d8423c982984a566
MD5 21567fee17bdaf8beffc896a1195d51f
BLAKE2b-256 98c442f74aaa13eec8116312f7d96cde1236f458ac9643e24502e0525a6b2457

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wz_weather_plot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e550fddeb28935a4b3dd9dc99a36efc432d9f3fe836852602b4d5c561154da0
MD5 b69fbd47101d37f42864253efcd87932
BLAKE2b-256 fdd7a8f9a0095e168c471835a3459b7c08cc342bead4596dc1af6ce3d47f22ea

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