Wrfout to NetCDF
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 498
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
I have three wrfout files (sample) in the below link. These files are from NCAR wrf python tutorials.
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:-
- Write the data in classic NetCDF (CF compliant) for the variable HFX for all times( time series).
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided Python example using netCDF4.Dataset, wrf.getvar, ALL_TIMES, and the HFX variable, then inspect the linked wrfout samples. The issue does not name a repository file or test; done would require a clearly defined way to write CF-compliant NetCDF output and produce the requested HFX time-series plot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100