Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Wrfout to NetCDF

未关闭
#158 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python

调研方向

先使用提供的 Python 示例以及 netCDF4.Dataset、wrf.getvar、ALL_TIMES 和 HFX 变量,然后检查链接的 wrfout 样例。该 issue 没有指定 repository 文件或测试;要视为完成,需要明确定义写出符合 CF 的 NetCDF 输出并生成所请求的 HFX 时间序列图的方法。

由索引模型根据 Issue 内容生成。

描述

I have three wrfout files (sample) in the below link. These files are from NCAR wrf python tutorials.

https://actvet-my.sharepoint.com/:f:/g/personal/rajkumar_sivaprahasam_adpoly_ac_ae/EofPOyhq8UhPlq3VBrvqLJABVR0G8xj_y0gmKRgLW1wagA?e=0DvsZc

I got some code from wrf-py github as follows to read in the data for all timesteps:-


import glob
from netCDF4 import Dataset
from wrf import getvar, ALL_TIMES

list_of_paths = glob.glob(r'/home/rajkumar/wrf_python_tutorial/wrf_tutorial_data/wrfout_d0*')
list_of_paths.sort()
wrflist=[]
for i in range(0, len(list_of_paths)-1):
wrflist.append(Dataset(list_of_paths[i]))

HFX=getvar(wrflist, "HFX", timeidx=ALL_TIMES, method="join")
print(HFX)


Now I am trying to do two things:-

  1. Write the data in classic NetCDF (CF compliant) for the variable HFX for all times( time series).
  2. Create a 2D Plot for the time series for the variable HFX (some thing like an area average for all timesteps)

Would be grateful if someone can help.

主要语言
Python
星标
498
派生
178
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NCAR/wrf-python 的其他 Issue

查看 NCAR/wrf-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。