NCAR / NCAR/wrf-python

WRF-Python: Plotting variables with different pressure levels and Time

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

I want to plot relative humidity for a particular (lat, long) with time on x axis and pressure level on Y axis how can I plot it in WRF-python
from wrf import (to_np, getvar, smooth2d, get_cartopy, cartopy_xlim,
cartopy_ylim, latlon_coords,ALL_TIMES,interplevel)

For time I could store all timesteps using ALL_TIMES but how do I store all pressure level information in this which is required to plot "rh" at different pressure level at different time. I want my plot to look like attached image with this

Here is my code
unnamed

Open the NetCDF file

ncfile = Dataset("E:/WRF_python/wrfout_d03_2021-05-11_18_00_00")
variables = ncfile.variables.keys()

my_times = getvar(ncfile, "times", ALL_TIMES)
rh = getvar(ncfile, "rh",ALL_TIMES)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests; start by reviewing the WRF-Python usage around getvar with ALL_TIMES and interplevel. Determine the documented workflow for plotting relative humidity across time and pressure levels, and consider the work done when the requested plot can be produced from a clear example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.