Skip to main content

Add your description here

Project description

dayuanlib

Package version Supported Python versions

dataprocessor

from dayuanlib import dataprocessor

processor = dataprocessor.DataProcessor() 

# 加载全域数据
arr = processor.load_arr(settings.data_output_final_dir, timeStr)

vars = [
        '100u_hres','100v_hres','200u_hres','200v_hres','tp_hres','sp_hres','2t_hres','10u_hres',
        '10v_hres','tcc_hres','ssr_hres','u10_fw','v10_fw','t2m_fw','z850_fw','z1000_fw','q850_fw','q1000_fw',
        'u850_fw','u1000_fw','v850_fw','v1000_fw','t850_fw','t1000_fw','u10_pg','v10_pg','t2m_pg','z1000_pg',
        'z850_pg', 'q1000_pg', 'q850_pg', 't1000_pg', 't850_pg', 'u1000_pg', 'u850_pg', 'v1000_pg','v850_pg',
        'u100_ens','v100_ens','t2m_ens','sp_ens','tp_ens','ssrd_ens','tcc_ens','u25_ens','u50_ens','u75_ens',
        'v25_ens','v50_ens','v75_ens'
    ]

# 数据切割
processor.process(arr, timestr=timeStr,
                                  step="6:54",
                                  lat_range=(42, 33),
                                  lon_range=(109, 116),
                                  var_list=vars,
                                  outpath="processed")

GridFinder

from dayuanlib import tools
grid_finder = tools.GridFinder()
# 现在返回的是index 不是经纬度 还需要更新一次
lat_range, lon_range = grid_finder.get_lat_lon_ranges([[42, 109]])

xmlzip

from dayuanlib import tools

tools.zip2xml("script/2025-03-09_08_00_00.zip", "script/2025-03-09_08_00_00.xml")

tools.xml2zip("script/2025-03-09_08_00_00.xml", "script/2025-03-09_08_00_00_exml.zip")

版本号由 git tag 自动管理

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

dayuanlib-0.4.4.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

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

dayuanlib-0.4.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file dayuanlib-0.4.4.tar.gz.

File metadata

  • Download URL: dayuanlib-0.4.4.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dayuanlib-0.4.4.tar.gz
Algorithm Hash digest
SHA256 c0ada913b1855a314f138a3c7668d1affa097bcf3e274422b6c81e1b3108db4a
MD5 768bd2e7a4c625294280e3c0a663c2b8
BLAKE2b-256 24c99b061f77e3a2685372f54ce11d4683dd7222126b5268e8fa540e136478ed

See more details on using hashes here.

File details

Details for the file dayuanlib-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: dayuanlib-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dayuanlib-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ab7a017cb157f2e0f46adfc78a4edf56d84981570cc2084dfc0767c3ce06a237
MD5 dc4020916405de968fa0f95040caab61
BLAKE2b-256 7b08649e50cfa41df0bcd766d5185efcd337f1e1c297d1d25c61510327d32787

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