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.5.tar.gz (45.3 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.5-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dayuanlib-0.4.5.tar.gz
  • Upload date:
  • Size: 45.3 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.5.tar.gz
Algorithm Hash digest
SHA256 3db22a8dbf32728f9c75a843ac003e81e80cd4e446a5005ea1a16acc52dce741
MD5 2e5e8b479d60da55ff9e8bffc49a204e
BLAKE2b-256 7e58e5c8bc86dcc4da2799ab4a793d7ed88c47993b23f5147b85d636d9dc7dee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dayuanlib-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 64ff88a3c3b5a5575b19b68d2ae6e3bffc71f829faec04261e6232df2068fba4
MD5 a74f690eb1cbbcaead09f2d5a25f3903
BLAKE2b-256 3d1318f4a0a4be38b52cb24a50d1ba665df1cb9cf2f4b1af66c9324ffa2353dd

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