wrf-python icon indicating copy to clipboard operation
wrf-python copied to clipboard

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

Open Abhishek12341234 opened this issue 2 years ago • 0 comments

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 avatar Jun 09 '23 13:06 Abhishek12341234