Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Abhishek12341234 opened this issue Jun 9, 2023 · 0 comments

Comments

@Abhishek12341234
Copy link

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)

@Abhishek12341234 Abhishek12341234 changed the title Plotting variables with different pressure levels and Time WRF-Python: Plotting variables with different pressure levels and Time Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant